moved populated places tools over to new tools dir, stubbed out makefiles versus .sh

This commit is contained in:
Nathaniel V. KELSO 2012-06-05 21:03:25 -07:00
parent 7599358d4f
commit 170656113b
5 changed files with 88 additions and 39 deletions

View File

@ -1 +0,0 @@
populated_places_from_10m_to_50m_and_110m.sh

View File

@ -1,7 +1,10 @@
#admin_0_details.xls
The ~400 admin-0 scaleRank map sub-units that are dissolved repeatedly and joined with the attributes in this file.
The ~400 admin-0 scaleRank map sub-units that are dissolved repeatedly and joined with
the attributes in this file.
#themes_versions.xls
The ~240 themes that make up Natural Earth their versions, and how they relate to the website, the zips, and basic stats.
The ~240 themes that make up Natural Earth their versions, and how they relate to the
website, the zips, and basic stats.

View File

@ -1,36 +0,0 @@
#!/bin/bash
# POPULATED PLACES
#10m simple- populated places
ogr2ogr -overwrite -sql "SELECT SCALERANK, NATSCALE, LABELRANK, FEATURECLA, NAME, NAMEPAR, NAMEALT, DIFFASCII, NAMEASCII, ADM0CAP, CAPALT, CAPIN, WORLDCITY, MEGACITY, SOV0NAME, SOV_A3, ADM0NAME, ADM0_A3, ADM1NAME, ISO_A2, NOTE, LATITUDE, LONGITUDE, CHANGED, NAMEDIFF, DIFFNOTE, POP_MAX, POP_MIN, POP_OTHER, GEONAMEID, MEGANAME, LS_NAME, LS_MATCH, CHECKME FROM ne_10m_populated_places WHERE natlscale >= 5 ORDER BY natlscale" ne_10m_populated_places_simple.shp ne_10m_populated_places.shp
#50m full - populated places
# “SCALERANK” <= 4 Or "FEATURECLA" = 'Admin-0 capital' Or "FEATURECLA" = 'Admin-0 capital alt' Or "FEATURECLA" = 'Admin-0 region capital' Or "FEATURECLA" = 'Admin-1 region capital' Or "FEATURECLA" = 'Scientific station'
ogr2ogr -overwrite -sql "SELECT * FROM ne_10m_populated_places WHERE natlscale >= 5 ORDER BY natlscale" ne_50m_populated_places.shp ne_10m_populated_places.shp
#50m simple - populated places
ogr2ogr -overwrite -sql "SELECT SCALERANK, NATSCALE, LABELRANK, FEATURECLA, NAME, NAMEPAR, NAMEALT, DIFFASCII, NAMEASCII, ADM0CAP, CAPALT, CAPIN, WORLDCITY, MEGACITY, SOV0NAME, SOV_A3, ADM0NAME, ADM0_A3, ADM1NAME, ISO_A2, NOTE, LATITUDE, LONGITUDE, CHANGED, NAMEDIFF, DIFFNOTE, POP_MAX, POP_MIN, POP_OTHER, GEONAMEID, MEGANAME, LS_NAME, LS_MATCH, CHECKME FROM ne_10m_populated_places WHERE natlscale >= 5 ORDER BY natlscale" ne_50m_populated_places_simple.shp ne_10m_populated_places.shp
#110m full - populated places
# “SCALERANK” <= 1 Or "FEATURECLA" = 'Admin-0 capital' Or "FEATURECLA" = 'Admin-0 capital alt'
ogr2ogr -overwrite -sql "SELECT * FROM ne_10m_populated_places WHERE natlscale >= 5 ORDER BY natlscale" ne_110m_populated_places.shp ne_10m_populated_places.shp
#110m simple - populated places
ogr2ogr -overwrite -sql "SELECT SCALERANK, NATSCALE, LABELRANK, FEATURECLA, NAME, NAMEPAR, NAMEALT, DIFFASCII, NAMEASCII, ADM0CAP, CAPALT, CAPIN, WORLDCITY, MEGACITY, SOV0NAME, SOV_A3, ADM0NAME, ADM0_A3, ADM1NAME, ISO_A2, NOTE, LATITUDE, LONGITUDE, CHANGED, NAMEDIFF, DIFFNOTE, POP_MAX, POP_MIN, POP_OTHER, GEONAMEID, MEGANAME, LS_NAME, LS_MATCH, CHECKME FROM ne_10m_populated_places WHERE natlscale >= 5 ORDER BY natlscale" ne_110m_populated_places_simple.shp ne_10m_populated_places.shp
# AIRPORTS
#50m airports
ogr2ogr -overwrite -sql "SELECT * FROM ne_50m_airports WHERE SCALERANK <= 4 ORDER BY SCALERANK" ne_50m_airports.shp ne_10m_airports.shp
#110m airports
ogr2ogr -overwrite -sql "SELECT * FROM ne_110m_airports WHERE SCALERANK <= 1 ORDER BY SCALERANK" ne_110m_airports.shp ne_10m_airports.shp
# PORTS
#50m ports
ogr2ogr -overwrite -sql "SELECT * FROM ne_50m_ports WHERE SCALERANK <= 4 ORDER BY SCALERANK" ne_50m_ports.shp ne_10m_ports.shp
#110m ports
ogr2ogr -overwrite -sql "SELECT * FROM ne_110m_ports WHERE SCALERANK <= 1 ORDER BY SCALERANK" ne_110m_ports.shp ne_10m_ports.shp

View File

@ -0,0 +1,59 @@
all: ne_10m_populated_places_simple.shp \
ne_50m_populated_places_simple.shp \
ne_110m_populated_places_simple.shp \
ne_50m_populated_places.shp \
ne_110m_populated_places.shp \
ne_50m_airports.shp \
ne_50m_ports.shp
# POPULATED PLACES
#10m simple- populated places
ne_10m_populated_places_simple.shp:
ogr2ogr -overwrite -sql "SELECT SCALERANK, NATSCALE, LABELRANK, FEATURECLA, NAME, NAMEPAR, NAMEALT, DIFFASCII, NAMEASCII, ADM0CAP, CAPALT, CAPIN, WORLDCITY, MEGACITY, SOV0NAME, SOV_A3, ADM0NAME, ADM0_A3, ADM1NAME, ISO_A2, NOTE, LATITUDE, LONGITUDE, CHANGED, NAMEDIFF, DIFFNOTE, POP_MAX, POP_MIN, POP_OTHER, GEONAMEID, MEGANAME, LS_NAME, LS_MATCH, CHECKME FROM ne_10m_populated_places WHERE natlscale >= 5 ORDER BY natlscale" ne_10m_populated_places_simple.shp ne_10m_populated_places.shp
#50m full - populated places
ne_50m_populated_places.shp:
# “SCALERANK” <= 4 Or "FEATURECLA" = 'Admin-0 capital' Or "FEATURECLA" = 'Admin-0 capital alt' Or "FEATURECLA" = 'Admin-0 region capital' Or "FEATURECLA" = 'Admin-1 region capital' Or "FEATURECLA" = 'Scientific station'
ogr2ogr -overwrite -sql "SELECT * FROM ne_10m_populated_places WHERE natlscale >= 5 ORDER BY natlscale" ne_50m_populated_places.shp ne_10m_populated_places.shp
ne_50m_populated_places_simple.shp:
#50m simple - populated places
ogr2ogr -overwrite -sql "SELECT SCALERANK, NATSCALE, LABELRANK, FEATURECLA, NAME, NAMEPAR, NAMEALT, DIFFASCII, NAMEASCII, ADM0CAP, CAPALT, CAPIN, WORLDCITY, MEGACITY, SOV0NAME, SOV_A3, ADM0NAME, ADM0_A3, ADM1NAME, ISO_A2, NOTE, LATITUDE, LONGITUDE, CHANGED, NAMEDIFF, DIFFNOTE, POP_MAX, POP_MIN, POP_OTHER, GEONAMEID, MEGANAME, LS_NAME, LS_MATCH, CHECKME FROM ne_10m_populated_places WHERE natlscale >= 5 ORDER BY natlscale" ne_50m_populated_places_simple.shp ne_10m_populated_places.shp
#110m full - populated places
ne_110m_populated_places.shp:
# “SCALERANK” <= 1 Or "FEATURECLA" = 'Admin-0 capital' Or "FEATURECLA" = 'Admin-0 capital alt'
ogr2ogr -overwrite -sql "SELECT * FROM ne_10m_populated_places WHERE natlscale >= 5 ORDER BY natlscale" ne_110m_populated_places.shp ne_10m_populated_places.shp
ne_110m_populated_places.shp:
#110m simple - populated places
ogr2ogr -overwrite -sql "SELECT SCALERANK, NATSCALE, LABELRANK, FEATURECLA, NAME, NAMEPAR, NAMEALT, DIFFASCII, NAMEASCII, ADM0CAP, CAPALT, CAPIN, WORLDCITY, MEGACITY, SOV0NAME, SOV_A3, ADM0NAME, ADM0_A3, ADM1NAME, ISO_A2, NOTE, LATITUDE, LONGITUDE, CHANGED, NAMEDIFF, DIFFNOTE, POP_MAX, POP_MIN, POP_OTHER, GEONAMEID, MEGANAME, LS_NAME, LS_MATCH, CHECKME FROM ne_10m_populated_places WHERE natlscale >= 5 ORDER BY natlscale" ne_110m_populated_places_simple.shp ne_10m_populated_places.shp
# AIRPORTS
#50m airports
ne_50m_airports.shp:
ogr2ogr -overwrite -sql "SELECT * FROM ne_50m_airports WHERE SCALERANK <= 4 ORDER BY SCALERANK" ne_50m_airports.shp ne_10m_airports.shp
# PORTS
#50m ports
ne_50m_ports.shp:
ogr2ogr -overwrite -sql "SELECT * FROM ne_50m_ports WHERE SCALERANK <= 4 ORDER BY SCALERANK" ne_50m_ports.shp ne_10m_ports.shp
clean:
rm -f ne_50m_populated_places.*
rm -f ne_110m_populated_places.*
rm -f ne_10m_populated_places_simple.*
rm -f ne_50m_populated_places_simple.*
rm -f ne_110m_populated_places_simple.*
rm -f ne_50m_airports.{shp, dbf, shx, prj}
rm -f ne_50m_ports.shp ne_50m_ports.dbf ne_50m_ports.shx ne_50m_ports.prj

View File

@ -0,0 +1,24 @@
#Makefile
* For auto-extracting the **50m** and **110m populated places** from the master 10m theme.
* For auto-extracting the **simplified versions** of the 10m, 50m, and 110m populated places from the master 10m theme.
* For auto-extracting the **50m airports** from the master 10m theme.
* For auto-extracting the **50m ports** from the master 10m theme.
#Usage
Make all
The following files being updated:
* ne_50m_populated_places
* ne_110m_populated_places
* ne_10m_populated_places_simple
* ne_50m_populated_places_simple
* ne_110m_populated_places_simple
* ne_50m_airports
* ne_50m_ports
To remove the generative output:
Make clean