[gdal-dev] OGR VRT - affine transform ?
Jukka Rahkonen
jukka.rahkonen at mmmtike.fi
Fri May 24 08:02:54 PDT 2013
Frank Warmerdam <warmerdam <at> 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 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,1,-1) from polygons limit 1
And a quick test:
Case 1
======
ogrinfo -ro cities.shp -dialect SQLITE -sql "select GEOMETRY from cities"
INFO: Open of `cities.shp'
using driver `ESRI Shapefile' successful.
.....
OGRFeature(SELECT):0
POINT (23.903381170918806 66.586845471705118)
Case 2
======
ogrinfo -ro cities.shp -dialect SQLITE
-sql "select ScaleCoords(GEOMETRY,1,-1) from cities"
INFO: Open of `cities.shp'
using driver `ESRI Shapefile' successful.
.....
OGRFeature(SELECT):0
POINT (23.903381170918806 -66.586845471705118)
At least the query makes y coordinate negative but I am not sure if that was
the meaning.
-Jukka Rahkonen-
More information about the gdal-dev
mailing list