Anyone knows if is there any way to export a polygon layer in geojson, as multipolygon?
I have a multipolygon shapefile. But there are single and multi polygons.
When I export it to geojson, I got both structures: Polygons with single feature, are exported as polygons (with 3 arrays)
"type": "Polygon",
"coordinates": [
[ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],
[ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]
]
And some polygons formed by several features, are exported as multipolygon, with four arrays:
"type": "MultiPolygon",
"coordinates": [
[
[ [102.0, 2.0], [103.0, 2.0], [103.0, 3.0], [102.0, 3.0], [102.0, 2.0] ]
],
[
[ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ],
[ [100.2, 0.2], [100.8, 0.2], [100.8, 0.8], [100.2, 0.8], [100.2, 0.2] ]
]
]
What I need is to get a geojson that shows polygons and multipolygons with the second structure (four arrays)
Anyone could tell me if it is possible, or any clue on how to do it?