[gdal-dev] Upgrading Version Not Working

Nelson, Nicole nelsonn at amazon.com
Thu Jul 24 14:36:09 PDT 2014


Yes. I was able to run successfully.
For some reason I got a different warning this last time running that
previously. Which pointed me in the right direction. I was entering the
points incorrectly, so it was seeing the points were outside the bounds
available.
Thanks for your help!

On 7/24/14, 2:26 PM, "Even Rouault" <even.rouault at mines-paris.org> wrote:

>Le jeudi 24 juillet 2014 23:21:52, Nelson, Nicole a écrit :
>> Even,
>>    Is it possible that I am missing an external library? Do you know
>>which
>> external libraries would be required to accomplish such a task?
>
>It might be related to have built GDAL against GEOS or not. Although I
>would 
>still expect it to work in the non-GEOS case. Did you try the sample I
>provided ?
>
>> Thanks,
>> Nicole
>> 
>> On 7/24/14, 1:03 PM, "Even Rouault" <even.rouault at mines-paris.org>
>>wrote:
>> >Le jeudi 24 juillet 2014 21:49:19, Nelson, Nicole a écrit :
>> >> Hello,
>> >> 
>> >>    I am working on an application which was developed by another
>> >>
>> >>developer
>> >>
>> >> about 2 years ago. At the time the developer used GDAL 1.9.1. I am
>> >>
>> >>trying
>> >>
>> >> to upgrade to the latest version of GDAL (1.11.0). However, I am not
>> >>
>> >>able
>> >>
>> >> to get the same functionality to work. I am reading in a shape file
>>with
>> >> ogr.Open which is successful. Then I am able to get a layer
>> >>
>> >>successfully.
>> >>
>> >> On that layer I try to apply a spatial filter with a single point
>> >>
>> >>geometry
>> >>
>> >> representing a latitude and longitude pair. However, when I call
>> >> GetNextFeature I always get null, regardless of the input. The
>> >> GetNextFeature function previously returned at least one feature. Did
>> >> something change in the versions that I may have missed?
>> >
>> >Nicole,
>> >
>> >Single point spatial filter must be an odd use case. Not sure this is
>> >present
>> >in our regression tests, so that might have been accidentaly broken.
>> >However I
>> >just made an experiment with GDAL trunk :
>> >
>> >$ cat square.csv
>> >id,WKT
>> >1,"POLYGON((0 0,0 1,1 1,1 0,0 0))"
>> >
>> >$ ogr2ogr square.shp square.csv
>> >
>> >
>> >$ ogrinfo square.shp -al -spat 0.25 0.5 0.25 0.5
>> >INFO: Open of `square.shp'
>> >
>> >      using driver `ESRI Shapefile' successful.
>> >
>> >Layer name: square
>> >Geometry: Polygon
>> >Feature Count: 1
>> >Extent: (0.000000, 0.000000) - (1.000000, 1.000000)
>> >Layer SRS WKT:
>> >(unknown)
>> >id: String (80.0)
>> >WKT: String (80.0)
>> >OGRFeature(square):0
>> >
>> >  id (String) = 1
>> >  WKT (String) = POLYGON((0 0,0 1,1 1,1 0,0 0))
>> >  POLYGON ((0 0,0 1,1 1,1 0,0 0))
>> >
>> >So at least on that example it seems to work.
>> >
>> >> Is there
>> >> something that would make GetNextFeature return null, but GetFeature
>>at
>> >> various indices return values?
>> >
>> >Yes, GetFeature() doesn't take into account the spatial filter.
>> >
>> >Best regards,
>> >
>> >Even
>
>-- 
>Geospatial professional services
>http://even.rouault.free.fr/services.html



More information about the gdal-dev mailing list