[GRASS-user] "v.transform" reports erroneous values in the transformation matrix

Markus Metz markus.metz.giswork at gmail.com
Tue Feb 26 05:37:36 PST 2013


On Tue, Feb 26, 2013 at 2:17 PM, José María Michia Roberts
<jose.maria.michia at gmail.com> wrote:
> Hi all!
>
> I've found that values of transformation matrix reported by
> v.transform are erroneous after using this values in ST_Affine (a
> PostGIS's function).
>
> The values that seems to be erroneous are x_offset and y_offset. The
> rotation values seems to are fine.
>
> The transformed elements are ok (it is, their coordinates are in the
> right place).
>
> Values reported by v.transform:
>
> xoff = -139153.031250
> yoff = 8352534.450195
>
> The correct values must be (aproximately):
>
> xoff = 5461371
> yoff = 6321181
>
> The complete session's log with one test element is there (same
> results with a whole layer):
>
> http://pastebin.com/FUtnePvb
>
> Local map: tmp
> Transformed map: tmp_geo
>
> Take a look at the map region for tmp/tmp_geo (reported by v.info),
> and compare these values with those of x_off / y_off (reported by
> v.transform).
>

Note that there are two transformation matrices, one for forward
transformation, one for backward transformation. Can the PostGIS
ST_Affine function print both matrices?

If possible, rather use v.rectify in GRASS 7 instead of v.transform in GRASS 6.

With a recent version of GDAL/OGR, you can also add GCPs to a
datasource with ogr2ogr -gcp which should then automatically transform
the coordinates.

Markus M


> Maybe I'm not interpreting this correctly.
>
> Thanks all!
> Jose
> _______________________________________________
> grass-user mailing list
> grass-user at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/grass-user


More information about the grass-user mailing list