Skip to content

Commit

Permalink
m property: remove decorator and expand doc
Browse files Browse the repository at this point in the history
  • Loading branch information
mwtoews committed Mar 17, 2024
1 parent d739e46 commit 23dab1b
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions shapely/geometry/point.py
Expand Up @@ -3,7 +3,6 @@
import numpy as np

import shapely
from shapely.decorators import requires_geos
from shapely.errors import DimensionError
from shapely.geometry.base import BaseGeometry

Expand Down Expand Up @@ -101,9 +100,12 @@ def z(self):
return shapely.get_z(self)

@property
@requires_geos("3.12.0")
def m(self):
"""Return m coordinate."""
"""Return m coordinate.
.. versionadded:: 2.1.0
Also requires GEOS 3.12.0 or later.
"""
if not shapely.has_m(self):
raise DimensionError("This point has no m coordinate.")
return shapely.get_m(self)
Expand Down

0 comments on commit 23dab1b

Please sign in to comment.