<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
</head>
<body>
<p><br>
</p>
<div class="moz-cite-prefix">On 29/02/2020 20:34, Francesco Bartoli
wrote:<br>
</div>
<blockquote type="cite"
cite="mid:34cd4704-d2e1-4c96-b707-5a60029cb91b@Spark">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
<title></title>
<div name="messageBodySection">
<div dir="auto">Thanks Even, it works but I have strange result
with the size value. I wouldn’t have been expected the
exception from this test:
<div dir="auto"><br>
</div>
<div dir="auto">$ <span style="color: var(--textColor);
background-color: var(--backgroundColor);"><font
face="Fira Code, monospace">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’"</font></span><span style="color:
var(--textColor); background-color:
var(--backgroundColor);"> </span><br>
</div>
<div dir="auto"><span style="color: var(--textColor);
background-color: var(--backgroundColor);"><br>
</span></div>
<div dir="auto">indonesia.geojson is around 35MB so the
exception shouldn’t raise if OGR_GEOJSON_MAX_OBJ_SIZE=50
AFAIK:</div>
<div dir="auto"><br>
</div>
</div>
</div>
</blockquote>
<p><br>
</p>
<p>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.<br>
</p>
<p><br>
</p>
<pre class="moz-signature" cols="72">--
Momtchil Momtchev <a class="moz-txt-link-rfc2396E" href="mailto:momtchil@momtchev.com"><momtchil@momtchev.com></a>
</pre>
</body>
</html>