[GIS] Rendering overlapping lines

cartographygeneralizationopen-source-gisoverlapping-features

I am making a map containing information about public transportation: busses, trams, etc. The map will have a layer containing for example the tram lines. Each line has its own colour, and is represented by a line string geometry.

The problem is, many of the lines have overlapping parts, where more than one tram line cover the same section. To show this to the user, I'd rather want the lines to run parallel to each other instead of being drawn on top of each other. For an example, see how Google Maps show the New York subway lines.

I suspect this is a quite common problem in cartography, but don't know what terminology I should search for.

I am using PostGIS/GeoServer/OpenLayers as my stack, but any open source solution would be acceptable.

Best Answer

If you're interested in learning more about this area, the problem is named cartographic displacement, and its one aspect of cartographic generalization.

A couple of articles discussing displacement and approaches for handling the problem: