Last active
February 19, 2016 17:24
-
-
Save JamesHarrison/36ae52f7846eb16e8b80 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Set PGPASSWORD envvar if you don't want to be typing in your password all day | |
for tile in {TV,TR,TQ,TM,TL,TG,TF,TA,SZ,SY,SX,SW,SV,SU,ST,SS,SR,SP,SO,SN,SM,SK,SJ,SH,SE,SD,OV,NZ,NY,NX,NW,NU,NT,NS,NR,NO,NN,NM,NL,NK,NJ,NH,NG,NF,ND,NC,NB,NA,HZ,HY,HX,HW,HU,HT,HP} | |
do | |
for layer in {Building,ElectricityTransmissionLine,Foreshore,FunctionalSite,Glasshouse,ImportantBuilding,MotorwayJunction,NamedPlace,RailwayStation,RailwayTrack,RailwayTunnel,Road,RoadTunnel,Roundabout,SurfaceWater_Area,SurfaceWater_Line,TidalBoundary,TidalWater_Line,Woodland} | |
do | |
shp2pgsql -s 27700 -p -I "OSOpenMapLocal (ESRI Shape File) $tile/data/${tile}_${layer}.shp" "OSOML_$layer" | psql -h your-host -U username -d database | |
done | |
done |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# Set PGPASSWORD envvar if you don't want to be typing in your password all day | |
for tile in {TV,TR,TQ,TM,TL,TG,TF,TA,SZ,SY,SX,SW,SV,SU,ST,SS,SR,SP,SO,SN,SM,SK,SJ,SH,SE,SD,OV,NZ,NY,NX,NW,NU,NT,NS,NR,NO,NN,NM,NL,NK,NJ,NH,NG,NF,ND,NC,NB,NA,HZ,HY,HX,HW,HU,HT,HP} | |
do | |
for layer in {Building,ElectricityTransmissionLine,Foreshore,FunctionalSite,Glasshouse,ImportantBuilding,MotorwayJunction,NamedPlace,RailwayStation,RailwayTrack,RailwayTunnel,Road,RoadTunnel,Roundabout,SurfaceWater_Area,SurfaceWater_Line,TidalBoundary,TidalWater_Line,Woodland} | |
do | |
shp2pgsql -s 27700 -a "OSOpenMapLocal (ESRI Shape File) $tile/data/${tile}_${layer}.shp" "OSOML_$layer" | psql -h your-host -U username -d database | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This assumes you've downloaded all/subset of the mentioned OS OpenMap Local datasets as listed above.