{"id":506,"date":"2018-05-24T17:07:37","date_gmt":"2018-05-24T21:07:37","guid":{"rendered":"http:\/\/brian.digitalmaddox.com\/blog\/?p=506"},"modified":"2018-05-24T17:07:37","modified_gmt":"2018-05-24T21:07:37","slug":"geonames-part-2","status":"publish","type":"post","link":"https:\/\/brian.digitalmaddox.com\/blog\/?p=506","title":{"rendered":"Geonames Part 2"},"content":{"rendered":"<p>Since I needed it as part of my job, I finally got around to finishing up the <a href=\"http:\/\/www.geonames.org\/\">Geonames<\/a> scripts in my github repository <a href=\"https:\/\/github.com\/briangmaddox\/misc_gis_scripts\">misc_gis_scripts<\/a>.\u00a0 In the geonames subdirectory is a bash script called <a href=\"https:\/\/github.com\/briangmaddox\/misc_gis_scripts\/blob\/master\/geonames\/dogeonames.sh\">dogeonames.sh<\/a>.\u00a0 Create a PostGIS database, edit the bash file, and then run it and it will download and populate your Geonames database for you.<\/p>\n<p>Note that I&#8217;m not using the alternatenamesv2 file that they&#8217;re distributing now.\u00a0 I checked with a hex editor and they&#8217;re not actually including all fields on each line, and Postgres will not import a file unless each column is there.\u00a0 I&#8217;ll probably add in a Python file to fix it at some point but not now \ud83d\ude42<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Since I needed it as part of my job, I finally got around to finishing up the Geonames scripts in my github repository misc_gis_scripts.\u00a0 In the geonames subdirectory is a bash script called dogeonames.sh.\u00a0 Create a PostGIS database, edit the &hellip; <a href=\"https:\/\/brian.digitalmaddox.com\/blog\/?p=506\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[11],"tags":[],"class_list":["post-506","post","type-post","status-publish","format-standard","hentry","category-gis"],"_links":{"self":[{"href":"https:\/\/brian.digitalmaddox.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/506","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/brian.digitalmaddox.com\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/brian.digitalmaddox.com\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/brian.digitalmaddox.com\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/brian.digitalmaddox.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=506"}],"version-history":[{"count":1,"href":"https:\/\/brian.digitalmaddox.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/506\/revisions"}],"predecessor-version":[{"id":507,"href":"https:\/\/brian.digitalmaddox.com\/blog\/index.php?rest_route=\/wp\/v2\/posts\/506\/revisions\/507"}],"wp:attachment":[{"href":"https:\/\/brian.digitalmaddox.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=506"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/brian.digitalmaddox.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=506"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/brian.digitalmaddox.com\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=506"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}