<div dir="ltr">
<p class="p1"><span class="s1">Hi all,</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">I’m curious if anyone has ideas or advice on how to use a streaming parser in the OGR GeoJSON driver.</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">My use-case is that I need to convert arbitrarily-sized streams of geojson into other formats (e.g. Csv, shapefile, kml, etc). </span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">My current strategy is to first partition the GeoJSON into a VRT file and then call OGR. This works for arbitrary sized streams, but it’s inefficient because the process is blocked until the entire VRT is ready. You can see my implementation here: <a href="https://github.com/koopjs/GeoXForm"><span class="s2">https://github.com/koopjs/GeoXForm</span></a>.</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">I noticed that there exists at least one C library for parsing son streams: <a href="https://github.com/lloyd/yajl"><span class="s2">https://github.com/lloyd/yajl</span></a>, but I do not know enough C++ (or C for that matter) to integrate it.</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">Has anyone considered this approach before? Any advice on how to implement it?</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">I would sincerely appreciate any help.</span></p>
<p class="p2"><span class="s1"></span><br></p>
<p class="p1"><span class="s1">Daniel Fenton</span></p></div>