Geometry properties

Geometry properties#


The enumeration of GEOS geometry types

get_type_id(geometry, **kwargs)

Returns the type ID of a geometry.

get_dimensions(geometry, **kwargs)

Returns the inherent dimensionality of a geometry.

get_coordinate_dimension(geometry, **kwargs)

Returns the dimensionality of the coordinates in a geometry (2, 3 or 4).

get_num_coordinates(geometry, **kwargs)

Returns the total number of coordinates in a geometry.

get_srid(geometry, **kwargs)

Returns the SRID of a geometry.

set_srid(geometry, srid, **kwargs)

Returns a geometry with its SRID set.

get_x(point, **kwargs)

Returns the x-coordinate of a point

get_y(point, **kwargs)

Returns the y-coordinate of a point

get_z(point, **kwargs)

Returns the z-coordinate of a point.

get_m(point, **kwargs)

Returns the m-coordinate of a point.

get_exterior_ring(geometry, **kwargs)

Returns the exterior ring of a polygon.

get_num_points(geometry, **kwargs)

Returns number of points in a linestring or linearring.

get_num_interior_rings(geometry, **kwargs)

Returns number of internal rings in a polygon

get_num_geometries(geometry, **kwargs)

Returns number of geometries in a collection.

get_point(geometry, index, **kwargs)

Returns the nth point of a linestring or linearring.

get_interior_ring(geometry, index, **kwargs)

Returns the nth interior ring of a polygon.

get_geometry(geometry, index, **kwargs)

Returns the nth geometry from a collection of geometries.

get_parts(geometry[, return_index])

Gets parts of each GeometryCollection or Multi* geometry object; returns a copy of each geometry in the GeometryCollection or Multi* geometry object.

get_rings(geometry[, return_index])

Gets rings of Polygon geometry object.

get_precision(geometry, **kwargs)

Get the precision of a geometry.

set_precision(geometry, grid_size[, mode])

Returns geometry with the precision set to a precision grid size.

force_2d(geometry, **kwargs)

Forces the dimensionality of a geometry to 2D.

force_3d(geometry[, z])

Forces the dimensionality of a geometry to 3D.