[gdal-dev] Large GeoJSONs and aborting file opening

Mike Flannigan mflan at mflan.com
Thu Jul 29 06:49:30 PDT 2021


I would like to hear more about large GeoJSON files.
How large are they?

My GeoJSON files contain linear features only.  My
largest one is 50.2 MB with 1,230,000 newlines in it.
Next biggest one is 12 MB with 280,000 newlines.  These
and about 140 other geojsons are open in the same project
and I have no problems.  In fact I converted from
SHP to geojson 2 years ago because I used to have problems
with SHP linear files.

I use QGIS 3.16.8 on Linux Mint.


Mike


On 7/28/21 2:36 PM, gdal-dev-request at lists.osgeo.org wrote:
> Date: Wed, 28 Jul 2021 12:22:12 -0700
> From: Simon Eves<simon.eves at omnisci.com>
> To:gdal-dev at lists.osgeo.org
> Subject: [gdal-dev] Large GeoJSONs and aborting file opening
> Message-ID:
> 	<CAJf0KTRsaskSOsPv8tbA+iTB+TqL_ui5y4n05WGLDw_3guRs4w at mail.gmail.com>
> Content-Type: text/plain; charset="utf-8"
>
> Dear All,
>
> I am aware that some improvements were made in the 2.3 timeframe with
> regards to dealing with large GeoJSON files, although even in 3.2, it's
> still very slow and memory hungry.
>
> Our system allows for aborting imports, but this only works reliably once
> it has actually got to the stage of reading features from the file. With
> the GeoJSON, it just sits in the GDALOpenEx call for ages.
>
> My question, therefore, is whether it might be practical to run the
> GDALOpenEx in a separate thread with a future to return the resulting
> handle, such that it could be monitored and killed if necessary?
>
> Mainly I would be concerned that killing the thread might trash some global
> GDAL state that might then not be recoverable, or that the open relies on
> some TLS for the process thread and therefore might not work properly.
>
> We're going to try it anyway, but opinions welcomed, thanks!
>
> Simon




More information about the gdal-dev mailing list