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
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)
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]