Opened 8 years ago

Closed 3 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 Changed 8 years ago by hamish

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 Changed 8 years ago by cmbarton

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

comment:3 in reply to:  2 Changed 8 years ago by hamish

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 Changed 8 years ago by cmbarton

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.

comment:5 in reply to:  1 Changed 8 years ago by mmetz

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 Changed 8 years ago by cmbarton

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 Changed 8 years ago by martinl

Component: DefaultVector
Version: unspecifiedsvn-trunk

comment:8 Changed 8 years ago by hamish

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 Changed 8 years ago by cmbarton

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

Michael

comment:10 Changed 5 years ago by martinl

Milestone: 7.0.07.0.5

comment:11 Changed 5 years ago by martinl

Milestone: 7.0.57.3.0

comment:12 Changed 5 years ago by martinl

Milestone: 7.3.07.4.0

Milestone renamed

comment:13 Changed 3 years ago by martinl

Still the issue?

comment:14 Changed 3 years ago by neteler

Milestone: 7.4.07.4.1

Ticket retargeted after milestone closed

comment:15 Changed 3 years ago by cmbarton

Resolution: fixed
Status: newclosed

Fixed in both 7.2.2 and 7.4

Note: See TracTickets for help on using tickets.