[gdal-dev] SetSpatialFilter

Even Rouault even.rouault at mines-paris.org
Sat Aug 2 12:57:38 PDT 2014


Le vendredi 01 août 2014 18:36:28, tunca tunc a écrit :
> Hi,
> 
> I"m totally new to GDAL, sorry if this is a obvious thing for you.
> 
> Trying to filter features in the area with following code snippet.
> However
> poLayer->GetNextFeature()
> always returns null on my windows 8.
> 
> 
>    OGRPolygon* polygon = new OGRPolygon();
> 
> >    OGRLinearRing* ring = new OGRLinearRing();
> >    ring->addPoint(51.089028, 13.617821);
> >    ring->addPoint(51.089675, 13.807336);
> >    ring->addPoint(51.025585, 13.807679);
> >    ring->addPoint(51.024937, 13.616105);
> >    polygon->addRing(ring);
> >    poLayer->SetSpatialFilter(polygon);
> 
> The full code is
> http://pastebin.com/eWUeVsTG
> 
> I suspected geos dll is not loaded, but it's loaded according to following
> output.
> http://pastebin.com/7r1gUdQq

Tunca,

If you are interested in the Dresden area, I suspect you have inverted 
latitude and longitude values.

Best regards,

Even

-- 
Geospatial professional services
http://even.rouault.free.fr/services.html


More information about the gdal-dev mailing list