Skip to content

Instantly share code, notes, and snippets.

@jgilfillan
Created October 1, 2014 10:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jgilfillan/ade859f8ccf23eadc10b to your computer and use it in GitHub Desktop.
Save jgilfillan/ade859f8ccf23eadc10b to your computer and use it in GitHub Desktop.
use mapshaper to add extra properties, simplify the file and output to topojson format
# original shapefile from http://www.abs.gov.au/AUSSTATS/abs@.nsf/DetailsPage/1270.0.55.003July%202011
# Postal Areas ASGS Non ABS Structures Ed 2011 Digital Boundaries in ESRI Shapefile Format
# -i specifies input file
# -join specifies csv to join and join key
# -simplify speficies simplification percentage
# -o specifies outfile file and format
# full set of command lines options here: https://github.com/mbloch/mapshaper/wiki/Command-Reference
# ^ character allows command to span multiple lines
mapshaper -i "C:\Users\jgilf_000\Downloads\1270055003_poa_2011_aust_shape\POA_2011_AUST.shp" ^
-join "C:\Users\jgilf_000\Downloads\Untitled spreadsheet - Sheet1.csv" keys=POA_CODE,pc ^
-simplify 5% ^
-o "C:\Users\jgilf_000\Downloads\1270055003_poa_2011_aust_shape\output2.json" force format=topojson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment