client.read_geojson

client.read_geojson(con, urls)

Relation over several GeoJSON files, one row per feature.

Parameters

Name Type Description Default
con duckdb.DuckDBPyConnection See connect. required
urls list of str Links of the files. required

Returns

Name Type Description
duckdb.DuckDBPyRelation The properties of the features as columns, and a geometry column.

Raises

Name Type Description
OSError If a file does not exist.

Notes

A file is a single JSON object (FeatureCollection), so DuckDB’s maximum_object_size must exceed the size of the largest file. It is set from the actual sizes (HEAD requests): DuckDB allocates buffers of about twice this size, so a fixed large value (e.g. 2 GB) runs out of memory on small machines and containers.

Retour au sommet