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:
Returns:

obj – A new geometric representation of the object.

Return type:

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