[gdal-dev] Ogr2ogr with -dialect and VRT

2013-05-24 Thread Jukka Rahkonen
Hi, The -dialect parameter in ogr2ogr does not have an effect when using VRT as datasource but could it be made to inject the selected dialect into SrcSQL element of the VRT? Thus ogr2ogr -dialect SQLITE would lead to SELECT ... -Jukka Rahkonen-

Re: [gdal-dev] Is using geometry in SQL inside VRT supported?

2013-05-24 Thread Jukka Rahkonen
Frank Warmerdam pobox.com> writes: > Jukka, > I do see it mentioned there in the SrcSQL docs.   Hi, I did see it too but I did not undestand what it means before I saw your example. XML is not my native language and the meaning of "Starting with OGR 1.10, an optional dialect attribute can be sp

Re: [gdal-dev] GDAL 1.10 JP2000 Problem/Crash

2013-05-24 Thread Johan Hedin
Hi everyone, I have seen crashes in libecwj2 when reading certain JPG2000 files as well (on Linux). I have tracked it down to the bundled XML-handling code in libecwj2 but have not had time to fully investigate. But what I found was that if I turn off optimization when compiling libecwj2 this bug

Re: [gdal-dev] Is using geometry in SQL inside VRT supported?

2013-05-24 Thread Frank Warmerdam
Jukka, I do see it mentioned there in the SrcSQL docs. Best regards, Frank On Fri, May 24, 2013 at 10:46 AM, Rahkonen Jukka wrote: > Hi Frank, > > Great, and I guess that this syntax example about how to select the > dialect will be added to the driver manual page > http://www.gdal.org/ogr/dr

Re: [gdal-dev] Is using geometry in SQL inside VRT supported?

2013-05-24 Thread Rahkonen Jukka
Hi Frank, Great, and I guess that this syntax example about how to select the dialect will be added to the driver manual page http://www.gdal.org/ogr/drv_vrt.html in your documentation sprint of FOSS4G NA. -Jukka- Frank Warmerdam wrote: Jukka, It turns out

Re: [gdal-dev] OGR VRT - affine transform ?

2013-05-24 Thread Jukka Rahkonen
Jukka Rahkonen mmmtike.fi> writes: > > I wonder if it could be done by using the Spatialite SQL dialect and > ScaleCoordinates or ReflectCoordinates > http://www.gaia-gis.it/gaia-sins/spatialite-sql-4.0.0.html#p15 > > This SQL is changing the sign of y-coordinates > select ScaleCoords(geometry

Re: [gdal-dev] select shapes in a folder by geometry type

2013-05-24 Thread Eli Adam
> [1] ogr2ogr -f "ESRI Shapefile" -dim 2 pontos_2d.shp ocup_ilegal.shp Yes just like this. > > With this command don't work. I'm using 1.9 version but the '-dim' option > don't show up if i type 'ogr2ogr --long-usage'. It is only in GDAL 1.10+ so it will not work in 1.9. Eli > > > Em 24-05-20

Re: [gdal-dev] Is using geometry in SQL inside VRT supported?

2013-05-24 Thread Frank Warmerdam
Jukka, It turns out you can already assign a dialect. I think it is roughly like: SELECT ... It seems to be touched on it the docs for the OGR VRT driver as well. Best regards, Frank On Fri, May 24, 2013 at 9:46 AM, Frank Warmerdam wrote: > Jukka, > > Agreed! The SrcSQL directive in the

Re: [gdal-dev] select shapes in a folder by geometry type

2013-05-24 Thread Pedro Costa
Hi Eli, Like that?[1] [1] ogr2ogr -f "ESRI Shapefile" -dim 2 pontos_2d.shp ocup_ilegal.shp With this command don't work. I'm using 1.9 version but the '-dim' option don't show up if i type 'ogr2ogr --long-usage'. Em 24-05-2013 17:44, Eli Adam escreveu: If you are using a recent version ca

Re: [gdal-dev] Is using geometry in SQL inside VRT supported?

