Tue, Feb 15 2005
06:20:03
|
|
Request created by hbowman
|
|
Subject: v.in.ascii: DDD:MM:SS lat/lon as x,y input
It would be nice if v.in.ascii could take DDD:MM:SS formated lat/lon positions
as input for x= and y= columns.
then we could do the old trick:
d.where | v.in.ascii fs=space
also less spreadsheet error prone: (input from .csv files)
A = degree col
B = minutes col
Putting together with =CONCAT(A1, '.', B1/60) can lead to two decimal place
errors.
Putting together with =A1+B1/60 is wrong for lat in the southern hemisphere
correct formula to decimal degrees in a spreadsheet is a PITA and new users
will always overlook this the first time & get incorrect results.
Hamish
|
|
Mon, Feb 28 2005
14:27:56
|
|
Mail sent by guest
|
|
What about using G_scan_resolutio or similar?
if (!G_scan_resolution (parm.res_ew->answer, &ew_res, winhd.proj))
G_fatal_error("Cannot read ew_res value");
if (!G_scan_resolution (parm.res_ns->answer, &ns_res, winhd.proj))
G_fatal_error("Cannot read ns_res value");
(see g.region/cmd/main.c and r.resamp.rst/main.c)
Markus
|
|
Mon, Feb 28 2005
17:49:37
|
|
Mail sent by mneteler
|
|
Of course it should be something like this:
if(!G_scan_easting(coord->answers[0], &(grid_info.origin_x), window.proj))
G_fatal_error("Invalid easting!");;
if(!G_scan_northing(coord->answers[1], &(grid_info.origin_y), window.proj))
G_fatal_error("Invalid northing!");;
Markus |
|
Thu, Jun 9 2005
10:50:33
|
|
Comments added by guest
|
|
The above-mentioned trick does not change the fact, that it still would be
nice to import data in ddd:mm:ss.s format also in recent versions of grass.
v.in.ascii at the moment still reads only pure numbers, and the trick to be
found somewhere, that a formatting like 10d34'32" would work is not true. It
results in an error "x column is not of number type".
So, to restate: as the code already must exist in the remains of s.in.ascii,
could it please, please be ported to v.in.ascii, too. Please...
Greetings,
Harri |
|
Mon, Oct 17 2005
10:33:12
|
|
Comments added by hbowman
|
|
I think this has now been done by Markus, in.c Rev 1.27, 4 Oct 2005.
Hamish
|
|
Wed, Apr 26 2006
07:34:23
|
|
Status changed to resolved by hbowman
|
|