[GRASS-dev] Re: [GRASS GIS] #1424: Profile tool always casts to
integers (incl. csv output)
GRASS GIS
trac at osgeo.org
Sat Aug 20 03:03:09 EDT 2011
#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 hamish):
Also I notice an occurrence of `sqrt(a^2 + b^2)` in profile.py, which is
to be avoided as it gives the wrong answer from lat/long locations.
{{{
if lasteast and lastnorth:
dist = math.sqrt(math.pow((lasteast-point[0]),2) + math.pow
((lastnorth-point[1]),2))
}}}
in trunk there is the m.measure C module to use a front end to
G_distance().
In 6.x we used to have swig/python/examples/m.distance as a python front-
end to that; I'm not sure if a simple ctypes replacement exists yet or
not.
thanks,
Hamish
--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1424#comment:1>
GRASS GIS <http://grass.osgeo.org>
More information about the grass-dev
mailing list