def project(self, point):
     if not isinstance(point, Point):
         raise TypeError('locate_point argument must be a Point')
     if not isinstance(self, (LineString, MultiLineString)):
         raise TypeError('locate_point only works on LineString and MultiLineString geometries')
     if not hasattr(capi, 'geos_project'):
         raise NotImplementedError('geos_project requires GEOS 3.2+')
     return capi.geos_project(self.ptr, point.ptr)
Example #2
0
 def project(self, point):
     if not isinstance(point, Point):
         raise TypeError('locate_point argument must be a Point')
     if not isinstance(self, (LineString, MultiLineString)):
         raise TypeError(
             'locate_point only works on LineString and MultiLineString geometries'
         )
     return capi.geos_project(self.ptr, point.ptr)
Example #3
0
 def project(self, point):
     if not isinstance(point, Point):
         raise TypeError('locate_point argument must be a Point')
     if not isinstance(self, (LineString, MultiLineString)):
         raise TypeError('locate_point only works on LineString and MultiLineString geometries')
     if not hasattr(capi, 'geos_project'):
         raise NotImplementedError('geos_project requires GEOS 3.2+')
     return capi.geos_project(self.ptr, point.ptr)
Example #4
0
 def project(self, point):
     from .point import Point
     if not isinstance(point, Point):
         raise TypeError('locate_point argument must be a Point')
     return capi.geos_project(self.ptr, point.ptr)
Example #5
0
 def project(self, point):
     from .point import Point
     if not isinstance(point, Point):
         raise TypeError('locate_point argument must be a Point')
     return capi.geos_project(self.ptr, point.ptr)
Example #6
0
 def project(self, point):
     if not isinstance(point, Point):
         raise TypeError('locate_point argument must be a Point')
     if not isinstance(self, (LineString, MultiLineString)):
         raise TypeError('locate_point only works on LineString and MultiLineString geometries')
     return capi.geos_project(self.ptr, point.ptr)