Created
September 4, 2017 21:10
-
-
Save BobHarper1/084ff08f928c5670797f287693d65790 to your computer and use it in GitHub Desktop.
makefile to create land-area clipped adminsitrative boundaries
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
## download makefile to an empty directory | |
## create a directory within that called /output | |
## run 'make wards2012.shp' and 'make wards2012.geojson' | |
## the shapefile/geojson file will appear in /output | |
wards.zip: | |
curl -o 'wards.zip' 'http://osni-spatial-ni.opendata.arcgis.com/datasets/55cd419b2d2144de9565c9b8f73a226d_0.zip' | |
curl -o 'ni_outline.zip' 'http://osni-spatial-ni.opendata.arcgis.com/datasets/d9dfdaf77847401e81efc9471dcd09e1_0.zip' | |
OSNI_Open_Data_Largescale_Boundaries__NI_Outline.shp: ni_outline.zip | |
unzip ni_outline.zip | |
touch OSNI_Open_Data_Largescale_Boundaries__NI_Outline.shp | |
OSNI_Open_Data_Largescale_Boundaries_Wards_2012.shp: wards.zip | |
unzip wards.zip | |
touch OSNI_Open_Data_Largescale_Boundaries_Wards_2012.shp | |
wards2012.shp: OSNI_Open_Data_Largescale_Boundaries_Wards_2012.shp OSNI_Open_Data_Largescale_Boundaries__NI_Outline.shp | |
mapshaper *Wards_2012.shp -clip remove-slivers *NI_Outline.shp -o output/wards2012.shp | |
wards2012.geojson: OSNI_Open_Data_Largescale_Boundaries_Wards_2012.shp OSNI_Open_Data_Largescale_Boundaries__NI_Outline.shp | |
mapshaper *Wards_2012.shp -clip remove-slivers *NI_Outline.shp -o format=geojson output/wards2012.geojson |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment