Opened 11 years ago

Closed 6 years ago

#1878 closed enhancement (fixed)

Metric distance option for v.distance in latlon regions

Reported by: cmbarton Owned by: grass-dev@…
Priority: normal Milestone: 7.4.1
Component: Vector Version: svn-trunk
Keywords: v.distance, geodesic Cc:
CPU: All Platform: All

Description

It would be nice if v.distance could calculate distance (e.g. minimum distance between to and from features) in a metric value like meters even when it works in a latlon region. Currently, it only calculates distance in the default units of the region.

Michael

Change History (15)

comment:1 by hamish, 11 years ago

Keywords: v.distance added

if so it shouldn't be too hard to get, G_geodesic_distance() is always returning meters, so we already know the number internally.

since it isn't a bugfix, I suggest not to add new flags in the 6.4.3 release branch.

Hamish

comment:2 by cmbarton, 11 years ago

Milestone: 6.4.36.4.4

You're right about it not being a bug fix. I'll bump it up to 6.4.4 (or is 6.5 and above better?) and above.

Michael

in reply to:  2 comment:3 by hamish, 11 years ago

Replying to cmbarton:

You're right about it not being a bug fix. I'll bump it up to 6.4.4 (or is 6.5 and above better?) and above.

I guess the normal procedure would be to add it to trunk first, and then see how invasive the change was before considering backporting it to 6.x. If destined for 6.4.4 for sure and the 6.4.3 branch is frozen for release as it is now, I'd backport from trunk to devbranch_6 and then (and I'm not very good at remembering this part) make sure to add it to the list of stuff to backport in the trac dev wiki pages so it doesn't get forgotten once the release branch 64 is reopened post release.

Hamish

comment:4 by cmbarton, 11 years ago

Milestone: 6.4.46.5.0

All good thoughts. The question at hand is what to set the choice box at. I've moved it to 6.5. Makes sense to try it in 7 first, though.

in reply to:  1 comment:5 by mmetz, 11 years ago

Milestone: 6.5.07.0.0

Replying to hamish:

if so it shouldn't be too hard to get, G_geodesic_distance() is always returning meters, so we already know the number internally.

This does not work for v.distance. You would need to enhance G_distance_point_to_line_segment() with the options of Vect_line_distance() or write a new function Vect_line_geodesic_distance().

Bumping Milestone.

Markus M

comment:6 by cmbarton, 11 years ago

So it hasn't yet been done because it is more work than it initially seemed. Well maybe it can happen for GRASS 7. Not an urgent thing, but it would be nice...

Michael

comment:7 by martinl, 11 years ago

Component: DefaultVector
Version: unspecifiedsvn-trunk

comment:8 by hamish, 11 years ago

CPU: UnspecifiedAll
Keywords: geodesic added
Platform: UnspecifiedAll

ah, calculating the great circle distance between every node of a polyline could be rather computationally expensive, but it is possible if you don't mind the wait.

to clarify: does the current version report decimal degrees (aka garbage) for v.distance in a lat/lon location? If so it at least deserves a warning, and in general a fatal error is better than plausible but actually meaningless results.

Hamish

comment:9 by cmbarton, 11 years ago

Yes. It reports in decimal degrees. Not too useful.

Michael

comment:10 by martinl, 8 years ago

Milestone: 7.0.07.0.5

comment:11 by martinl, 8 years ago

Milestone: 7.0.57.3.0

comment:12 by martinl, 8 years ago

Milestone: 7.3.07.4.0

Milestone renamed

comment:13 by martinl, 6 years ago

Still the issue?

comment:14 by neteler, 6 years ago

Milestone: 7.4.07.4.1

Ticket retargeted after milestone closed

comment:15 by cmbarton, 6 years ago

Resolution: fixed
Status: newclosed

Fixed in both 7.2.2 and 7.4

Note: See TracTickets for help on using tickets.