GeoPakTile 2.1.3__tar.gz → 2.1.4__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.
- {geopaktile-2.1.3 → geopaktile-2.1.4}/PKG-INFO +1 -1
- {geopaktile-2.1.3 → geopaktile-2.1.4}/pyproject.toml +1 -1
- {geopaktile-2.1.3 → geopaktile-2.1.4}/src/geopaktile/geopaktile.py +12 -0
- {geopaktile-2.1.3 → geopaktile-2.1.4}/LICENSE.md +0 -0
- {geopaktile-2.1.3 → geopaktile-2.1.4}/README.md +0 -0
- {geopaktile-2.1.3 → geopaktile-2.1.4}/src/geopaktile/__init__.py +0 -0
- {geopaktile-2.1.3 → geopaktile-2.1.4}/src/geopaktile/__main__.py +0 -0
- {geopaktile-2.1.3 → geopaktile-2.1.4}/src/geopaktile/gpkg_to_cog.py +0 -0
- {geopaktile-2.1.3 → geopaktile-2.1.4}/src/geopaktile/xml_parser.py +0 -0
|
@@ -99,6 +99,18 @@ class GeoPakTile:
|
|
|
99
99
|
self._conn.close()
|
|
100
100
|
self._conn = None
|
|
101
101
|
|
|
102
|
+
def get_tile(self, z: int, x: int, y: int) -> bytes | None:
|
|
103
|
+
"""Get a tile's image data using the zxy coordinates, or None if absent."""
|
|
104
|
+
|
|
105
|
+
self._cursor.execute(
|
|
106
|
+
f'SELECT tile_data FROM "{self.table_name}" '
|
|
107
|
+
"WHERE zoom_level=? AND tile_column=? AND tile_row=? LIMIT 1",
|
|
108
|
+
(z, x, y),
|
|
109
|
+
)
|
|
110
|
+
|
|
111
|
+
row = self._cursor.fetchone()
|
|
112
|
+
return None if row is None else row[0]
|
|
113
|
+
|
|
102
114
|
def has_tile(self, z: int, x: int, y: int):
|
|
103
115
|
"""Check if a tile is present, using the zxy coordinates"""
|
|
104
116
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|