gdal_slice.sh<\/span>:<\/p>\n$ .\/gdal_slice.py -h\r\nUsage: gdal_slice.py [options] FILENAME\r\n\r\nOptions:\r\n -h, --help show this help message and exit\r\n -o OVERLAP, --overlap=OVERLAP\r\n percentage tiles will overlap. should be at least 20%\r\n -a, --add write map info to map_koord.txt in current working\r\n directory\r\n -m, --map use *_map folders for output; use if input image is\r\n UTM. Default behavior\r\n -t, --topo use *_top folders for output; use if input image is\r\n not UTM\r\n -v, --verbose enable debugging output<\/pre>\nThe biggest difference is that gdal_slice.py<\/span> does not perform any format conversion; it will write maps to TIFF files. Although the file size is decidedly larger than that of PNGs, my version of GDAL is unable to create PNGs, and disk space is (fairly) cheap. If I’m motivated I’ll get around to adding a format option, at least to allow conversion to PNG.<\/p>\nRunning gdal_slice.py filename.ext<\/span> will create a folder named filename_map (or _top, if you use the -t flag) that contains a set of 1280×1024 TIFF files, as well as a map_koord_draft.txt file. Moving this folder into GPSDrive’s map directory, and merging filename_[map|top]\/map_koord_draft.txt with map_koord.txt will make the new maps available to GPSDrive. Note that filename.ext must be in the current working directory, as the script handles filenames\/paths somewhat naiv\u00c3\u00ably.<\/p>\nSo far I’ve only tested this with GeoTIFFs from LibreMaps, but it seems to work great, with the caveat that LibreMaps’ files include the borders of map, and my script doesn’t do any cropping, so you see borders if you’re near the edges of quads. This doesn’t bother me terribly much, but you may need to turn mapsets on and off in the Map Control dialog to see the appropriate images.<\/p>\n
Update 7-14-11:<\/b> I’ve modified the script with an additional flag (-a) that will automatically merge the generated map_koords file with map_koord.txt in the current working directory. This means that if you run the script from inside .gpsdrive\/maps with the -a flag the generated tiles will be automatically added to GPSDrive’s database. The script avoids creating duplicate entries in map_koord.txt, as well as alphabetizing all entries.<\/p>\n
I’ve modified the documentation here, as well as the links, to reference the latest version.<\/p>\n","protected":false},"excerpt":{"rendered":"
After getting GPSDrive running on OS X\u00c2\u00a0I started looking into different sources for maps. The GPSDrive wiki has a couple of interesting pages about this: one on creating maps\u00c2\u00a0and one on map sources. The second page pointed me to the LibreMap Project\u00c2\u00a0which has a complete collection of \u00c2\u00a0USGS 1:24000 (large scale) topographic maps for the […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[146,3,6,78,7],"tags":[43,144,47,145,74,77,158,161,84,159],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/sethjust.com\/wp-json\/wp\/v2\/posts\/341"}],"collection":[{"href":"https:\/\/sethjust.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/sethjust.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/sethjust.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/sethjust.com\/wp-json\/wp\/v2\/comments?post=341"}],"version-history":[{"count":14,"href":"https:\/\/sethjust.com\/wp-json\/wp\/v2\/posts\/341\/revisions"}],"predecessor-version":[{"id":354,"href":"https:\/\/sethjust.com\/wp-json\/wp\/v2\/posts\/341\/revisions\/354"}],"wp:attachment":[{"href":"https:\/\/sethjust.com\/wp-json\/wp\/v2\/media?parent=341"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sethjust.com\/wp-json\/wp\/v2\/categories?post=341"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sethjust.com\/wp-json\/wp\/v2\/tags?post=341"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}