[gdal-dev] OGR2OGR options -select and -where together

2011-03-25 Thread Luiz Motta
Devs, I would like have the subset of data, by filters of field (-select) and attributes(-where), using OGR2OGR. My enviroment is: - Windows XP - GDAL from OSGEO4W - Version: GDAL 1.8.0, released 2011/01/12 At the moment, i can only make subset(field and attribute) by call separate of OGR2OGR.

Re: [gdal-dev] OGR2OGR options -select and -where together

2011-03-25 Thread Christy Nieman
Sorry, wrong order for the source and destination files. Should be output.shp then input.shp C On 03/25/2011 09:45 AM, Christy Nieman wrote: Hello, You can indeed use both -select and -where together together. For example ogr2ogr -select field1,field2,field3 -where field1 = value OR

Re: [gdal-dev] OGR2OGR options -select and -where together

2011-03-25 Thread Christy Nieman
Hello, You can indeed use both -select and -where together together. For example ogr2ogr -select field1,field2,field3 -where field1 = value OR field2 = anotherValue input.shp output.shp Best regards, Christy On 03/25/2011 09:38 AM, Luiz Motta wrote: Devs, I would like have the subset of

Re: [gdal-dev] OGR2OGR options -select and -where together

2011-03-25 Thread Christy Nieman
And apparently I'm half asleep this morning. Didn't see your examples of what you've tried. Sorry. I tried your 3.1 ogr2ogr with your data and got 754 features returned with an older version of GDAL (1.7 I believe), but 0 with 1.8 also. On 03/25/2011 09:46 AM, Christy Nieman wrote: Sorry,

Re: [gdal-dev] OGR2OGR options -select and -where together

2011-03-25 Thread Luiz Motta
Thank's Christy. The idea is report this problem, or verify , if i am using correct form the OGR2OGR. Luiz 2011/3/25 Christy Nieman cnie...@dmsolutions.ca: And apparently I'm half asleep this morning.  Didn't see your examples of what you've tried.  Sorry.  I tried your 3.1 ogr2ogr with

Re: [gdal-dev] OGR2OGR options -select and -where together

2011-03-25 Thread Christy Nieman
Sorry, I wanted to provide more info, but I wanted to compile 1.8.0 before expanding on this (I was running a trunk version from before 1.8.0's release). I was going to suggest that you could use the -sql parameter with an sql query, however I was unable to get this to work with 1.8.0 either,

Re: [gdal-dev] Reproject Landsat USGS image

2011-03-25 Thread Luisa Peña
Back again on this I have talked with Markus Neteler and he told me that if I use gdalwarp with NN method, I will get a pixel shift and he suggested me to use bilinear method. The problem with bilinear is that my pixel values are changed (based on bilinear method) So is there any method to keep

Re: [gdal-dev] OGR2OGR options -select and -where together

2011-03-25 Thread Christy Nieman
Aha. And sorry for kind of spamming the list. I've been looking into this between working on something else. with -sql in 1.8.0: ogr2ogr -f ESRI Shapefile -sql select ano from Prodes2009_23367 where ano = '2009' and class_name = 'DESFLORESTAMENTO' filter_select_where7.shp

Re: [gdal-dev] OGR2OGR options -select and -where together

2011-03-25 Thread Even Rouault
Selon Christy Nieman cnie...@dmsolutions.ca: Aha. And sorry for kind of spamming the list. I've been looking into this between working on something else. with -sql in 1.8.0: ogr2ogr -f ESRI Shapefile -sql select ano from Prodes2009_23367 where ano = '2009' and class_name =

Re: [gdal-dev] OGR2OGR options -select and -where together

2011-03-25 Thread Christy Nieman
Even, Thanks for the explanations. I've created ticket #4015 (http://trac.osgeo.org/gdal/ticket/4015) with regards to the necessity to include all fields used in the -where clause in -select. Luiz, Thanks for noticing this! It'd have caused me many problems had I switched to using 1.8.0

Re: [gdal-dev] OGR2OGR options -select and -where together

2011-03-25 Thread Even Rouault
Le vendredi 25 mars 2011 18:35:28, Christy Nieman a écrit : Even, Thanks for the explanations. I've created ticket #4015 (http://trac.osgeo.org/gdal/ticket/4015) with regards to the necessity to include all fields used in the -where clause in -select. Thanks. I've commited a fix that will go

[gdal-dev] GDAL/OGR Java bindings very slow in reading point coordinates of feature geometries

2011-03-25 Thread MarvinCO
I have noticed that copying all points of a polygon (of a polygon feature) can be very costly in my implementation. This must be due to the fact that there is only one method for doing this: org.gdal.ogr.Geometry.GetPoint() This means that at every invocation of GetPoint, Java has to make a

Re: [gdal-dev] GDAL/OGR Java bindings very slow in reading point coordinates of feature geometries

2011-03-25 Thread Even Rouault
Le samedi 26 mars 2011 00:14:35, MarvinCO a écrit : I have noticed that copying all points of a polygon (of a polygon feature) can be very costly in my implementation. This must be due to the fact that there is only one method for doing this: org.gdal.ogr.Geometry.GetPoint() This means