TilledMapDownloader is a python script that download and put together some given tiles of a web map.
It takes the following parameters :
--url "my.url"
(required)
used to define the url pattern to get the tiles. There are 2 placeholders that should be included in the url:___x___
to mark the location of x in the query___y___
to mark the location of y in the query
-x m M
(required)
the minimumm
and maximumM
x coordinates of the tiles to download-y m M
(required)
the minimumm
and maximumM
y coordinates of the tiles to download-d path/to/use/
(optional)
change the working and output directory (default is the current directory)-t N
(optional)
set the numberN
of threads to use (default is 4)
python tilled_map_downloader.py --url http://a.tile.openstreetmap.fr/osmfr/15/___x___/___y___.png -x 17050 17071 -y 11347 11370 -t 8
This command will download and assemble a map from OpenStreetMap with a zoom level of 15, starting at the uper-left corner of coordinates (17050;11347) and ending at the bottom right corner (17071;11370) using 8 threads.
python tilled_map_downloader.py --url "https://maps.wikimedia.org/osm-intl/13/___x___/___y___.png" -x 2445 2485 -y 2819 2840 -t 12 -d wm-map/
This one will process a map from the wikimedia map system, starting at coordinates (2445;2819) and ending at (2485;2840) using 12 threads and storing the output in the subdirectory "wm-map"