{"id":390,"date":"2012-02-11T19:32:40","date_gmt":"2012-02-12T03:32:40","guid":{"rendered":"http:\/\/sethjust.com\/?p=390"},"modified":"2012-02-11T19:32:40","modified_gmt":"2012-02-12T03:32:40","slug":"more-map-scripts","status":"publish","type":"post","link":"https:\/\/sethjust.com\/2012\/02\/11\/more-map-scripts\/","title":{"rendered":"More Map Scripts"},"content":{"rendered":"

In the last installment<\/a>\u00e2\u20ac\u017d I wrote a script (gdal_slice.py) to cut up geotagged images and save them in a format that GPSdrive will read. I’ve uploaded that script into a new repository on GitHub<\/a>.<\/p>\n

I’ve also uploaded a script I wrote called get_quad.py, which will download USGS topographic maps automatically. This script naturally complements gdal_slice.py; using the two together allows for almost-totally automatic population of GPSdrive’s map database with high quality topographic maps.<\/p>\n

usage: get_quad.py [-h] [-q] [-s STATE] (-g | -c COORD COORD)<\/pre>\n
Get DRG USGS quad for given latitude and longitude from LibreMaps.org<\/pre>\n
optional arguments:\r\n -h, --help show this help message and exit\r\n -q, --silent don't produce any output\r\n -s STATE, --state STATE\r\n Postal abbr. for the state in which the quad falls, so\r\n we don't need to look it up\r\n -g, --gps get coordinates from GPSd\r\n -c COORD COORD, --coords COORD COORD\r\n specify latitude N and longitude E (respectively) in\r\n decimal degrees; longitude should be negative, as all\r\n maps fall in the western hemisphere<\/pre>\n

Unfortunately, because of the way USGS maps are organized, the script needs to know the state in which the coordinates fall. If the -s flag is not given, this is inferred from the coordinates, but this lookup requires internet access.<\/p>\n","protected":false},"excerpt":{"rendered":"

In the last installment\u00e2\u20ac\u017d I wrote a script (gdal_slice.py) to cut up geotagged images and save them in a format that GPSdrive will read. I’ve uploaded that script into a new repository on GitHub. I’ve also uploaded a script I wrote called get_quad.py, which will download USGS topographic maps automatically. This script naturally complements gdal_slice.py; […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[146,6,78,7],"tags":[150,145,84],"jetpack_sharing_enabled":true,"jetpack_featured_media_url":"","_links":{"self":[{"href":"https:\/\/sethjust.com\/wp-json\/wp\/v2\/posts\/390"}],"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=390"}],"version-history":[{"count":1,"href":"https:\/\/sethjust.com\/wp-json\/wp\/v2\/posts\/390\/revisions"}],"predecessor-version":[{"id":391,"href":"https:\/\/sethjust.com\/wp-json\/wp\/v2\/posts\/390\/revisions\/391"}],"wp:attachment":[{"href":"https:\/\/sethjust.com\/wp-json\/wp\/v2\/media?parent=390"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/sethjust.com\/wp-json\/wp\/v2\/categories?post=390"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/sethjust.com\/wp-json\/wp\/v2\/tags?post=390"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}