Last active
February 19, 2016 15:45
-
-
Save NTerpo/fec8dbab8e24318d72fa 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
- DL data as GeoJSON from ODS | |
- $ ogr2ogr -f "ESRI Shapefile" foo.shp foo.geojson OGRGeoJSON | |
- $ shp2pgsql foo.shp foo > foo.sql | |
- $ createdb gp | |
- $ psql -d gp | |
- gp=# CREATE EXTENSION postgis; | |
- $ psql -f foo.sql -d gp | |
- gp=# create table merged as | |
select id, ST_Union(geom) | |
from foo | |
group by id; | |
- gp=# \copy (select id, ST_AsGeoJSON(st_union) from merged) TO '~/Downloads/export.csv' CSV HEADER |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment