Ejemplo n.º 1
0
    def __init__(self, XYs):

        LineString.__init__(self, XYs)

        self.Xs = XYs[0][0]
        self.Xe = XYs[1][0]
        self.dx = self.Xe - self.Xs

        self.Ys = XYs[0][1]
        self.Ye = XYs[1][1]
        self.dy = self.Ye - self.Ys
Ejemplo n.º 2
0
    def __init__(self, coordinates=None):
        """
        Parameters
        ----------
        coordinates : sequence
            A sequence of (x, y [,z]) numeric coordinate pairs or triples or
            an object that provides the numpy array interface, including
            another instance of LineString.

        Example
        -------
        Create a line with two segments

          >>> a = Polyline([[0, 0], [1, 0], [1, 1]])
          >>> a.length
          2.0
        """
        LineString.__init__(self, coordinates)
Ejemplo n.º 3
0
 def __init__(self, Coords):
     LineString.__init__(self, Coords)
     self.x, self.y = self.xy
     self.linedist = [self.project(Point(p)) for p in self.coords]