libpysal.cg.asShape¶
- libpysal.cg.asShape(obj)[source]¶
Returns a PySAL shape object from
obj, which must support the__geo_interface__.- Parameters:¶
- obj : {libpysal.cg.{Point, LineSegment, Line, Ray, Chain, Polygon}¶
A geometric representation of an object.
- Raises:¶
TypeError – Raised when
objis not a supported shape.NotImplementedError – Raised when
geo_typeis not a supported type.
- Returns:¶
obj – A new geometric representation of the object.
- Return type:¶
{libpysal.cg.{Point, LineSegment, Line, Ray, Chain, Polygon}