MCPcopy Create free account
hub / github.com/shapely/shapely / get_value

Method get_value

shapely/_enum.py:13–23  ·  view source on GitHub ↗

Validate item and raise a ValueError with valid options if not present.

(cls, item)

Source from the content-addressed store, hash-verified

11
12 @classmethod
13 def get_value(cls, item):
14 """Validate item and raise a ValueError with valid options if not present."""
15 try:
16 return cls[item].value
17 except KeyError:
18 valid_options = {e.name for e in cls}
19 raise ValueError(
20 "'{}' is not a valid option, must be one of '{}'".format(
21 item, "', '".join(valid_options)
22 )
23 )

Callers 11

to_wkbFunction · 0.80
from_wktFunction · 0.80
from_wkbFunction · 0.80
from_geojsonFunction · 0.80
set_precisionFunction · 0.80
queryMethod · 0.80
bufferFunction · 0.80
offset_curveFunction · 0.80
pointsFunction · 0.80
linestringsFunction · 0.80
linearringsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected