I have a very big PNG (82500x40900) with more than 5000 polygons. I want to use gdal_polygonize but the geojson output shows that gdal_polygonizer stopped after 4770 polygons and the geojson isn't closed properly. It looks like this:
{
"type": "FeatureCollection",
"features": [
{ "type": "Feature", "properties": { "DN": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 26613.0, 3604.0 ], [ 26613.0, 3606.0 ], ... , [ 26613.0, 3604.0 ] ] ] } },
...
{ "type": "Feature", "properties": { "DN": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 67365.0, 38904.0 ], [ 67365.0, 38907.0 ], ... , [ 67365.0, 38904.0 ] ] ] } }
As you can see the "features"-array is not closed and the file isn't cloes either. A ]} is missing at the end. I guess that happened because gdal/python could not handle the size of the png or the number of the polygons? How can I fix this? Maybe by editin the pythonscript?
Aucun commentaire:
Enregistrer un commentaire