Opened 7 years ago

Closed 7 years ago

#1928 closed defect (fixed)

after v.transform v.to.db gives incorrect length

Reported by: pertusus Owned by: grass-dev@…
Priority: normal Milestone: 6.4.3
Component: Vector Version: svn-releasebranch64
Keywords: Cc:
CPU: Unspecified Platform: Linux

Description

I import a dxf without georeferenced information, then scale it with v.transform. After that the line length obtained through v.to.db is wrong. If I export the line with v.out.ascii and reimport it, the length is correct.

A tarball to reproduce is attached.

tar xzvf bug_grass.tar.gz
cd bug_grass
./reproduce.sh

The script will show the lengths that are much lower than the correct length (should be like 3300 for the first line, for instance).

Attachments (1)

bug_grass.tar.gz (2.3 KB) - added by pertusus 7 years ago.
reproduced for the bug

Download all attachments as: .zip

Change History (6)

Changed 7 years ago by pertusus

Attachment: bug_grass.tar.gz added

reproduced for the bug

comment:1 in reply to:  description ; Changed 7 years ago by mmetz

Replying to pertusus:

I import a dxf without georeferenced information, then scale it with v.transform. After that the line length obtained through v.to.db is wrong.

The bug in v.to.db is that it does not use geodesic distance calculations in latitude-longitude projections. Fixed in trunk r55729.

Markus M

comment:2 in reply to:  1 Changed 7 years ago by mmetz

Replying to mmetz:

Replying to pertusus:

I import a dxf without georeferenced information, then scale it with v.transform. After that the line length obtained through v.to.db is wrong.

The bug in v.to.db is that it does not use geodesic distance calculations in latitude-longitude projections.

Applies to 3D vectors only.

comment:3 Changed 7 years ago by pertusus

It works now. It also affects 6.4.3svn. Do you want that I apply the changeset patch and test there?

comment:4 in reply to:  3 Changed 7 years ago by mmetz

Replying to pertusus:

It works now. It also affects 6.4.3svn. Do you want that I apply the changeset patch and test there?

Tested and backported with r55746-7.

comment:5 Changed 7 years ago by pertusus

Resolution: fixed
Status: newclosed

Tested too in 6.4.3 svn branch, it works, closing now, thanks.

Note: See TracTickets for help on using tickets.