shapely.get_precision#

get_precision(geometry, **kwargs)#

Get the precision of a geometry.

Note

‘get_precision’ requires at least GEOS 3.6.0.

If a precision has not been previously set, it will be 0 (double precision). Otherwise, it will return the precision grid size that was set on a geometry.

Returns NaN for not-a-geometry values.

Parameters
geometryGeometry or array_like
**kwargs

For other keyword-only arguments, see the NumPy ufunc docs.

See also

set_precision

Examples

>>> from shapely import Point
>>> point = Point(1, 1)
>>> get_precision(point)
0.0
>>> geometry = set_precision(point, 1.0)
>>> get_precision(geometry)
1.0
>>> get_precision(None)
nan