Opened 9 years ago

Closed 8 years ago

#2675 closed enhancement (wontfix)

long refs don't display

Reported by: NE2 Owned by: rw__
Priority: trivial Milestone:
Component: mapnik Version:
Keywords: Cc: mxn@…

Description

A ref longer than 5 or so characters is not displayed. This means that overlaps (AKA concurrencies, multiplexes) of several routes are not normally shown (for instance ref=I 99; US 220) and even some single routes (like US 220 Business) have no marker.

Change History (12)

comment:1 Changed 9 years ago by Ldp

This is by design, to prevent completely massive shields from popping up on the map. Ideally, we would like to render a shield for each of the refs in such a composite ref, but this is not yet easy to do in mapnik.

comment:2 Changed 9 years ago by NE2

How simple would it be to "cut" the ref at a semicolon so it displays, even if not all the routes are shown?

The single routes could be solved by making common abbreviations like Alternate->Alt and Business->Bus (yes, signs often abbreviate it Bus, despite possible confusion with a bus roadway, especially by analogy with Truck). The limit (currently 8) would have to be upped slightly (to 10) in these specific cases.

comment:3 in reply to:  2 ; Changed 9 years ago by Ldp

Replying to NE2:

How simple would it be to "cut" the ref at a semicolon so it displays, even if not all the routes are shown?

Relatively simple, although if the total compound string length is under the max, and you actually do want to show both in a single shield, things get complicated again. Some refs, like 'A4;A29' are actually short enough to render already.

The single routes could be solved by making common abbreviations like Alternate->Alt and Business->Bus (yes, signs often abbreviate it Bus, despite possible confusion with a bus roadway, especially by analogy with Truck). The limit (currently 8) would have to be upped slightly (to 10) in these specific cases.

Current OSM practice is to not abbreviate anything, at least for street names. I don't think it would be good to loose the unambiguous 'Business' for 'Bus' in this case.

comment:4 in reply to:  3 Changed 9 years ago by NE2

Replying to Ldp:

Replying to NE2:

How simple would it be to "cut" the ref at a semicolon so it displays, even if not all the routes are shown?

Relatively simple, although if the total compound string length is under the max, and you actually do want to show both in a single shield, things get complicated again. Some refs, like 'A4;A29' are actually short enough to render already.

My idea was to only cut it if it would otherwise not show. In other words, find the last semicolon in or before position 9, and render only what's before it.

The single routes could be solved by making common abbreviations like Alternate->Alt and Business->Bus (yes, signs often abbreviate it Bus, despite possible confusion with a bus roadway, especially by analogy with Truck). The limit (currently 8) would have to be upped slightly (to 10) in these specific cases.

Current OSM practice is to not abbreviate anything, at least for street names. I don't think it would be good to loose the unambiguous 'Business' for 'Bus' in this case.

Oh, I mean having the renderer do the abbreviation.

comment:5 Changed 8 years ago by NE2

Priority: majorcritical

Bumping this up to critical. Sorry if this is a bad thing to do, but this is a major issue in countries with overlaps. As two examples, these long sections of freeway get no labels: http://www.openstreetmap.org/?lat=32.4068&lon=-88.5502&zoom=13&layers=M ref=I 20;I 59 http://www.openstreetmap.org/?lat=41.6321&lon=-108.3838&zoom=13&layers=M ref=I 80;US 30

Some time ago, semicolons were changed to be parsed as carriage returns in highway=motorway_junction name=* tags. This might be the easiest solution: create a multiline label and expand the rounded rectangle to fit. (It wouldn't fix 'bannered' routes like Alternate and Business, but those can be handled separately.)

comment:6 Changed 8 years ago by Ldp

Then again, if you remove those unneeded spaces from the refs, they're suddenly 2 characters shorter and might render. ;)

Not a fan of multiline refs the way you describe. I'd rather get them all rendered as single shields. I once tested that, but mapnik just kept trying to put the shields for the 2nd ref at the exact same locations as the already rendered 1st ref. I should try again with current mapnik versions, or nag the authors a bit more.

comment:7 in reply to:  6 ; Changed 8 years ago by NE2

Replying to Ldp:

Then again, if you remove those unneeded spaces from the refs, they're suddenly 2 characters shorter and might render. ;)

The spaces are part of the standard, and are necessary where alphanumeric designations are used (how would anyone know that CRAP is County Road AP?) And if one were to remove the spaces just for the sake of rendering, these would just barely fit, and longer ones still wouldn't.

comment:8 in reply to:  7 Changed 8 years ago by Ldp

Replying to NE2:

The spaces are part of the standard,

OSM or US ?

and are necessary where alphanumeric designations are used (how would anyone know that CRAP is County Road AP?) And if one were to remove the spaces just for the sake of rendering, these would just barely fit, and longer ones still wouldn't.

I know it will just move the problem to longer compound refs. Mind the smiley.

It wasn't possible in the past to render the constituent refs as separate shields, but as I said, I'll try it again soon.

comment:9 Changed 8 years ago by NE2

I just looked through an old Rand McNally? atlas and it uses multiline shields for overlaps. It may not be as good as separate shields, but we shouldn't let the perfect be the enemy of the good.

comment:10 Changed 8 years ago by Minh Nguyễn

Cc: mxn@… added

comment:11 Changed 8 years ago by rw__

Owner: changed from mapnik-team@… to rw__
Priority: criticaltrivial
Status: newassigned
Type: defectenhancement

Not a defect. Not Critical. Other solutions available.

comment:12 Changed 8 years ago by rw__

Resolution: wontfix
Status: assignedclosed

Closed.

Note: See TracTickets for help on using tickets.