Skip to content

Commit

Permalink
Merge pull request #559 from girder/reduce-gdal-warning
Browse files Browse the repository at this point in the history
Reduce gdal warning about projection strings.
  • Loading branch information
manthey authored Mar 4, 2021
2 parents e58b2fe + e18e903 commit 44b15b9
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## Unreleased

### Improvements
- Reduce gdal warning about projection strings (#559)
- Don't report needless frame information for some single frame files (#558)

### Bug Fixes
- Fix compositing when using different frame numbers and partial tiles (#557)

Expand Down
3 changes: 3 additions & 0 deletions sources/gdal/large_image_source_gdal/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -666,6 +666,9 @@ def getTile(self, x, y, z, pilImageAllowed=False, numpyAllowed=False, **kwargs):
if not hasattr(self, '_warpSRS'):
self._warpSRS = (self.getProj4String(),
self.projection.decode('utf8'))
if self._warpSRS[1].startswith(InitPrefix) and tuple(
int(p) for p in gdal.__version__.split('.')[:2]) >= (3, 1):
self._warpSRS = (self._warpSRS[0], self._warpSRS[1][len(InitPrefix):])
with self._getDatasetLock:
ds = gdal.Warp(
'', self.dataset, format='VRT',
Expand Down

0 comments on commit 44b15b9

Please sign in to comment.