Modify

Opened 14 years ago

Closed 14 years ago

#1597 closed enhancement (fixed)

Align Nodes In Rectangle does not work in default projection

Reported by: openstreetmap@… Owned by: framm
Priority: minor Milestone:
Component: unspecified Version: tested
Keywords: Cc:

Description

In r998:

Aligning nodes to rectangle seems to be broken for the two bowling greens in the attached osm. These two areas where produced by walking round the edge of the green and I got a good clean trace - it might be out by a bit but not much. If you select either of them and press Q they change shape completely.

I can provide the trace but it is part of a large (1.9MB) file.

Attachments (2)

rectanglealignbug.osm (79.3 KB) - added by anonymous 14 years ago.
rectanglealignbug-rightapplied.osm (79.4 KB) - added by anonymous 14 years ago.

Download all attachments as: .zip

Change History (9)

Changed 14 years ago by anonymous

Attachment: rectanglealignbug.osm added

comment:1 Changed 14 years ago by openstreetmap@…

BTW - please be careful not to upload rectanglealignbug.osm - I hadn't realised it would include deletes for all the items I removed to make the bug obvious!

comment:2 Changed 14 years ago by Henry Loenwind

Resolution: worksforme
Status: newclosed

Could you please provide the data after the change? Here nothing wrong happens, I get nice rectangles...

Changed 14 years ago by anonymous

comment:3 Changed 14 years ago by openstreetmap@…

Resolution: worksforme
Status: closedreopened

Attached - but I'm not sure it is relevant.

You do indeed get a nice rectangle - it's just that as far as I can tell it doesn't match a rectangle actually traced on the ground. I'm assuming that Align Nodes In Rectangle is supposed to produce a rectangle 'on the ground' correctly adjusted for projection?

Normally I'd assume that the problem was with the trace but this was a very clean trace in the middle of an open field and entirely consistent with existing geography.

comment:4 Changed 14 years ago by Henry Loenwind

Resolution: wontfix
Status: reopenedclosed

Ok, got the problem:

The AlignRect action aligns the nodes so you get a rectangle in the current projection. I'd suggest you configure your JOSM to use Mercator projection, that one is nicer to angles than the default.

comment:5 in reply to:  4 Changed 14 years ago by openstreetmap@…

Resolution: wontfix
Status: closedreopened
Summary: Align Nodes In Rectangle fails in some casesAlign Nodes In Rectangle does not work in default projection

The AlignRect action aligns the nodes so you get a rectangle in
the current projection.

I understand - but I'm going to re-open this as a bug because it either needs to work in the default projection or produce a huge health warning if you try to use it. This is actively encouraging people to think they have correctly drawn a building when it is significantly wrong.

Also it is inconsistent with Align Nodes In circle which does seem to do a reverse projection to put the points in the right (projection independant) location.

comment:6 Changed 14 years ago by anonymous

Type: defectenhancement

comment:7 Changed 14 years ago by framm

Resolution: fixed
Status: reopenedclosed

In r1076, "Align nodes in rectangle" has been dropped and replaced by "Orthogonalize", a more general method that also works on open lines and complex shapes. That function will show a warning message if used with EPSG:4326. This is not perfect, as the code should probably investigate what the current projection does to right angles in the geographic area being edited, but it is better than nothing.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain framm.
as The resolution will be set.
The resolution will be deleted.

Add Comment


E-mail address and name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.