Opened 17 years ago
Closed 17 years ago
#1597 closed enhancement (fixed)
Align Nodes In Rectangle does not work in default projection
Reported by: | 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)
Change History (9)
by , 17 years ago
Attachment: | rectanglealignbug.osm added |
---|
comment:1 by , 17 years ago
comment:2 by , 17 years ago
Resolution: | → worksforme |
---|---|
Status: | new → closed |
Could you please provide the data after the change? Here nothing wrong happens, I get nice rectangles...
by , 17 years ago
Attachment: | rectanglealignbug-rightapplied.osm added |
---|
comment:3 by , 17 years ago
Resolution: | worksforme |
---|---|
Status: | closed → reopened |
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.
follow-up: 5 comment:4 by , 17 years ago
Resolution: | → wontfix |
---|---|
Status: | reopened → closed |
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 by , 17 years ago
Resolution: | wontfix |
---|---|
Status: | closed → reopened |
Summary: | Align Nodes In Rectangle fails in some cases → Align 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 by , 17 years ago
Type: | defect → enhancement |
---|
comment:7 by , 17 years ago
Resolution: | → fixed |
---|---|
Status: | reopened → closed |
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.
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!