GeoSeries#

Constructor#

GeoSeries(expr[, spatial_partitions])

Parallel GeoPandas GeoSeries

General methods and attributes#

GeoSeries.area

Returns a Series containing the area of each geometry in the GeoSeries expressed in the units of the CRS.

GeoSeries.boundary

Returns a GeoSeries of lower dimensional objects representing each geometry's set-theoretic boundary.

GeoSeries.bounds

Returns a DataFrame with columns minx, miny, maxx, maxy values containing the bounds for each geometry.

GeoSeries.total_bounds

Returns a tuple containing minx, miny, maxx, maxy values for the bounds of the series as a whole.

GeoSeries.length

Returns a Series containing the length of each geometry expressed in the units of the CRS.

GeoSeries.geom_type

Returns a Series of strings specifying the Geometry Type of each object.

GeoSeries.distance(other, *args, **kwargs)

Returns a Series containing the distance to aligned other.

GeoSeries.representative_point()

Returns a GeoSeries of (cheaply computed) points that are guaranteed to be within each geometry.

GeoSeries.exterior

Returns a GeoSeries of LinearRings representing the outer boundary of each polygon in the GeoSeries.

GeoSeries.interiors

Returns a Series of List representing the inner rings of each polygon in the GeoSeries.

GeoSeries.x

Return the x location of point geometries in a GeoSeries

GeoSeries.y

Return the y location of point geometries in a GeoSeries

GeoSeries.z

Return the z location of point geometries in a GeoSeries

Unary predicates#

GeoSeries.is_empty

Returns a Series of dtype('bool') with value True for empty geometries.

GeoSeries.is_ring

Returns a Series of dtype('bool') with value True for features that are closed.

GeoSeries.is_simple

Returns a Series of dtype('bool') with value True for geometries that do not cross themselves.

GeoSeries.is_valid

Returns a Series of dtype('bool') with value True for geometries that are valid.

GeoSeries.has_z

Returns a Series of dtype('bool') with value True for features that have a z-component.

Binary Predicates#

GeoSeries.contains(other, *args, **kwargs)

Returns a Series of dtype('bool') with value True for each aligned geometry that contains other.

GeoSeries.crosses(other, *args, **kwargs)

Returns a Series of dtype('bool') with value True for each aligned geometry that cross other.

GeoSeries.disjoint(other, *args, **kwargs)

Returns a Series of dtype('bool') with value True for each aligned geometry disjoint to other.

GeoSeries.geom_equals(other, *args, **kwargs)

Returns a Series of dtype('bool') with value True for each aligned geometry equal to other.

GeoSeries.geom_almost_equals(other, *args, ...)

Returns a Series of dtype('bool') with value True if each aligned geometry is approximately equal to other.

GeoSeries.geom_equals_exact(other, tolerance)

Return True for all geometries that equal aligned other to a given tolerance, else False.

GeoSeries.intersects(other, *args, **kwargs)

Returns a Series of dtype('bool') with value True for each aligned geometry that intersects other.

GeoSeries.overlaps(other, *args, **kwargs)

Returns True for all aligned geometries that overlap other, else False.

GeoSeries.touches(other, *args, **kwargs)

Returns a Series of dtype('bool') with value True for each aligned geometry that touches other.

GeoSeries.within(other, *args, **kwargs)

Returns a Series of dtype('bool') with value True for each aligned geometry that is within other.

GeoSeries.covers(other, *args, **kwargs)

Returns a Series of dtype('bool') with value True for each aligned geometry that is entirely covering other.

GeoSeries.covered_by(other, *args, **kwargs)

Returns a Series of dtype('bool') with value True for each aligned geometry that is entirely covered by other.

Set-theoretic Methods#

GeoSeries.difference(other, *args, **kwargs)

Returns a GeoSeries of the points in each aligned geometry that are not in other.

GeoSeries.intersection(other, *args, **kwargs)

Returns a GeoSeries of the intersection of points in each aligned geometry with other.

GeoSeries.symmetric_difference(other, *args, ...)

Returns a GeoSeries of the symmetric difference of points in each aligned geometry with other.

GeoSeries.union(other, *args, **kwargs)

Returns a GeoSeries of the union of points in each aligned geometry with other.

Constructive Methods and Attributes#

GeoSeries.buffer(distance[, resolution])

Returns a GeoSeries of geometries representing all points within a given distance of each geometric object.

GeoSeries.boundary

Returns a GeoSeries of lower dimensional objects representing each geometry's set-theoretic boundary.

GeoSeries.centroid

Returns a GeoSeries of points representing the centroid of each geometry.

GeoSeries.convex_hull

Returns a GeoSeries of geometries representing the convex hull of each geometry.

GeoSeries.envelope

Returns a GeoSeries of geometries representing the envelope of each geometry.

GeoSeries.simplify(*args, **kwargs)

Returns a GeoSeries containing a simplified representation of each geometry.

Affine transformations#

GeoSeries.affine_transform(matrix)

Return a GeoSeries with translated geometries.

GeoSeries.rotate(angle[, origin, use_radians])

Returns a GeoSeries with rotated geometries.

GeoSeries.scale([xfact, yfact, zfact, origin])

Returns a GeoSeries with scaled geometries.

GeoSeries.skew([xs, ys, origin, use_radians])

Returns a GeoSeries with skewed geometries.

GeoSeries.translate([xoff, yoff, zoff])

Returns a GeoSeries with translated geometries.

Aggregating and exploding#

GeoSeries.unary_union

Returns a geometry containing the union of all geometries in the GeoSeries.

GeoSeries.explode([ignore_index, index_parts])

Explode multi-part geometries into multiple single geometries.

Serialization / IO / conversion#

GeoSeries.to_wkb([hex])

Encode all geometry columns in the GeoDataFrame to WKB.

GeoSeries.to_wkt(**kwargs)

Encode all geometry columns in the GeoDataFrame to WKT.

Projection handling#

GeoSeries.crs

The Coordinate Reference System (CRS) represented as a pyproj.CRS object.

GeoSeries.set_crs(value[, allow_override])

Set the value of the crs on a new object

GeoSeries.to_crs([crs, epsg])

Returns a GeoSeries with all geometries transformed to a new coordinate reference system.

Missing values#

GeoSeries.fillna([value, axis])

Fill NA/NaN values using the specified method.

GeoSeries.isna()

Detect missing values.

Overlay operations#

GeoSeries.clip(mask[, keep_geom_type])

Clip points, lines, or polygon geometries to the mask extent.

Indexing#

GeoSeries.cx

Coordinate based indexer to select by intersection with bounding box.

Spatial partitioning#

GeoSeries.calculate_spatial_partitions()

Calculate spatial partitions

GeoSeries.hilbert_distance([total_bounds, level])

Calculate the distance along a Hilbert curve.

GeoSeries.morton_distance([total_bounds, level])

Calculate the distance of geometries along the Morton curve

GeoSeries.geohash([as_string, precision])

Calculate geohash based on the middle points of the geometry bounds for a given precision.

Methods of dask Series objects are also available, although not all are applicable to geometric objects and some may return a Series rather than a GeoSeries result when appropriate. The methods isna() and fillna() have been implemented specifically for GeoSeries and are expected to work correctly.