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.

Returns:
obj{libpysal.cg.{Point, LineSegment, Line, Ray, Chain, Polygon}

A new geometric representation of the object.

Raises:
TypeError

Raised when obj is not a supported shape.

NotImplementedError

Raised when geo_type is not a supported type.