[GRASS-dev] [GRASS GIS] #1424: Profile tool always casts to integers (incl. csv output)
GRASS GIS
trac at osgeo.org
Fri Sep 6 03:10:15 PDT 2013
#1424: Profile tool always casts to integers (incl. csv output)
-------------------------------------+--------------------------------------
Reporter: hamish | Owner: grass-dev@…
Type: defect | Status: new
Priority: major | Milestone: 6.4.2
Component: wxGUI | Version: svn-releasebranch64
Keywords: profile tool, precision | Platform: All
Cpu: All |
-------------------------------------+--------------------------------------
Comment(by mlennert):
A student of mine was bitten by this again, recently, so I looked into it.
I'll attach a new patch which combines Hamish' original patch with the
addition of using m.measure. This solves the issue of casts to integers
(and no need for all the raster format checks Hamish suggested as the data
actually '''is''' the original r.profile output with just nulls filtered
out. And .15g seems appropriate for me as the output is then adapted to
the type of data in input (i.e. integers are displayed as integers).
I'm still a bit stuck on the use of the profile tool in lat-long
locations. The use of m.measure was only one aspect. Antoher issue is on
line 232ff where the resolution to be fed to r.profile is calculated.
Using m.measure to determine the transect length gives a length in meters
and thus the calculated resolution is in meters which then does not work
for r.profile in a lat-long location.
So, the patch is still unfinished work, but I'm very busy with other
things these days, and do not have the time in the immediate future to
look at this. Maybe someone else can pick up on what I did.
In any case, it would be great to have the integer->float parts of the
patch applied (and backported to 64release ?).
Moritz
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1424#comment:6>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list