I have a geojson-file (geojsonfile.geojson) with points, lines and polygons.
I would like to convert the geojson-file to 3 shapefiles (points, lines and polygons) and keep all the attributes.
Therefore i used ogr2ogr, see this topic:
with the following commands:
ogr2ogr -nlt POINT -skipfailures points.shp geojsonfile.geojson OGRGeoJSON ogr2ogr -nlt LINESTRING -skipfailures linestrings.shp geojsonfile.geojson OGRGeoJSON ogr2ogr -nlt POLYGON -skipfailures polygons.shp geojsonfile.geojson OGRGeoJSON
the exported point shapefiles show the exact same amount of features (2142 in shapefile, 2142 in geojson), but the linestring and polygon feature count is different (linestring: 511 in shapefile, 132 in geojson line, polygon: 426 in shapefile, 379 in geojson polygon). The additional features are also visible.
How can a conversion from geojson to shapefile lead to additional features? Also some errors have been reported while converting, but I guess this is because I forced the SHP geometry type (explained in other topic)?