Skip to content

Instantly share code, notes, and snippets.

@david-murr
Last active March 9, 2021 20:03
Show Gist options
  • Select an option

  • Save david-murr/b7bb617a88ff9e7308b5bb090c19a0a8 to your computer and use it in GitHub Desktop.

Select an option

Save david-murr/b7bb617a88ff9e7308b5bb090c19a0a8 to your computer and use it in GitHub Desktop.
http://gis.stackexchange.com/questions/118682/removing-empty-geometry-with-ogr2ogr
ogr2ogr -f "ESRI Shapefile" -dialect sqlite -sql "select * from input where geometry is not null" output.shp input.shp
ogr2ogr -sql "select inshape.*, joincsv.* from inshape left join 'joincsv.csv'.joincsv on inshape.GISJOIN = joincsv.GISJOIN" shape_join.shp inshape.shp
Joining csv to shapefile
http://gis.stackexchange.com/questions/95746/join-a-csv-file-to-shapefile-using-gdal-ogr
http://www.gdal.org/ogr_sql.html
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment