Changes between Version 5 and Version 6 of PythonScripts


Ignore:
Timestamp:
Jul 27, 2018 8:01:25 PM (7 years ago)
Author:
Uriel
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • PythonScripts

    v5 v6  
    6363
    6464= [[attachment:gen_terrain_tiles_script.py]]
    65 This script fixes some of the problems of generating the world map from images. It is capable of producing a higher resolution map from zoom levels 7 up. To go any lower will require [wiki:ZoomLevels some tweaking] for the map not to have white stripes of missing data. The Python script can generate a Maperitive script to perform this task, or preferrably, use the {{{-r}}} option to instruct the Python code to run Maperitive itself. This automates the process, allowing Python to detect that Maperitive has failed somehow and automatically retry.
     65This script fixes some of the problems of generating the world map from images. It is capable of producing a higher resolution map from zoom levels 7 up. To go any lower will require [wiki:ZoomLevels some tweaking] for the map not to have white stripes of missing data. The Python script can generate a Maperitive script to perform this task, or preferably, use the {{{-r}}} option to instruct the Python code to run Maperitive itself. This automates the process, allowing Python to detect that Maperitive has failed somehow and automatically retry.
     66
     67This script divides the world into slices 6x6 degrees square, but loads in a 1-degree border around each slice for an 8x8 degree total. Then, slices are overlapped by 2 degrees in an attempt to ensure that at the minimum zoom (7), there are no gaps in the map. By default, Maperitive will generate web tiles that cover the entire range of the input data, even if some of those tiles will only be partially filled. This script uses a setting, {{{generate-tiles exclude-partial=true}}} so that these partial tiles are never created. This is the reason for the 1 degree bleed, to reduce the number of partial tiles at the edges of each slice. In theory, any tile not generated should be generated by the next slice to the North or East, since they overlap by 2 degrees and a tile at zoom 7 is 2.813 degrees wide. In practice this still misses some regions.
     68
     69The script has an "index" parameter. If Maperitive crashes or runs out of RAM after slice 103, for example, you can run this script again and tell it to start at slice 103, so the work doesn't need to be repeated.
     70