pysal.lib.cg.Chain

class pysal.lib.cg.Chain(vertices)[source]

Geometric representation of a chain, also known as a polyline.

Attributes:
vertices : list

Returns the vertices of the chain in clockwise order.

len : float

Returns the geometric length of the chain.

__init__(vertices)[source]

Returns a chain created from the points specified.

__init__(Point list or list of Point lists) -> Chain

Parameters:
vertices : list – Point list or list of Point lists.

Examples

>>> c = Chain([Point((0, 0)), Point((1, 0)), Point((1, 1)), Point((2, 1))])

Methods

__init__(vertices) Returns a chain created from the points specified.

Attributes

arclen Returns the geometric length of the chain computed using arcdistance (meters).
bounding_box Returns the bounding box of the chain.
len Returns the geometric length of the chain.
parts Returns the parts of the chain.
segments Returns the segments that compose the Chain
vertices Returns the vertices of the chain in clockwise order.