def project_normalized(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_normalized'): raise NotImplementedError('project_normalized requires GEOS 3.2+') return capi.geos_project_normalized(self.ptr, point.ptr)
def project_normalized(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_normalized(self.ptr, point.ptr)
def project_normalized(self, point): from .point import Point if not isinstance(point, Point): raise TypeError('locate_point argument must be a Point') return capi.geos_project_normalized(self.ptr, point.ptr)
def project_normalized(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_normalized(self.ptr, point.ptr)