On Friday 01 June 2007 12:33, Dylan Beaudette wrote:
> I needed some functionality to print the transformation matrix, very simple
> patch - it might be useful to others.
>
> It prints out the matrix along with a small note:
>
> Transformation Matrix
> ---------------------
> 28155.882288 0.013530 1.002469
> -5301.399323 0.997547 -0.009172
> ---------------------
>
> the patch is attached.
>
> Perhaps diagnostics like this might be a general use.
ack. attached is a better version, with the ordering better spelled out. Note
that this matrix output is in the format that other applications like R and
PostGIS create / expect.
cheers
--
Dylan Beaudette
Soil Resource Laboratory
http://casoilresource.lawr.ucdavis.edu/
University of California at Davis
530.754.7341
Index: lib/vector/transform/transform.c
===================================================================
RCS file: /home/grass/grassrepository/grass6/lib/vector/transform/transform.c,v
retrieving revision 1.2
diff -r1.2 transform.c
146a147,154
> printf("\nTransformation Matrix\n");
> printf("\n| xoff a b |\n");
> printf("| yoff d e |\n");
> printf("-------------------------------------\n");
> printf("%f %f %f \n", -B3, B2, -B5);
> printf("%f %f %f \n", -B0, -B1, B4);
> printf("-------------------------------------\n");
>
_______________________________________________
grass-dev mailing list
[email protected]
http://grass.itc.it/mailman/listinfo/grass-dev