Skip to main content
A pandas-on-Spark DataFrame for geospatial data with geometry columns. GeoDataFrame extends pyspark.pandas.DataFrame to provide geospatial operations using Apache Sedona’s spatial functions. It maintains compatibility with GeoPandas GeoDataFrame while operating on distributed datasets.

Parameters

dict, array-like, DataFrame, or GeoDataFrame
default:"None"
Data to initialize the GeoDataFrame. Can be a dictionary, array-like structure, pandas DataFrame, GeoPandas GeoDataFrame, or another GeoDataFrame.
Index or array - like
default:"None"
Index to use for the resulting frame.
Index or array - like
default:"None"
Column labels to use for the resulting frame.
default:"None"
default:"False"
Any | None
default:"None"
Column name, array of geometries, or GeoSeries to use as the active geometry. If None, will look for existing geometry columns.
Any | None
default:"None"
Coordinate Reference System for the geometries.
This implementation differs from GeoPandas in several ways:
  • Uses Spark for distributed processing
  • Geometries are stored in WKB (Well-Known Binary) format internally
  • Some methods may have different performance characteristics
  • Not all GeoPandas methods are implemented yet (see Sedona GeoPandas docs).
Performance Considerations:
  • Operations are distributed across Spark cluster
  • Avoid converting to GeoPandas (.to_geopandas()) on large datasets
  • Use .sample() for testing with large datasets
  • Spatial joins are optimized for distributed processing
Geometry Column Management:
  • Supports multiple geometry columns
  • One geometry column is designated as ‘active’ at a time
  • Active geometry is used for spatial operations and plotting
  • Use set_geometry() to change the active geometry column
See also
  • geopandas.GeoDataFrame: The GeoPandas equivalent
  • sedona.spark.geopandas.GeoSeries: Series with geometry data

Examples

Properties

Methods