Modify

Opened 11 months ago

Closed 11 months ago

Last modified 11 months ago

#7841 closed defect (fixed)

Flying street name labels for JOSM 5315

Reported by: justynjj Owned by: team
Priority: major Component: Core
Version: latest Keywords: Flying Street Names labels
Cc: pbb

Description

This bug was found about a month ago and is mentioned here by Tom Morris in JOSM v5267:

http://forum.openstreetmap.org/viewtopic.php?pid=249937

I've just downloaded the latest version of JOSM for OSX v5315 and the problem still exists.

Basically, street names don't line up with the street that they represent. The names appear to float around in another layer. It's as if the translations of the street name's layer are being calculated incorrectly.

Please see this video by Tom Morris which visually shows the problem:

https://www.youtube.com/watch?v=80Sf6m06uO0

Attachments (5)

7841testcase.osm (1.3 KB) - added by bastiK 11 months ago.
7841output.txt (5.6 KB) - added by John Firebaugh 11 months ago.
7841screenshot.png (192.8 KB) - added by John Firebaugh 11 months ago.
784-more-streets.osm (1.7 MB) - added by bastiK 11 months ago.
7841-correct.png (853.4 KB) - added by John Firebaugh 11 months ago.

Change History (18)

comment:1 Changed 11 months ago by pbb

  • Keywords labels added

I am having the exact same issue. It seems to be a Mac-related problem, I am not having any problems on my Windows machine. Only labels with rotated text are "flying"; labels that are printed horizontally are where they should be.

The "flying" effect is caused by the labels getting double the offset from the top-left corner of the viewport. When a street is in the top-left corner, then the label is in the right place, but when the street is in the middle of the screen then the label is all the way to the bottom-right.

comment:2 Changed 11 months ago by pbb

  • Cc pbb added

comment:3 Changed 11 months ago by anonymous

Just to update, I am also using a Mac OSX 10.7.4 and have updated to JOSM v5356 where the problem still exists. If there is any more information you need in order to fix this, please let us know.

comment:4 Changed 11 months ago by bastiK

I can probably track down the reason for this bug and fix it, but you'll have to run a customized JOSM, open a sample file and report back the console output. Please email phaaurlt@… and I'll send you the files.

comment:5 Changed 11 months ago by John Firebaugh

I'm having the same issue. I'd be happy to run a diagnostic build if it would help.

Changed 11 months ago by bastiK

comment:6 Changed 11 months ago by bastiK

Please run debug build http://josm.openstreetmap.de/download/dev/josm7841diag.jar, activate PL 2 mappaint style, and open test file (7841testcase.osm). Report console output and screenshot.

Changed 11 months ago by John Firebaugh

Changed 11 months ago by John Firebaugh

comment:7 follow-up: Changed 11 months ago by John Firebaugh

Done, hope it helps. :)

Changed 11 months ago by bastiK

comment:8 in reply to: ↑ 7 Changed 11 months ago by bastiK

Replying to John Firebaugh:

Done, hope it helps. :)

Yes, it does. Please try the new build http://josm.openstreetmap.de/download/dev/josm7841diag2.jar, I hope it fixes the problem.

Please report console output, should be just one line.

In case the label seems aligned correctly:

  • please open 784-more-streets.osm
  • click on one of the coordinates in the lower left status bar
  • enter "100" as Zoom and confirm
  • take screenshot

comment:9 Changed 11 months ago by bastiK

For the record:

The output (7841output.txt) John gets, is identical with mine. This means all the numbers in drawTextOnPath are computed correctly, including the final transform in the last for loop. However, the result looks, as if the x- and y-translation of the transform is double of what it actually is. Both the halo

Shape textOutline = gv.getOutline();
g.fill(textOutline);

and the normal stroke

g.drawGlyphVector(gv, 0, 0);

are affected in the same way.

I haven't found any bug report on this yet, which is a little strange.

Changed 11 months ago by John Firebaugh

comment:10 Changed 11 months ago by John Firebaugh

Output in the first testcase looks correct, and the logged message is "isGlyphVectorBug: x 2000".

comment:11 Changed 11 months ago by bastiK

Ok, great!

comment:12 Changed 11 months ago by bastiK

  • Resolution set to fixed
  • Status changed from new to closed

In 5403/josm:

fixed #7841 - Flying street name labels

comment:13 Changed 11 months ago by Don-vip

Nice job. Not an easy bug to fix :)

Add Comment

Modify Ticket

Change Properties
<Author field>
Action
as closed .
as The resolution will be set. Next status will be 'closed'.
The resolution will be deleted. Next status will be 'reopened'.
Author


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

 
Note: See TracTickets for help on using tickets.