docs / api / pysoilmap / shapeops.rst

pysoilmap.shapeops

Operations on GeoDataFrame.

Functions

buffer(gdf[, distance])

Applies shape.buffer(...) to each shape in a GeoDataFrame and returns a new GeoDataFrame with replaced geometry.

clip(gdf, shape)

Clip a GeoDataFrame to the specified area.

find_polygon_at_point(gdf, points)

For each point in points look up the index of a containing polygon in a GeoDataFrame, or -1 if none is found.

is_point_in_bounds(bounds, points)

Check which points are contained in the given bounds.

is_point_in_convex_polygon(polygon, points)

Check which points are contained in a convex polygon.

is_point_in_polygon(polygon, points)

Check which points are contained in a general polygon.

is_point_in_triangle(polygon, points)

Check which points are contained in a triangle.

read_shape(spec)

Parse shape from WKT, or bounds, or .wkt or .wkb file.

read_wkb(filename)

Read .wkb file.

read_wkt(filename)

Read .wkt file.

repair(gdf)

Attempt to fix broken geometries in the given GeoDataFrame, and returns a new GeoDataFrame.

write_wkb(filename, shape)

Read .wkb file.

write_wkt(filename, shape)

Read .wkt file.