Did I find the right examples for you? yes no

All Samples(2)  |  Call(2)  |  Derive(0)  |  Import(0)

        def getLengthOfLineString(linestring,
                          distanceFunc=getDistanceBetweenTwoPointsOnEarth):
    length = 0
    for i, p in enumerate(linestring[:-1]):
        length += distanceFunc(p, linestring[i+1])
    return length
        


src/b/y/byCycleCore-0.4a0.dev-r1054/byCycle/model/milwaukeewi/__init__.py   byCycleCore(Download)
    def _adjustRowForMatrix(cls, row):
        geom = row.geom
        length = gis.getLengthOfLineString([geom.pointN(n) for n in
                                            range(geom.numPoints())])
 

src/b/y/byCycleCore-0.4a0.dev-r1054/byCycle/model/entities/base.py   byCycleCore(Download)
    def to_miles(self):
        return gis.getLengthOfLineString([self.geom.pointN(n) for n in
                                          range(self.geom.numPoints())])
 
    def to_kilometers(self):