[Proj] How to apply an affine transformation?

Jose Gonçalves jagoncal at gmail.com
Mon Jan 11 02:20:43 PST 2010


Hello

I think there is no way of doing direct transformations between two
cartographic coordinate systems (affine or other polynomial) with
program CS2CS.
Using command awk (unix/linux but also available for windows) you can
do something like:

awk '{print $1*A+$2*B+E,$1*C+$2*D+F}' < input_file.txt > output_file.txt

where A,B,C,D,E and F are the parameters of your affine
transformation. The input file must be a text file with Easting and
Northing separated by space or tab, in the same way you would give to
program CS2CS.

If you really want to use CS2CS (or GDAL/OGR programs) you can create
a datum shift grid file (GSB extension), with longitude and latitude
differences, agreeing with the 2D direct affine transformation.
There is the spanish grid file SPED2ETV2.gsb, which is available with
the GVSIG software (and ArcGIS 9.3), which should do the conversion
for all Spain with an accuracy of some 10 or 20 cm. Isn't it very
close to your direct affine transformation?

Regards

José Gonçalves


2010/1/11 Assumpcio Termens <atermens at gmail.com>:
> Hello to all,
>
> I'm a new user of PROJ library. I have to apply a transformation from
> EPSG:23031 to EPSG:25831. The parametrization of the datum transformation is
> an affine 2D transformation which has to be applied directly to UTM
> coordinates. This parametrization is very useful in CAD environments, but I
> don't know how to use in cs2cs or in GDAL/OGR library.
>
> Can I use this type of transformation in "cs2cs"?
> Which options have to put in the comand line?
> Or which files have to be modified?
>
> Thank you very much,
>
> Assumpció Termens
> Geoprocess Department
> ICC
>
>
> _______________________________________________
> Proj mailing list
> Proj at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/proj
>



More information about the Proj mailing list