Skip to content

Instantly share code, notes, and snippets.

@fgregg
Created August 30, 2012 19:00
Show Gist options
  • Save fgregg/3537693 to your computer and use it in GitHub Desktop.
Save fgregg/3537693 to your computer and use it in GitHub Desktop.
Extract shapes for pdf of map
# Requires pstoedit (http://www.pstoedit.net/) and gdal ( http://www.gdal.org/ )
# Convert PDF to DXF format, assign each color to a different layer, and only write the layer that corresponds to
# hex color #B8B9BA
pstoedit -f 'dxf: -ctl -dumplayernames -layers CB8-B9-BA' map_housing_stock_north.pdf parcels.dxf
# Convert DXF to KML
ogr2ogr -f "KML" parcels.kml parcels.dxf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment