large-image-source-rasterio 1.29.7.dev22__tar.gz → 1.29.7.dev26__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {large-image-source-rasterio-1.29.7.dev22 → large-image-source-rasterio-1.29.7.dev26}/PKG-INFO +5 -4
- {large-image-source-rasterio-1.29.7.dev22 → large-image-source-rasterio-1.29.7.dev26}/large_image_source_rasterio/__init__.py +31 -28
- {large-image-source-rasterio-1.29.7.dev22 → large-image-source-rasterio-1.29.7.dev26}/large_image_source_rasterio.egg-info/PKG-INFO +5 -4
- large-image-source-rasterio-1.29.7.dev26/large_image_source_rasterio.egg-info/requires.txt +14 -0
- {large-image-source-rasterio-1.29.7.dev22 → large-image-source-rasterio-1.29.7.dev26}/setup.py +3 -1
- large-image-source-rasterio-1.29.7.dev22/large_image_source_rasterio.egg-info/requires.txt +0 -9
- {large-image-source-rasterio-1.29.7.dev22 → large-image-source-rasterio-1.29.7.dev26}/LICENSE +0 -0
- {large-image-source-rasterio-1.29.7.dev22 → large-image-source-rasterio-1.29.7.dev26}/README.rst +0 -0
- {large-image-source-rasterio-1.29.7.dev22 → large-image-source-rasterio-1.29.7.dev26}/large_image_source_rasterio/girder_source.py +0 -0
- {large-image-source-rasterio-1.29.7.dev22 → large-image-source-rasterio-1.29.7.dev26}/large_image_source_rasterio.egg-info/SOURCES.txt +0 -0
- {large-image-source-rasterio-1.29.7.dev22 → large-image-source-rasterio-1.29.7.dev26}/large_image_source_rasterio.egg-info/dependency_links.txt +0 -0
- {large-image-source-rasterio-1.29.7.dev22 → large-image-source-rasterio-1.29.7.dev26}/large_image_source_rasterio.egg-info/entry_points.txt +0 -0
- {large-image-source-rasterio-1.29.7.dev22 → large-image-source-rasterio-1.29.7.dev26}/large_image_source_rasterio.egg-info/top_level.txt +0 -0
- {large-image-source-rasterio-1.29.7.dev22 → large-image-source-rasterio-1.29.7.dev26}/pyproject.toml +0 -0
- {large-image-source-rasterio-1.29.7.dev22 → large-image-source-rasterio-1.29.7.dev26}/setup.cfg +0 -0
{large-image-source-rasterio-1.29.7.dev22 → large-image-source-rasterio-1.29.7.dev26}/PKG-INFO
RENAMED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: large-image-source-rasterio
|
|
3
|
-
Version: 1.29.7.
|
|
3
|
+
Version: 1.29.7.dev26
|
|
4
4
|
Summary: A rasterio tilesource for large_image.
|
|
5
5
|
Home-page: https://github.com/girder/large_image
|
|
6
6
|
Author: Kitware, Inc.
|
|
@@ -18,11 +18,12 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
18
18
|
Requires-Python: >=3.8
|
|
19
19
|
Description-Content-Type: text/x-rst
|
|
20
20
|
License-File: LICENSE
|
|
21
|
-
Requires-Dist: large-image>=1.29.7.
|
|
22
|
-
Requires-Dist: rasterio
|
|
21
|
+
Requires-Dist: large-image>=1.29.7.dev26
|
|
22
|
+
Requires-Dist: rasterio<1.3.11,>=1.3; python_version < "3.9"
|
|
23
|
+
Requires-Dist: rasterio>=1.3; python_version >= "3.9"
|
|
23
24
|
Requires-Dist: packaging
|
|
24
25
|
Provides-Extra: girder
|
|
25
|
-
Requires-Dist: girder-large-image>=1.29.7.
|
|
26
|
+
Requires-Dist: girder-large-image>=1.29.7.dev26; extra == "girder"
|
|
26
27
|
Provides-Extra: all
|
|
27
28
|
Requires-Dist: rio-cogeo; extra == "all"
|
|
28
29
|
|
|
@@ -153,29 +153,33 @@ class RasterioFileTileSource(GDALBaseFileTileSource, metaclass=LruCacheMetaclass
|
|
|
153
153
|
# use the mapnik source if needed. This variable is always ignored
|
|
154
154
|
# is_netcdf = False
|
|
155
155
|
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
156
|
+
try:
|
|
157
|
+
# get the different scales and projections from the image
|
|
158
|
+
scale = self.getPixelSizeInMeters()
|
|
159
|
+
|
|
160
|
+
# raise an error if we are missing some information about the projection
|
|
161
|
+
# i.e. we don't know where to place it on a map
|
|
162
|
+
isProjected = self.projection or self.dataset.driver.lower() in {'png'}
|
|
163
|
+
if isProjected and not scale:
|
|
164
|
+
msg = ('File does not have a projected scale, so will not be '
|
|
165
|
+
'opened via rasterio with a projection.')
|
|
166
|
+
raise TileSourceError(msg)
|
|
167
|
+
|
|
168
|
+
# set the levels of the tiles
|
|
169
|
+
logX = math.log(float(self.sizeX) / self.tileWidth)
|
|
170
|
+
logY = math.log(float(self.sizeY) / self.tileHeight)
|
|
171
|
+
computedLevel = math.ceil(max(logX, logY) / math.log(2))
|
|
172
|
+
self.sourceLevels = self.levels = int(max(0, computedLevel) + 1)
|
|
173
|
+
|
|
174
|
+
self._unitsPerPixel = unitsPerPixel
|
|
175
|
+
self.projection is None or self._initWithProjection(unitsPerPixel)
|
|
176
|
+
self._getPopulatedLevels()
|
|
177
|
+
self._getTileLock = threading.Lock()
|
|
178
|
+
self._setDefaultStyle()
|
|
179
|
+
except Exception as exc:
|
|
180
|
+
msg = f'File cannot be opened via rasterio {exc}.'
|
|
165
181
|
raise TileSourceError(msg)
|
|
166
182
|
|
|
167
|
-
# set the levels of the tiles
|
|
168
|
-
logX = math.log(float(self.sizeX) / self.tileWidth)
|
|
169
|
-
logY = math.log(float(self.sizeY) / self.tileHeight)
|
|
170
|
-
computedLevel = math.ceil(max(logX, logY) / math.log(2))
|
|
171
|
-
self.sourceLevels = self.levels = int(max(0, computedLevel) + 1)
|
|
172
|
-
|
|
173
|
-
self._unitsPerPixel = unitsPerPixel
|
|
174
|
-
self.projection is None or self._initWithProjection(unitsPerPixel)
|
|
175
|
-
self._getPopulatedLevels()
|
|
176
|
-
self._getTileLock = threading.Lock()
|
|
177
|
-
self._setDefaultStyle()
|
|
178
|
-
|
|
179
183
|
def _getPopulatedLevels(self):
|
|
180
184
|
try:
|
|
181
185
|
with self._getDatasetLock:
|
|
@@ -413,15 +417,14 @@ class RasterioFileTileSource(GDALBaseFileTileSource, metaclass=LruCacheMetaclass
|
|
|
413
417
|
for k in bounds:
|
|
414
418
|
bounds[k]['y'] = max(min(bounds[k]['y'], yBounds), -yBounds)
|
|
415
419
|
|
|
416
|
-
#
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
while any(v['x'] < -180 for v in bounds.values()):
|
|
420
|
+
# rotate longitude so the western-most corner is within [-180, 180)
|
|
421
|
+
dx = min(v['x'] for v in bounds.values())
|
|
422
|
+
if dx < -180 or dx >= 180:
|
|
423
|
+
dx = ((dx + 180) % 360 - 180) - dx
|
|
421
424
|
for k in bounds:
|
|
422
|
-
bounds[k]['x'] +=
|
|
425
|
+
bounds[k]['x'] += dx
|
|
423
426
|
|
|
424
|
-
# if one of the corner is
|
|
427
|
+
# if one of the corner is >= 180 set all the corners to world width
|
|
425
428
|
if any(v['x'] >= 180 for v in bounds.values()):
|
|
426
429
|
bounds['ul']['x'] = bounds['ll']['x'] = -180
|
|
427
430
|
bounds['ur']['x'] = bounds['lr']['x'] = 180
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: large-image-source-rasterio
|
|
3
|
-
Version: 1.29.7.
|
|
3
|
+
Version: 1.29.7.dev26
|
|
4
4
|
Summary: A rasterio tilesource for large_image.
|
|
5
5
|
Home-page: https://github.com/girder/large_image
|
|
6
6
|
Author: Kitware, Inc.
|
|
@@ -18,11 +18,12 @@ Classifier: Programming Language :: Python :: 3.12
|
|
|
18
18
|
Requires-Python: >=3.8
|
|
19
19
|
Description-Content-Type: text/x-rst
|
|
20
20
|
License-File: LICENSE
|
|
21
|
-
Requires-Dist: large-image>=1.29.7.
|
|
22
|
-
Requires-Dist: rasterio
|
|
21
|
+
Requires-Dist: large-image>=1.29.7.dev26
|
|
22
|
+
Requires-Dist: rasterio<1.3.11,>=1.3; python_version < "3.9"
|
|
23
|
+
Requires-Dist: rasterio>=1.3; python_version >= "3.9"
|
|
23
24
|
Requires-Dist: packaging
|
|
24
25
|
Provides-Extra: girder
|
|
25
|
-
Requires-Dist: girder-large-image>=1.29.7.
|
|
26
|
+
Requires-Dist: girder-large-image>=1.29.7.dev26; extra == "girder"
|
|
26
27
|
Provides-Extra: all
|
|
27
28
|
Requires-Dist: rio-cogeo; extra == "all"
|
|
28
29
|
|
{large-image-source-rasterio-1.29.7.dev22 → large-image-source-rasterio-1.29.7.dev26}/setup.py
RENAMED
|
@@ -56,7 +56,9 @@ setup(
|
|
|
56
56
|
],
|
|
57
57
|
install_requires=[
|
|
58
58
|
f'large-image{limit_version}',
|
|
59
|
-
'rasterio>=1.3
|
|
59
|
+
'rasterio>=1.3,<1.3.11 ; python_version < "3.9"',
|
|
60
|
+
# We need rasterio > 1.3 to get the statistics attribute (<=> gdalinfo)
|
|
61
|
+
'rasterio>=1.3 ; python_version >= "3.9"',
|
|
60
62
|
'packaging',
|
|
61
63
|
],
|
|
62
64
|
extras_require={
|
{large-image-source-rasterio-1.29.7.dev22 → large-image-source-rasterio-1.29.7.dev26}/LICENSE
RENAMED
|
File without changes
|
{large-image-source-rasterio-1.29.7.dev22 → large-image-source-rasterio-1.29.7.dev26}/README.rst
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{large-image-source-rasterio-1.29.7.dev22 → large-image-source-rasterio-1.29.7.dev26}/pyproject.toml
RENAMED
|
File without changes
|
{large-image-source-rasterio-1.29.7.dev22 → large-image-source-rasterio-1.29.7.dev26}/setup.cfg
RENAMED
|
File without changes
|