2013-05-24 Thread Frank Warmerdam
Jukka, Agreed! The SrcSQL directive in the VRT should accept a dialect option. I'll try to do that this afternoon as we are "sprinting" here at FOSS4G NA and this would be a nice sized feature to add. Best regards, Frank On Fri, May 24, 2013 at 8:39 AM, Jukka Rahkonen wrote: > Hi, > > This

Re: [gdal-dev] select shapes in a folder by geometry type

2013-05-24 Thread Eli Adam
If you are using a recent version can you ignore geometry type and use the -dim 2 switch? -dim val:(starting with GDAL 1.10) Force the coordinate dimension to val (valid values are 2 or 3). This affects both the layer geometry type, and feature geometries. Best Regards, Eli On Fri, May 24, 2013

[gdal-dev] select shapes in a folder by geometry type

2013-05-24 Thread Pedro Costa
Hi guys, I'm trying to make a script that converts 3d shapefiles to 2d. I'm using the loop 'for...do'' and this command: 'ogr2ogr -f "ESRI Shapefile" -nlt POINT 2d_points/$shp $shp' My problem is that i don't know how to select only shapefiles of points, and next only polygons, and next only

[gdal-dev] Is using geometry in SQL inside VRT supported?

2013-05-24 Thread Jukka Rahkonen
Hi, This works with ogrinfo ogrinfo -ro cities.shp -dialect SQLITE -sql "select GEOMETRY from cities" I tried to make a VRT file which would do the same cities.shp WGS84 SELECT GEOMETRY from cities Now ogrinfo does not find geometries ogrinfo cities.vrt INFO: Open of `cities.vrt' u

Re: [gdal-dev] OGR VRT - affine transform ?

2013-05-24 Thread Jukka Rahkonen
Frank Warmerdam pobox.com> writes: > > > Julien, > I am not aware of any existing way to do this.  I might be nice if an OGR VRT could apply something like this on the fly, but that doesn't exist currently. I wonder if it could be done by using the Spatialite SQL dialect and ScaleCoordinates

Re: [gdal-dev] OGR VRT - affine transform ?

2013-05-24 Thread Julien Malik
OK, thanks a lot for the information. Best regards, Julien On 05/24/2013 03:48 PM, Frank Warmerdam wrote: Julien, I am not aware of any existing way to do this. I might be nice if an OGR VRT could apply something like this on the fly, but that doesn't exist currently. Best regards, Frank

Re: [gdal-dev] OGR VRT - affine transform ?

2013-05-24 Thread Frank Warmerdam
Julien, I am not aware of any existing way to do this. I might be nice if an OGR VRT could apply something like this on the fly, but that doesn't exist currently. Best regards, Frank On Fri, May 24, 2013 at 3:04 AM, Julien Malik wrote: > Hello, > > Is it possible to apply an on-the-fly affin

Re: [gdal-dev] Some OGR drivers do not work

2013-05-24 Thread Frank Warmerdam
On Fri, May 24, 2013 at 6:16 AM, Jaak Laineste (Nutiteq) wrote: > > Note that not getting this type right is likely behind some of the other >> failures you are seeing. >> > > I now recompiled with #define HAVE_LONG_LONG 1 (manually added it to > cpl_config.h) and it seems to work now. > Excellen

Re: [gdal-dev] Some OGR drivers do not work

2013-05-24 Thread Jaak Laineste (Nutiteq)
2013/5/20 Frank Warmerdam > > > > On Mon, May 20, 2013 at 9:26 AM, Jaak Laineste (Nutiteq) > wrote: > >> Hello, >> >> I compiled GDAL 0.10 release for Android, with basic driver package. I >> left cURL and other more complex dependencies for later. It works with >> partial success: >> >> a) Snag

[gdal-dev] OGR VRT - affine transform ?

2013-05-24 Thread Julien Malik
Hello, Is it possible to apply an on-the-fly affine transform to an OGR dataset with the help of VRT ? Could not find any help or mailing list message about this... The source of the issue is we want to display in QGIS a non-georeferenced raster with an associated GML mask, where the coordin