Opened 13 years ago

Last modified 13 years ago

#3675 new enhancement

Better highway labeling for multiple names and labels

Reported by: woodbri Owned by: sdlime
Priority: normal Milestone:
Component: MapServer C Library Version: unspecified
Severity: normal Keywords:
Cc: tbonfort, rgreenwood

Description

We need to be able to handle more complex labeling of Highways and streets in mapserver. For example:

http://maps.google.es/?ie=UTF8&ll=40.847328,-2.869599&spn=0.004188,0.009645&z=17

Highways might have multiple route numbers like A-2 and E-90 along with a name that needs to be labeled ANGLE FOLLOW like the example above.

For streets, there might be multiple names associated with it. In this case, we need to alternate the names. This has the problem that we do not know what name is used in the adjacent segment, but I'm thinking that similar to MINDISTANCE, that we could find which label if closest and then use the other label.

Currently, mapserver generates a single label point, it would be helpful to have it generate 3+ potential label point along the physical or visible segment that could be used. Label point could also be defined as a percentage of the length, like:

LABELPOINTS 0.1 0.3 0.6 0.9 END

So it seems like it would be most efficient to label all points in the same pass through the data, but maybe we have to take multiple passes via multiple layers. In one pass doing something like:

LABELITEM "NAME1" 1
LABELITEM "NAME2" 2
LABELITEM "NAME3" 3

Which would use LABELPOINTS 1, 2, and 3 respectively.

LABEL
  ITEM 1
  ...
END
LABEL
  ITEM 2 3
  ...
END
etc

Two link a label block to a specific LABELITEM field and LABELPOINT.

OK, my intent is not to design this, but to suggest some ideas, that might make this viable in the mapserver environment.

Change History (3)

comment:1 by tbonfort, 13 years ago

Cc: tbonfort added

comment:2 by rgreenwood, 13 years ago

Cc: rgreenwood added

comment:3 by rgreenwood, 13 years ago

I too would find it useful to have the ability to generate multiple label points along a single line. For example, I need to annotate the highway shown in this example:

http://maps.google.com/maps?q=jackson,+wy&hl=en&ll=43.432104,-110.781541&spn=0.015395,0.027595&sll=37.0625,-95.677068&sspn=34.396866,56.513672&vpsrc=6&hnear=Jackson,+Teton,+Wyoming&t=m&z=15

Four numbered US highway routes are all on the same line. In this case it would be nice to have them clustered fairly close together rather than evenly spaced along the length of the line as it more clearly indicates that this one line is know by four different route numbers.

Note: See TracTickets for help on using tickets.