On 29/02/2020 20:34, Francesco Bartoli wrote:
Thanks Even, it works but I have strange result with the size value. I wouldn’t have been expected the exception from this test:

$ OGR_GEOJSON_MAX_OBJ_SIZE=500MB ogr2ogr -f "GeoJSON" indonesia.geojson "WFS:geonode.wfp.org/geoserver/wfs?request=GetFeature&typename=geonode:glb_bnd_adm0_1&outputformat=json" -where “adm0_id=‘272’"

indonesia.geojson is around 35MB so the exception shouldn’t raise if OGR_GEOJSON_MAX_OBJ_SIZE=50 AFAIK:


OGR_GEOJSON_MAX_OBJ_SIZE is not a limit on the file size, but on the maximum memory allocation for a single GeoJSON feature which is estimated before the feature is read. As country borders are usually a single GeoJSON feature, a country with a complex coastline is the typical case where you need larger features.


--
Momtchil Momtchev <momtc...@momtchev.com>

_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to