Opened 10 years ago

Closed 10 years ago

#2401 closed defect (fixed)

v.distance in Long/Lat Locations

Reported by: micha Owned by: grass-dev@…
Priority: normal Milestone: 6.4.5
Component: Vector Version: 6.4.4
Keywords: v.distance Cc:
CPU: Unspecified Platform: Unspecified

Description

According to the manual, v.distance should, in a long-lat LOCATION, return geodesic distances in meters on a sphere, rather than in degrees. This works in the cases of point to point, and point to line.

However in the case of point to boundary the module returns distances in degrees, and not geodesic distance.

Attachments (1)

vdistance_ll_for_point2area.diff (1.7 KB ) - added by mlennert 10 years ago.
patch for enabling geodesic distances in LL-locations for point to boundary

Download all attachments as: .zip

Change History (7)

by mlennert, 10 years ago

patch for enabling geodesic distances in LL-locations for point to boundary

in reply to:  description ; comment:1 by mlennert, 10 years ago

Replying to micha:

According to the manual, v.distance should, in a long-lat LOCATION, return geodesic distances in meters on a sphere, rather than in degrees. This works in the cases of point to point, and point to line.

However in the case of point to boundary the module returns distances in degrees, and not geodesic distance.

I've attached a patch that solves the issue for me, but it could do with some more testing.

Moritz

in reply to:  1 ; comment:2 by mlennert, 10 years ago

Resolution: fixed
Status: newclosed

Replying to mlennert:

Replying to micha:

According to the manual, v.distance should, in a long-lat LOCATION, return geodesic distances in meters on a sphere, rather than in degrees. This works in the cases of point to point, and point to line.

However in the case of point to boundary the module returns distances in degrees, and not geodesic distance.

I've attached a patch that solves the issue for me, but it could do with some more testing.

I've applied the patch in r61859 and r61860.

Closing this ticket.

Moritz

in reply to:  2 ; comment:3 by neteler, 10 years ago

Keywords: v.distance added

Replying to mlennert:

I've applied the patch in r61859 and r61860.

Closing this ticket.

Are the results identical to that of GRASS GIS 7 latest SVN?

in reply to:  3 ; comment:4 by mlennert, 10 years ago

Resolution: fixed
Status: closedreopened

Replying to neteler:

Replying to mlennert:

I've applied the patch in r61859 and r61860.

Closing this ticket.

Are the results identical to that of GRASS GIS 7 latest SVN?

For point to point and point to line they seem to be equal, but there are differences with point to area. I'll attach a file with results of the following command:

v.distance -p from=comm_colleges to=urbanarea upload=cat,dist col=to_cat,dist dmin=0.0001

in grass6 and grass7.

For some points (to_cats 3,7,8,12,15,23,24,25,27,32,34,43,46,48,49,52,54), the distances are different. However, in the grass6 version they are similar to the distances calculated in the original NC-NAD83 projection, whereas the grass7 version gives different results.

I don't know if this is a general bug in the distance calculations in v.distance which is corrected in the geodesic distance of grass7, or whether the issue is in the geodesic distance calculation in grass7. I'm suspecting the latter, but Markus M would have to look at this.

Reopening until we know for sure.

Moritz

in reply to:  4 ; comment:5 by mmetz, 10 years ago

Replying to mlennert:

Replying to neteler:

Replying to mlennert:

I've applied the patch in r61859 and r61860.

Closing this ticket.

Are the results identical to that of GRASS GIS 7 latest SVN?

For point to point and point to line they seem to be equal, but there are differences with point to area.

trunk fixed in r61943, there was an uninitialized z coordinate. There are still two differences where G6 finds as nearest area a hole inside an area (to_cat = null). I regard this as a bug in G6.

in reply to:  5 comment:6 by mlennert, 10 years ago

Resolution: fixed
Status: reopenedclosed

Replying to mmetz:

Replying to mlennert:

Replying to neteler:

Replying to mlennert:

I've applied the patch in r61859 and r61860.

Closing this ticket.

Are the results identical to that of GRASS GIS 7 latest SVN?

For point to point and point to line they seem to be equal, but there are differences with point to area.

trunk fixed in r61943, there was an uninitialized z coordinate. There are still two differences where G6 finds as nearest area a hole inside an area (to_cat = null). I regard this as a bug in G6.

I agree, but it's not related to geodesic distances as the same problem occurs in a projected location.

So, closing this bug and opening another for the hole as nearest area (#2419).

Moritz

Note: See TracTickets for help on using tickets.