topo_map_processor 0.1.18__tar.gz → 0.1.19__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.
- {topo_map_processor-0.1.18 → topo_map_processor-0.1.19}/PKG-INFO +3 -1
- {topo_map_processor-0.1.18 → topo_map_processor-0.1.19}/pyproject.toml +2 -0
- {topo_map_processor-0.1.18 → topo_map_processor-0.1.19}/topo_map_processor/_version.py +2 -2
- {topo_map_processor-0.1.18 → topo_map_processor-0.1.19}/topo_map_processor/processor.py +9 -4
- {topo_map_processor-0.1.18 → topo_map_processor-0.1.19}/topo_map_processor/tools/retile_e2e.py +8 -9
- {topo_map_processor-0.1.18 → topo_map_processor-0.1.19}/.gitignore +0 -0
- {topo_map_processor-0.1.18 → topo_map_processor-0.1.19}/LICENSE +0 -0
- {topo_map_processor-0.1.18 → topo_map_processor-0.1.19}/README.md +0 -0
- {topo_map_processor-0.1.18 → topo_map_processor-0.1.19}/topo_map_processor/__init__.py +0 -0
- {topo_map_processor-0.1.18 → topo_map_processor-0.1.19}/topo_map_processor/tools/__init__.py +0 -0
- {topo_map_processor-0.1.18 → topo_map_processor-0.1.19}/topo_map_processor/tools/collect_bounds.py +0 -0
- {topo_map_processor-0.1.18 → topo_map_processor-0.1.19}/topo_map_processor/tools/create_force_redo_bounds.py +0 -0
- {topo_map_processor-0.1.18 → topo_map_processor-0.1.19}/topo_map_processor/tools/retile.py +0 -0
- {topo_map_processor-0.1.18 → topo_map_processor-0.1.19}/topo_map_processor/tools/tile.py +0 -0
- {topo_map_processor-0.1.18 → topo_map_processor-0.1.19}/topo_map_processor/tools/utils.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: topo_map_processor
|
|
3
|
-
Version: 0.1.
|
|
3
|
+
Version: 0.1.19
|
|
4
4
|
Summary: Library for processing topographic maps
|
|
5
5
|
Project-URL: homepage, https://github.com/ramSeraph/topo_map_processor
|
|
6
6
|
Project-URL: repository, https://github.com/ramSeraph/topo_map_processor.git
|
|
@@ -31,6 +31,7 @@ License: This is free and unencumbered software released into the public domain.
|
|
|
31
31
|
For more information, please refer to <https://unlicense.org>
|
|
32
32
|
License-File: LICENSE
|
|
33
33
|
Requires-Python: >=3.12
|
|
34
|
+
Requires-Dist: gh-release-tools>=0.1.12
|
|
34
35
|
Requires-Dist: mercantile>=1.2.1
|
|
35
36
|
Requires-Dist: pmtiles-mosaic>=0.1.0
|
|
36
37
|
Requires-Dist: requests>=2.32.4
|
|
@@ -57,6 +58,7 @@ Requires-Dist: click==8.3.0; extra == 'pinned'
|
|
|
57
58
|
Requires-Dist: colorama==0.4.6; (sys_platform == 'win32') and extra == 'pinned'
|
|
58
59
|
Requires-Dist: colorlog==6.9.0; extra == 'pinned'
|
|
59
60
|
Requires-Dist: frozenlist==1.7.0; extra == 'pinned'
|
|
61
|
+
Requires-Dist: gh-release-tools==0.1.12; extra == 'pinned'
|
|
60
62
|
Requires-Dist: idna==3.10; extra == 'pinned'
|
|
61
63
|
Requires-Dist: mercantile==1.2.1; extra == 'pinned'
|
|
62
64
|
Requires-Dist: multidict==6.6.4; extra == 'pinned'
|
|
@@ -8,6 +8,7 @@ authors = [
|
|
|
8
8
|
{ name = "Sreeram Kandimalla", email = "kandimalla.sreeram@gmail.com" },
|
|
9
9
|
]
|
|
10
10
|
dependencies = [
|
|
11
|
+
"gh-release-tools>=0.1.12",
|
|
11
12
|
"mercantile>=1.2.1",
|
|
12
13
|
"pmtiles-mosaic>=0.1.0",
|
|
13
14
|
"requests>=2.32.4",
|
|
@@ -42,6 +43,7 @@ pinned = [
|
|
|
42
43
|
"colorama==0.4.6 ; sys_platform == 'win32'",
|
|
43
44
|
"colorlog==6.9.0",
|
|
44
45
|
"frozenlist==1.7.0",
|
|
46
|
+
"gh-release-tools==0.1.12",
|
|
45
47
|
"idna==3.10",
|
|
46
48
|
"mercantile==1.2.1",
|
|
47
49
|
"multidict==6.6.4",
|
|
@@ -28,7 +28,7 @@ version_tuple: VERSION_TUPLE
|
|
|
28
28
|
commit_id: COMMIT_ID
|
|
29
29
|
__commit_id__: COMMIT_ID
|
|
30
30
|
|
|
31
|
-
__version__ = version = '0.1.
|
|
32
|
-
__version_tuple__ = version_tuple = (0, 1,
|
|
31
|
+
__version__ = version = '0.1.19'
|
|
32
|
+
__version_tuple__ = version_tuple = (0, 1, 19)
|
|
33
33
|
|
|
34
34
|
__commit_id__ = commit_id = None
|
|
@@ -134,6 +134,8 @@ class TopoMapProcessor:
|
|
|
134
134
|
self.jpeg_export_quality = extra.get('jpeg_export_quality', 75)
|
|
135
135
|
self.warp_jpeg_export_quality = extra.get('warp_jpeg_export_quality', 75)
|
|
136
136
|
self.warp_output_height = extra.get('warp_output_height', 6500)
|
|
137
|
+
self.warp_resampling_method = extra.get('warp_resampling_method', 'bilinear')
|
|
138
|
+
self.export_resampling_method = extra.get('export_resampling_method', 'nearest') # nearest for backwards compatibility
|
|
137
139
|
|
|
138
140
|
|
|
139
141
|
self.color_map = {
|
|
@@ -1790,15 +1792,17 @@ class TopoMapProcessor:
|
|
|
1790
1792
|
warp_quality_config.update({'TILED': 'YES'})
|
|
1791
1793
|
warp_quality_options = ' '.join([ f'-co {k}={v}' for k,v in warp_quality_config.items() ])
|
|
1792
1794
|
if not set_resolution:
|
|
1793
|
-
|
|
1795
|
+
res_options = f'-ts 0 {self.warp_output_height}'
|
|
1794
1796
|
else:
|
|
1795
1797
|
res = self.get_resolution()
|
|
1796
1798
|
if res == 'auto':
|
|
1797
|
-
|
|
1799
|
+
res_options = ''
|
|
1798
1800
|
else:
|
|
1799
1801
|
if type(res) is not list:
|
|
1800
1802
|
res = [res, res]
|
|
1801
|
-
|
|
1803
|
+
res_options = f'-tr {res[0]} {res[1]}'
|
|
1804
|
+
|
|
1805
|
+
reproj_options = f'-tps {res_options} -r {self.warp_resampling_method} -t_srs "EPSG:3857"'
|
|
1802
1806
|
|
|
1803
1807
|
#nodata_options = '-dstnodata 0'
|
|
1804
1808
|
nodata_options = '-dstalpha'
|
|
@@ -1903,7 +1907,8 @@ class TopoMapProcessor:
|
|
|
1903
1907
|
mask_options = '--config GDAL_TIFF_INTERNAL_MASK YES -b 1 -b 2 -b 3 -mask 4'
|
|
1904
1908
|
perf_options = '--config GDAL_CACHEMAX 512'
|
|
1905
1909
|
cog_options = '-of COG'
|
|
1906
|
-
|
|
1910
|
+
resampling_options = f'-r {self.export_resampling_method}'
|
|
1911
|
+
cmd = f'gdal_translate {perf_options} {mask_options} {creation_opts} {cog_options} {resampling_options} {filename} {out_filename}'
|
|
1907
1912
|
self.run_external(cmd)
|
|
1908
1913
|
|
|
1909
1914
|
def export(self):
|
{topo_map_processor-0.1.18 → topo_map_processor-0.1.19}/topo_map_processor/tools/retile_e2e.py
RENAMED
|
@@ -8,6 +8,7 @@ from pathlib import Path
|
|
|
8
8
|
from multiprocessing import set_start_method
|
|
9
9
|
|
|
10
10
|
from pmtiles_mosaic.partition import partition_main
|
|
11
|
+
from release_tools.download_from_release import cli as download_from_release_main
|
|
11
12
|
|
|
12
13
|
from .retile import retile_main
|
|
13
14
|
from .create_force_redo_bounds import main as create_force_redo_bounds_main
|
|
@@ -112,15 +113,13 @@ def cli():
|
|
|
112
113
|
|
|
113
114
|
# Download TIFFs
|
|
114
115
|
print("Downloading TIFFs...")
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
except subprocess.CalledProcessError as e:
|
|
123
|
-
print(f"Failed to download {fname}. It might be a dummy sheet from force redo. Continuing...")
|
|
116
|
+
# The download script will report if files are not found, which is expected for dummy sheets.
|
|
117
|
+
if download_from_release_main([
|
|
118
|
+
"--release", args.gtiffs_release,
|
|
119
|
+
"--output-dir", str(tiffs_dir),
|
|
120
|
+
"--file-list", str(sheets_to_pull_list_outfile),
|
|
121
|
+
]) != 0:
|
|
122
|
+
print("Some TIFFs failed to download. This may be expected for dummy sheets from force redo. Continuing...", file=sys.stderr)
|
|
124
123
|
|
|
125
124
|
sheets_to_pull_list_outfile.unlink()
|
|
126
125
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{topo_map_processor-0.1.18 → topo_map_processor-0.1.19}/topo_map_processor/tools/__init__.py
RENAMED
|
File without changes
|
{topo_map_processor-0.1.18 → topo_map_processor-0.1.19}/topo_map_processor/tools/collect_bounds.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|