GeoSeries.hilbert_distance(total_bounds=None, level=16)#

Calculate the distance along a Hilbert curve.

The distances are calculated for the midpoints of the geometries in the GeoDataFrame, and using the total bounds of the GeoDataFrame.

The Hilbert distance can be used to spatially partition Dask-GeoPandas objects, by mapping two dimensional geometries along the Hilbert curve.

total_bounds4-element array, optional

The spatial extent in which the curve is constructed (used to rescale the geometry midpoints). By default, the total bounds of the full dask GeoDataFrame will be computed (from the spatial partitions, if available, otherwise computed from the full dataframe). If known, you can pass the total bounds to avoid this extra computation.

levelint (1 - 16), default 16

Determines the precision of the curve (points on the curve will have coordinates in the range [0, 2^level - 1]).


Series containing distances for each partition