Re: [gdal-dev] geojson to shp and vice versa

2019-12-01 Thread Kristijan Cindrić
Thanks Richard, in the end I opted for a client side solution ( https://github.com/calvinmetcalf/shapefile-js) which handles geometry collections with multiple geometry types great. Chtis ned, 1. pro 2019. u 03:36 Richard Greenwood napisao je: > I don't know anything about iterating thru a .zi

Re: [gdal-dev] geojson to shp and vice versa

2019-11-30 Thread Richard Greenwood
I don't know anything about iterating thru a .zip file, but just in case you aren't already familiar with it, ogr2ogr has -sql and -where options that can be used to filter geometry types. So if you have different geometry type in a single source file you can use for example: -where "OGR_GEOMETR

Re: [gdal-dev] geojson to shp and vice versa

2019-11-29 Thread Kristijan Cindrić
Thanks for the prompt answers! Ok, it's clear now on what's the problem here. Is there a way I can iterate through a .zip file containing individual .shp files, each file with its own geometry type (point, line, polygon), using ogre.adc4gis.com API? I could then append each feature to a geojson fea

Re: [gdal-dev] geojson to shp and vice versa

2019-11-29 Thread jratike80
Hi, You just can't save lines and polygons into same shapefile. Read https://www.esri.com/library/whitepapers/pdfs/shapefile.pdf "All the non-Null shapes in a shapefile are required to be of the same shape type." -Jukka Rahkonen- Kristijan Cindrić wrote > Dear all, > > I have a headache induc

Re: [gdal-dev] geojson to shp and vice versa

2019-11-29 Thread Hugues François
2019 08:58:11 Objet: [gdal-dev] geojson to shp and vice versa Dear all, I have a headache inducing problem. Whenever I try to convert a GeoJSON feature collection which contains multiple different geometry shapes (i.e. polygon, linestring and point) I get this type of error: "ERRO

[gdal-dev] geojson to shp and vice versa

2019-11-28 Thread Kristijan Cindrić
Dear all, I have a headache inducing problem. Whenever I try to convert a GeoJSON feature collection which contains multiple different geometry shapes (i.e. polygon, linestring and point) I get this type of error: "ERROR 1: Attempt to write non-polygon (LINESTRING) geometry to POLYGON type shape