def interpolatePoint(self, position): """ Interpolate a :class:`Point <geoscript.geom.Point>` on the :class:`LineString <geoscript.geom.LineString>` at the given position from 0 to 1. *position* is number between 0 and 1 """ indexedLine = LengthIndexedLine(self) length = self.getLength() coordinate = indexedLine.extractPoint(position * length) return Point(coordinate.x, coordinate.y)
def interpolatePoint(self, position): """ Interpolate a :class:`Point <geoscript.geom.Point>` on the :class:`LineString <geoscript.geom.LineString>` at the given position from 0 to 1. *position* is number between 0 and 1 """ indexedLine = LengthIndexedLine(self) length = self.getLength() coordinate = indexedLine.extractPoint(position * length) return Point(coordinate.x, coordinate.y)
def placePoint(self, *coord): """ Place or snap the :class:`point <geoscript.geom.Point>` to the `LineString <geoscript.geom.LineString>`. This method returns a new placed `Point <geoscript.geom.Point>`. *coord* A :class:`Point <geoscript.geom.Point>` or a variable list of x,y,z arguments. """ point = coord[0] if isinstance(coord[0], Point) else Point(*coord) indexedLine = LengthIndexedLine(self) position = indexedLine.indexOf(point.coordinate) coord = indexedLine.extractPoint(position) return Point(coord.x, coord.y)
def placePoint(self, *coord): """ Place or snap the :class:`point <geoscript.geom.Point>` to the `LineString <geoscript.geom.LineString>`. This method returns a new placed `Point <geoscript.geom.Point>`. *coord* A :class:`Point <geoscript.geom.Point>` or a variable list of x,y,z arguments. """ point = coord[0] if isinstance(coord[0], Point) else Point(*coord) indexedLine = LengthIndexedLine(self) position = indexedLine.indexOf(point.coordinate) coord = indexedLine.extractPoint(position) return Point(coord.x, coord.y)