GeoTable¶
geoarrow.rust.core ¶
GeoTable ¶
A spatially-enabled table.
This is a table, or DataFrame
, consisting of named columns with the same length. One of these columns contains a chunked geometry array.
This is similar to a GeoPandas GeoDataFrame
.
geometry ¶
geometry: ChunkedPointArray | ChunkedLineStringArray | ChunkedPolygonArray | ChunkedMultiPointArray | ChunkedMultiLineStringArray | ChunkedMultiPolygonArray | ChunkedMixedGeometryArray | ChunkedGeometryCollectionArray = <attribute 'geometry' of 'geoarrow.rust.core._rust.GeoTable' objects>
Access the geometry column of this table
Returns:
-
ChunkedPointArray | ChunkedLineStringArray | ChunkedPolygonArray | ChunkedMultiPointArray | ChunkedMultiLineStringArray | ChunkedMultiPolygonArray | ChunkedMixedGeometryArray | ChunkedGeometryCollectionArray
–A chunked geometry array
num_columns ¶
num_columns: int = <attribute 'num_columns' of 'geoarrow.rust.core._rust.GeoTable' objects>
Number of columns in this table.
__arrow_c_stream__
method descriptor
¶
__arrow_c_stream__(_requested_schema=None) -> object
An implementation of the Arrow PyCapsule Interface. This dunder method should not be called directly, but enables zero-copy data transfer to other Python libraries that understand Arrow memory.
For example, you can call pyarrow.table()
to convert this array
into a pyarrow table, without copying memory.
explode
method descriptor
¶
explode() -> Self
from_arrow
builtin
¶
from_arrow(input: ArrowStreamExportable) -> Self
Construct this object from existing Arrow data
Parameters:
-
input
(ArrowStreamExportable
) –Arrow array to use for constructing this object
Returns:
-
Self
–Self
from_geopandas
builtin
¶
from_geopandas(input: gpd.GeoDataFrame) -> Self
Create a GeoArrow Table from a GeoPandas GeoDataFrame.
Notes:¶
- Currently this will always generate a non-chunked GeoArrow array. This is partly because pyarrow.Table.from_pandas always creates a single batch.
- This requires
pyarrow
version 14 or later.
Parameters:
-
input
(GeoDataFrame
) –
Returns:
-
Self
–A GeoArrow Table
to_geopandas
method descriptor
¶
to_geopandas() -> gpd.GeoDataFrame
Convert this GeoArrow Table to a GeoPandas GeoDataFrame.
Notes:¶
- This requires [
pyarrow
][pyarrow] version 14 or later.
Returns:
-
GeoDataFrame
–the converted GeoDataFrame