[GRASS-dev] v.transform, wishlist #420

Harri Kiiskinen harkiisk at utu.fi
Mon Jun 11 16:46:48 EDT 2007


Hello all,

on advise from Maciek, I'll re-post here the comments I added to the
wishlist item mentioned in the Subject. The item is about v.transform
and how it does not accept lat/long in ascii format in the 'pointslist'
file. Hamish responded, that it probably would be easy to fix by just
modifying the module to use G_scan_easting() and G_scan_northing().
However, and here I quote myself:

<quote>
I looked into the matter somewhat deeper, and it turns out not
to be as simple as just putting in G_scan_*()-functions. These
functions delegate the work to ll_scan(), through G_lat_scan()
and G_long_scan(), and ll_scan() normalizes its resulting arguments
to the ranges [-180,180] and [-90,90]. The result is, that the
coordinates can be given to these functions only if it is supposed
to be lat/long-coordinate.

As I have some interest for this module, this might be a chance
for a first code contribution to the project. I have two possible
options for the solution:

1. Check the coordinate string first to see if the character
':' can be found in it, and if it can be, assume the coordinate
is lat/long and do the necessary conversion

2. Add two more flags to the module, to indicate that the from-
and/or to-coordinates should be considered as lat/long.

The first solution is more elegant, but the second one makes
sure, that the user knows the form of the coordinates.

Two questions:

Which of these would be the preferred solution?

Is is ok if I meddle with this module and send in diffs/patches
at some point?

In the long run, I'd like to further modify this module so, that the
resulting vector could be placed in a different location/mapset, so it
could be used to transform vector files from a location based on a
local coordinate system to another, 'global' system. 
</quote>

Harri K.




More information about the grass-dev mailing list