ancient-map-tiler 0.1.0__py3-none-any.whl → 0.1.1__py3-none-any.whl
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.
- ancient_map_tiler/tiles.py +2 -7
- {ancient_map_tiler-0.1.0.dist-info → ancient_map_tiler-0.1.1.dist-info}/METADATA +27 -11
- ancient_map_tiler-0.1.1.dist-info/RECORD +6 -0
- ancient_map_tiler-0.1.1.dist-info/entry_points.txt +3 -0
- ancient_map_tiler-0.1.0.dist-info/RECORD +0 -6
- ancient_map_tiler-0.1.0.dist-info/entry_points.txt +0 -3
- {ancient_map_tiler-0.1.0.dist-info → ancient_map_tiler-0.1.1.dist-info}/WHEEL +0 -0
ancient_map_tiler/tiles.py
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import argparse
|
|
2
|
-
import sys
|
|
3
2
|
from argparse import Namespace
|
|
4
3
|
from math import ceil, log
|
|
5
4
|
from pathlib import Path
|
|
@@ -162,7 +161,7 @@ def parse_args() -> Namespace:
|
|
|
162
161
|
help="Path or identifier of the map source to generate tiles from",
|
|
163
162
|
)
|
|
164
163
|
parser.add_argument(
|
|
165
|
-
"--tile-size", "-t", help="Size of a tile", default=256, type=int
|
|
164
|
+
"--tile-size", "-t", help="Size of a tile. Default: 256", default=256, type=int
|
|
166
165
|
)
|
|
167
166
|
parser.add_argument(
|
|
168
167
|
"--output-directory",
|
|
@@ -173,7 +172,7 @@ def parse_args() -> Namespace:
|
|
|
173
172
|
parser.add_argument(
|
|
174
173
|
"--image-format",
|
|
175
174
|
"-f",
|
|
176
|
-
help="Output image format. Tested for .png and .webp",
|
|
175
|
+
help="Output image format. Default: .webp .Tested for .png and .webp",
|
|
177
176
|
default=".webp",
|
|
178
177
|
)
|
|
179
178
|
return parser.parse_args()
|
|
@@ -197,7 +196,3 @@ def main() -> None:
|
|
|
197
196
|
image_format=args.image_format,
|
|
198
197
|
progress_bar=progress_bar,
|
|
199
198
|
)
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
if __name__ == "__main__":
|
|
203
|
-
main()
|
|
@@ -1,31 +1,47 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ancient-map-tiler
|
|
3
|
-
Version: 0.1.
|
|
4
|
-
Summary:
|
|
3
|
+
Version: 0.1.1
|
|
4
|
+
Summary: Provide tiles data for a web view of an ancient map
|
|
5
5
|
Author: Noan Cloarec
|
|
6
6
|
Author-email: noan.cloarec@gmail.com
|
|
7
7
|
Requires-Python: >=3.13
|
|
8
8
|
Classifier: Programming Language :: Python :: 3
|
|
9
9
|
Classifier: Programming Language :: Python :: 3.13
|
|
10
10
|
Classifier: Programming Language :: Python :: 3.14
|
|
11
|
-
Requires-Dist: numpy (>=2
|
|
12
|
-
Requires-Dist: tqdm (>=4
|
|
11
|
+
Requires-Dist: numpy (>=2)
|
|
12
|
+
Requires-Dist: tqdm (>=4)
|
|
13
13
|
Description-Content-Type: text/markdown
|
|
14
14
|
|
|
15
15
|
# Ancient-map-tiler
|
|
16
|
-
This
|
|
17
|
-
The source image of the map may be very large. To be usable in a web view such as Leaflet it must be splitted into tiles at different zooms
|
|
18
|
-
|
|
16
|
+
This project aims to generate tiles data for a web view of any ancient map.
|
|
17
|
+
The source image of the map may be very large. To be usable in a web view such as Leaflet it must be splitted into tiles at different zooms.
|
|
18
|
+
|
|
19
|
+
## Usage
|
|
20
|
+
```shell
|
|
21
|
+
# (Optional) Download a large map from wikipedia
|
|
22
|
+
wget https://upload.wikimedia.org/wikipedia/commons/5/50/TabulaPeutingeriana.jpg
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
pip install ancient-map-tiler
|
|
26
|
+
ancient-map-tiler TabulaPeutingeriana.jpg -o tiles
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
## Development
|
|
30
|
+
### Prerequisites
|
|
19
31
|
- python (tested on 3.13)
|
|
20
32
|
- poetry
|
|
21
|
-
|
|
33
|
+
- pre-commit
|
|
34
|
+
|
|
35
|
+
### Getting started
|
|
22
36
|
```shell
|
|
37
|
+
git clone git@gitlab.com:noan-cloarec/ancient-map-tiler.git
|
|
23
38
|
cd ancient-map-tiler
|
|
39
|
+
|
|
24
40
|
poetry install
|
|
25
|
-
|
|
26
|
-
|
|
41
|
+
pre-commit install
|
|
42
|
+
|
|
27
43
|
# Generate the tiles into a directory named tiles
|
|
28
|
-
poetry run
|
|
44
|
+
poetry run ancient-map-tiler TabulaPeutingeriana.jpg -o tiles
|
|
29
45
|
# Open the preview in your web browser
|
|
30
46
|
open simple_map_preview.html
|
|
31
47
|
```
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
ancient_map_tiler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
+
ancient_map_tiler/tiles.py,sha256=AXtXES1pmg4ucXIbCDE_zgoV20Tc1SZWSaJKzbC9S5g,7868
|
|
3
|
+
ancient_map_tiler-0.1.1.dist-info/METADATA,sha256=ZU6yebC3PnPsywkIVuSyqvqWwWdlKhXvUY60ESvvQSo,1342
|
|
4
|
+
ancient_map_tiler-0.1.1.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
5
|
+
ancient_map_tiler-0.1.1.dist-info/entry_points.txt,sha256=mJS_XU5F_ra8fsrPcvogp13EZEU1CGk1vu2Aqe9WLm8,66
|
|
6
|
+
ancient_map_tiler-0.1.1.dist-info/RECORD,,
|
|
@@ -1,6 +0,0 @@
|
|
|
1
|
-
ancient_map_tiler/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
2
|
-
ancient_map_tiler/tiles.py,sha256=cPpE4PTycdRSmVT-scLilc4g-Xz6XEJat3c7xxM-ah8,7889
|
|
3
|
-
ancient_map_tiler-0.1.0.dist-info/METADATA,sha256=IxFxtnnUuTtwyAPf0kU_B4nTkTWaIjJbJvGoRKlDL1U,1065
|
|
4
|
-
ancient_map_tiler-0.1.0.dist-info/WHEEL,sha256=zp0Cn7JsFoX2ATtOhtaFYIiE2rmFAD4OcMhtUki8W3U,88
|
|
5
|
-
ancient_map_tiler-0.1.0.dist-info/entry_points.txt,sha256=8g5jcREn9ACPtgJuvUtNSs3U1jviizdx0tBD772Brqc,59
|
|
6
|
-
ancient_map_tiler-0.1.0.dist-info/RECORD,,
|
|
File without changes
|