Expression Shorthand
When a function only involves one geometry column, such as area
or buffer
, it is possible to call that function directly from the polars_st
module, allowing us to write: gdf.select(st.area())
instead of gdf.select(st.geom().st.area())
.
The following functions can be used that way:
polars_st.geometry_type #
geometry_type(*columns: str) -> Expr
This function is syntactic sugar for st.geom(columns).st.geometry_type()
.
polars_st.dimensions #
dimensions(*columns: str) -> Expr
This function is syntactic sugar for st.geom(columns).st.dimensions()
.
polars_st.coordinate_dimension #
coordinate_dimension(*columns: str) -> Expr
This function is syntactic sugar for st.geom(columns).st.coordinate_dimension()
.
polars_st.area #
area(*columns: str) -> Expr
This function is syntactic sugar for st.geom(columns).st.area()
.
polars_st.bounds #
bounds(*columns: str) -> Expr
This function is syntactic sugar for st.geom(columns).st.bounds()
.
polars_st.length #
length(*columns: str) -> Expr
This function is syntactic sugar for st.geom(columns).st.length()
.
polars_st.minimum_clearance #
minimum_clearance(*columns: str) -> Expr
This function is syntactic sugar for st.geom(columns).st.minimum_clearance()
.
polars_st.x #
x(*columns: str) -> Expr
This function is syntactic sugar for st.geom(columns).st.x()
.
polars_st.y #
y(*columns: str) -> Expr
This function is syntactic sugar for st.geom(columns).st.y()
.
polars_st.z #
z(*columns: str) -> Expr
This function is syntactic sugar for st.geom(columns).st.z()
.
polars_st.m #
m(*columns: str) -> Expr
This function is syntactic sugar for st.geom(columns).st.m()
.
polars_st.count_coordinates #
count_coordinates(*columns: str) -> Expr
This function is syntactic sugar for st.geom(columns).st.count_coordinates()
.
polars_st.coordinates #
This function is syntactic sugar for st.geom(columns).st.coordinates(...)
.
polars_st.count_geometries #
count_geometries(*columns: str) -> Expr
This function is syntactic sugar for st.geom(columns).st.count_geometries()
.
polars_st.get_geometry #
get_geometry(*columns: str, index: IntoIntegerExpr) -> GeoExpr
This function is syntactic sugar for st.geom(columns).st.get_geometry(...)
.
polars_st.count_points #
count_points(*columns: str) -> Expr
This function is syntactic sugar for st.geom(columns).st.count_points()
.
polars_st.get_point #
get_point(*columns: str, index: IntoIntegerExpr) -> GeoExpr
This function is syntactic sugar for st.geom(columns).st.get_point(...)
.
polars_st.exterior_ring #
This function is syntactic sugar for st.geom(columns).st.exterior_ring()
.
polars_st.interior_rings #
interior_rings(*columns: str) -> Expr
This function is syntactic sugar for st.geom(columns).st.interior_rings()
.
polars_st.count_interior_rings #
count_interior_rings(*columns: str) -> Expr
This function is syntactic sugar for st.geom(columns).st.count_interior_rings()
.
polars_st.get_interior_ring #
get_interior_ring(*columns: str, index: IntoIntegerExpr) -> GeoExpr
This function is syntactic sugar for st.geom(columns).st.get_interior_ring(...)
.
polars_st.parts #
parts(*columns: str) -> Expr
This function is syntactic sugar for st.geom(columns).st.parts()
.
polars_st.precision #
precision(*columns: str) -> Expr
This function is syntactic sugar for st.geom(columns).st.precision()
.
polars_st.set_precision #
set_precision(
*columns: str,
grid_size: IntoDecimalExpr,
mode: Literal["valid_output", "no_topo", "keep_collapsed"] = "valid_output"
) -> GeoExpr
This function is syntactic sugar for st.geom(columns).st.set_precision(...)
.
polars_st.srid #
srid(*columns: str) -> Expr
This function is syntactic sugar for st.geom(columns).st.srid()
.
polars_st.set_srid #
set_srid(*columns: str, srid: IntoIntegerExpr) -> GeoExpr
This function is syntactic sugar for st.geom(columns).st.set_srid(...)
.
polars_st.to_srid #
This function is syntactic sugar for st.geom(columns).st.to_srid(...)
.
polars_st.to_wkt #
to_wkt(
*columns: str,
rounding_precision: int | None = 6,
trim: bool = True,
output_dimension: Literal[2, 3, 4] = 3,
old_3d: bool = False
) -> Expr
This function is syntactic sugar for st.geom(columns).st.to_wkt(...)
.
polars_st.to_ewkt #
to_ewkt(
*columns: str,
rounding_precision: int | None = 6,
trim: bool = True,
output_dimension: Literal[2, 3, 4] = 3,
old_3d: bool = False
) -> Expr
This function is syntactic sugar for st.geom(columns).st.to_ewkt(...)
.
polars_st.to_wkb #
to_wkb(
*columns: str,
output_dimension: Literal[2, 3, 4] = 3,
byte_order: Literal[0, 1] | None = None,
include_srid: bool = False
) -> Expr
This function is syntactic sugar for st.geom(columns).st.to_wkb(...)
.
polars_st.to_geojson #
This function is syntactic sugar for st.geom(columns).st.to_geojson(...)
.
polars_st.to_shapely #
to_shapely(*columns: str) -> Expr
This function is syntactic sugar for st.geom(columns).st.to_shapely()
.
polars_st.to_dict #
to_dict(*columns: str) -> Expr
This function is syntactic sugar for st.geom(columns).st.to_dict()
.
polars_st.has_z #
has_z(*columns: str) -> Expr
This function is syntactic sugar for st.geom(columns).st.has_z()
.
polars_st.has_m #
has_m(*columns: str) -> Expr
This function is syntactic sugar for st.geom(columns).st.has_m()
.
polars_st.is_ccw #
is_ccw(*columns: str) -> Expr
This function is syntactic sugar for st.geom(columns).st.is_ccw()
.
polars_st.is_closed #
is_closed(*columns: str) -> Expr
This function is syntactic sugar for st.geom(columns).st.is_closed()
.
polars_st.is_empty #
is_empty(*columns: str) -> Expr
This function is syntactic sugar for st.geom(columns).st.is_empty()
.
polars_st.is_ring #
is_ring(*columns: str) -> Expr
This function is syntactic sugar for st.geom(columns).st.is_ring()
.
polars_st.is_simple #
is_simple(*columns: str) -> Expr
This function is syntactic sugar for st.geom(columns).st.is_simple()
.
polars_st.is_valid #
is_valid(*columns: str) -> Expr
This function is syntactic sugar for st.geom(columns).st.is_valid()
.
polars_st.is_valid_reason #
is_valid_reason(*columns: str) -> Expr
This function is syntactic sugar for st.geom(columns).st.is_valid_reason()
.
polars_st.unary_union #
This function is syntactic sugar for st.geom(columns).st.unary_union(...)
.
polars_st.coverage_union #
This function is syntactic sugar for st.geom(columns).st.coverage_union()
.
polars_st.boundary #
This function is syntactic sugar for st.geom(columns).st.boundary()
.
polars_st.buffer #
buffer(
*columns: str,
distance: IntoDecimalExpr,
quad_segs: int = 8,
cap_style: Literal["round", "square", "flat"] = "round",
join_style: Literal["round", "mitre", "bevel"] = "round",
mitre_limit: float = 5.0,
single_sided: bool = False
) -> GeoExpr
This function is syntactic sugar for st.geom(columns).st.buffer(...)
.
polars_st.offset_curve #
offset_curve(
*columns: str,
distance: IntoDecimalExpr,
quad_segs: int = 8,
join_style: Literal["round", "mitre", "bevel"] = "round",
mitre_limit: float = 5.0
) -> GeoExpr
This function is syntactic sugar for st.geom(columns).st.offset_curve(...)
.
polars_st.centroid #
This function is syntactic sugar for st.geom(columns).st.centroid()
.
polars_st.clip_by_rect #
This function is syntactic sugar for st.geom(columns).st.clip_by_rect()
.
polars_st.convex_hull #
This function is syntactic sugar for st.geom(columns).st.convex_hull()
.
polars_st.concave_hull #
This function is syntactic sugar for st.geom(columns).st.concave_hull(...)
.
polars_st.segmentize #
segmentize(*columns: str, max_segment_length: IntoDecimalExpr) -> GeoExpr
This function is syntactic sugar for st.geom(columns).st.segmentize(max_segment_length)
.
polars_st.envelope #
This function is syntactic sugar for st.geom(columns).st.envelope()
.
polars_st.extract_unique_points #
This function is syntactic sugar for st.geom(columns).st.extract_unique_points()
.
polars_st.build_area #
This function is syntactic sugar for st.geom(columns).st.build_area()
.
polars_st.make_valid #
This function is syntactic sugar for st.geom(columns).st.make_valid()
.
polars_st.normalize #
This function is syntactic sugar for st.geom(columns).st.normalize()
.
polars_st.point_on_surface #
This function is syntactic sugar for st.geom(columns).st.point_on_surface()
.
polars_st.remove_repeated_points #
remove_repeated_points(
*columns: str, tolerance: IntoDecimalExpr = 0.0
) -> GeoExpr
This function is syntactic sugar for st.geom(columns).st.remove_repeated_points(...)
.
polars_st.simplify #
simplify(
*columns: str, tolerance: IntoDecimalExpr, preserve_topology: bool = True
) -> GeoExpr
This function is syntactic sugar for st.geom(columns).st.simplify(...)
.
polars_st.flip_coordinates #
This function is syntactic sugar for st.geom(columns).st.flip_coordinates()
.
polars_st.minimum_rotated_rectangle #
This function is syntactic sugar for st.geom(columns).st.minimum_rotated_rectangle()
.
polars_st.affine_transform #
affine_transform(
*columns: str, matrix: IntoExprColumn | Sequence[float]
) -> GeoExpr
This function is syntactic sugar for st.geom(columns).st.affine_transform(...)
.
polars_st.translate #
translate(
*columns: str,
x: IntoDecimalExpr = 0.0,
y: IntoDecimalExpr = 0.0,
z: IntoDecimalExpr = 0.0
) -> GeoExpr
This function is syntactic sugar for st.geom(columns).st.translate(...)
.
polars_st.rotate #
rotate(
*columns: str,
angle: IntoDecimalExpr,
origin: (
Literal["center", "centroid"] | Sequence[float] | Expr | Series
) = "center"
) -> GeoExpr
This function is syntactic sugar for st.geom(columns).st.rotate(...)
.
polars_st.scale #
scale(
*columns: str,
x: IntoDecimalExpr = 1.0,
y: IntoDecimalExpr = 1.0,
z: IntoDecimalExpr = 1.0,
origin: (
Literal["center", "centroid"] | Sequence[float] | Expr | Series
) = "center"
) -> GeoExpr
This function is syntactic sugar for st.geom(columns).st.scale(...)
.
polars_st.interpolate #
interpolate(
*columns: str, distance: IntoDecimalExpr, normalized: bool = False
) -> GeoExpr
This function is syntactic sugar for st.geom(columns).st.interpolate()
.
polars_st.line_merge #
This function is syntactic sugar for st.geom(columns).st.line_merge()
.
polars_st.total_bounds #
total_bounds(*columns: str) -> Expr
This function is syntactic sugar for st.geom(columns).st.total_bounds()
.
polars_st.multipoint #
This function is syntactic sugar for st.geom(columns).st.multipoint()
.
polars_st.multilinestring #
This function is syntactic sugar for st.geom(columns).st.multilinestring()
.
polars_st.multipolygon #
This function is syntactic sugar for st.geom(columns).st.multipolygon()
.
polars_st.geometrycollection #
This function is syntactic sugar for st.geom(columns).st.geometrycollection()
.
polars_st.collect #
This function is syntactic sugar for st.geom(columns).st.geometrycollection()
.
polars_st.union_all #
This function is syntactic sugar for st.geom(columns).st.union_all(...)
.
polars_st.coverage_union_all #
This function is syntactic sugar for st.geom(columns).st.coverage_union_all()
.
polars_st.intersection_all #
This function is syntactic sugar for st.geom(columns).st.intersection_all()
.
polars_st.difference_all #
This function is syntactic sugar for st.geom(columns).st.difference_all(...)
.
polars_st.symmetric_difference_all #
This function is syntactic sugar for st.geom(columns).st.symmetric_difference_all(...)
.
polars_st.polygonize #
This function is syntactic sugar for st.geom(columns).st.polygonize()
.