[gdal-dev] How to identify a point is belong to a polygon ?
Chaitanya kumar CH
chaitanya.ch at gmail.com
Sat Jul 21 00:05:58 PDT 2012
GDAL needs GEOS to perform these geometry functions. Make sure you install
On Sat, Jul 21, 2012 at 12:19 PM, taibc <taibc_coltech at yahoo.com> wrote:
> Hi Chaitanya,
> I still can't run the method "Geometry::Within". And I got the error: "GEOS
> support not enable" when trying use this method.
> Please find the attached file for sample code.
> http://osgeo-org.1560.n6.nabble.com/file/n4989766/Source1.cpp Source1.cpp
> About spatial filter, you said that: we can use the spatial filter of the
> ogr layer to filter the point features. But, I think it is used to filter
> features that geometrically intersect the filter geometry.
> For example: if I have one polygon A feature, I can use the method
> "SetSpatialFilter" to get other features (Point or Polygon) that
> geometrically *intersect* with A.
> chaitanya_ch wrote
> > Tai,
> > You can use the spatial filter of the ogr layer to filter the point
> > features to speed things up. You will still have to test if the point is
> > within the polygon but it will be faster.
> > Also, make sure the test is like point->Within(polygon) and not
> > polygon->Within(point)
> > OGRLayer::SetSpatialFilter()
> > On Fri, Jul 20, 2012 at 9:29 AM, Bui Chi Tai <taibc_coltech@>wrote:
> View this message in context:
> Sent from the GDAL - Dev mailing list archive at Nabble.com.
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
Chaitanya kumar CH.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the gdal-dev