Skip to content

I/O

geoarrow.rust.core

from_ewkb builtin

from_ewkb(input: ArrowArrayExportable) -> PointArray | LineStringArray | PolygonArray | MultiPointArray | MultiLineStringArray | MultiPolygonArray | MixedGeometryArray | GeometryCollectionArray

Parse an Arrow BinaryArray from EWKB to its GeoArrow-native counterpart.

Parameters:

Returns:

from_wkb builtin

from_wkb(input: ArrowArrayExportable) -> PointArray | LineStringArray | PolygonArray | MultiPointArray | MultiLineStringArray | MultiPolygonArray | MixedGeometryArray | GeometryCollectionArray

Parse an Arrow BinaryArray from WKB to its GeoArrow-native counterpart.

This expects ISO-formatted WKB geometries.

Parameters:

Returns:

from_wkt builtin

from_wkt(input: ArrowArrayExportable) -> PointArray | LineStringArray | PolygonArray | MultiPointArray | MultiLineStringArray | MultiPolygonArray | MixedGeometryArray | GeometryCollectionArray

Parse an Arrow StringArray from WKT to its GeoArrow-native counterpart.

Parameters:

Returns:

to_wkb builtin

to_wkb(input: ArrowArrayExportable) -> WKBArray

Encode a GeoArrow-native geometry array to a WKBArray, holding ISO-formatted WKB geometries.

Parameters:

Returns:

  • WKBArray

    An array with WKB-formatted geometries

read_csv builtin

read_csv(path: str, geometry_column_name: str, batch_size: Optional[int] = None) -> GeoTable

Read a CSV file from a path on disk into a GeoTable.

Parameters:

  • path (str) –

    the path to the file

  • geometry_column_name (str) –

    the name of the geometry column within the CSV.

  • batch_size (Optional[int], default: None ) –

    the number of rows to include in each internal batch of the table.

Returns:

read_flatgeobuf builtin

read_flatgeobuf(path: str, batch_size: Optional[int] = None) -> GeoTable

Read a FlatGeobuf file from a path on disk into a GeoTable.

Parameters:

  • path (str) –

    the path to the file

Returns:

  • GeoTable

    Table from FlatGeobuf file.

read_geojson builtin

read_geojson(path: str, batch_size: Optional[int] = None) -> GeoTable

Read a GeoJSON file from a path on disk into a GeoTable.

Parameters:

  • path (str) –

    the path to the file

  • batch_size (Optional[int], default: None ) –

    the number of rows to include in each internal batch of the table.

Returns:

read_geojson_lines builtin

read_geojson_lines(path: str, batch_size: Optional[int] = None) -> GeoTable

Read a GeoJSON Lines file from a path on disk into a GeoTable.

This expects a GeoJSON Feature on each line of a text file, with a newline character separating each Feature.

Parameters:

  • path (str) –

    the path to the file

Returns:

read_parquet builtin

read_parquet(path: str, batch_size: Optional[int] = None) -> GeoTable

Read a GeoParquet file from a path on disk into a GeoTable.

Parameters:

  • path (str) –

    the path to the file

Returns:

  • GeoTable

    Table from GeoParquet file.

write_csv builtin

write_csv(table: ArrowStreamExportable, path: str) -> GeoTable

Write a GeoTable to a CSV file on disk.

Parameters:

Returns:

write_flatgeobuf builtin

write_flatgeobuf(table: ArrowStreamExportable, path: str, *, write_index: bool = True) -> GeoTable

Write a GeoTable to a FlatGeobuf file on disk.

Parameters:

Returns:

write_geojson builtin

write_geojson(table: ArrowStreamExportable, path: str) -> GeoTable

Write a GeoTable to a GeoJSON file on disk.

Note that the GeoJSON specification mandates coordinates to be in the WGS84 (EPSG:4326) coordinate system, but this function will not automatically reproject into WGS84 for you.

Parameters:

Returns: