Imagico.de

blog

Pipelines rendering
Pipelines rendering

Drawing the line #4 – Plumbing

| 1 Comment

This post adds another chapter to my previous series of posts on line signatures in maps.

Back in the first part of the series i explained and illustrated how the sophisticated techniques in using line signatures in pre-digital maps have practically largely been replaced by rather primitive line drawing in digital map production. And i showed some methods how you can, in digital rule based map design, work around these limitations.

Here i want to supplement this collection of techniques with some ideas on line dashing.

Dashing

Interrupted lines with dashing and dotting are one of the techniques that survived the transit to digital map production. Line dashing is available in most digital map rendering frameworks, often including the ability to define complex dashing patterns through dasharrays. This allows, in principle, to digitally reproduce many design concepts developed in pre-digital maps that make use of line dashing. But, if you look closely, the level of quality of drawing with dashed lines in digital maps is often rather low.

Here are a few examples of pre-digital use of dashing in maps:

1947 reprint of 1942 Japanese gaihōzu map of Seoul, Korea

1947 reprint of 1942 Japanese gaihōzu map of Seoul, Korea

Polish 1:25k map sheet M-34-101-A-c (Rysy) from 1960

Polish 1:25k map sheet M-34-101-A-c (Rysy) from 1960

Landeskarte der Schweiz 1:25000 1993 Blat 1268 Lötchental

Landeskarte der Schweiz 1:25000 1993 Blat 1268 Lötchental

Italy 1:50k US wartime map based on Italian 1:25k from 1934

Italy 1:50k US wartime map based on Italian 1:25k from 1934

What these examples demonstrate is how dashing adds another dimension of differentiation to simple line signatures (apart from line width and color) and also how more complex shapes of dashes can be used to highlight specific line element classes – like it is frequently used in case of boundaries.

What you can also see when you look closely is that in practical drawing the dashing is not just a simple mechanical repetition of a certain dash + gap sequence along the line with pre-defined dimensions. The dashing is adjusted to the context, usually in a way that ensures the individual line segments start and end on a dash – or, in case of junctions, that there is no gap directly at the junctions.

Pipelines in OSM-Carto

Digital rule based map styles typically do not do this – they mechanically and blindly repeat the defined dashing pattern along the line. For simple dashings this is often not that much of a problem, but for more complex patterns generated using dashing it frequently is. A good case example for this in OSM-Carto are pipelines.

Pipelines at z18 in OSM-Carto

Pipelines at z18 in OSM-Carto

Pipelines at z19 in OSM-Carto

Pipelines at z19 in OSM-Carto

Pipelines are rendered in OSM-Carto with a somewhat complex dashing pattern that is meant to resemble tube segments with flanges in a simplified form. In principle, this is an intuitive approach to showing pipelines. It even allows visualizing the substance through the choice of fill color at the higher zoom levels. The very mechanical drawing of the pattern, however, causes problems:

  • The drawing starts at an arbitrary position in the pattern (in this case with a flange) at the start of each linestring. This looks odd at junctions and when a pipeline is split in mapping into several segments, for example to apply different secondary tags.
  • Flanges can occur arbitrarily at any position along the line, in particular also at junctions and at sharp corners.
  • In addition, the individual line strings are drawn strictly one after the other with both casing/flanges and fill – leading to junctions not being displayed as connections of the pipelines.

Pipelines improved

Here is how the improved rendering in the AC-Style now displays the same configuration.

New pipeline rendering in the AC-Style at z18

New pipeline rendering in the AC-Style at z18

New pipeline rendering in the AC-Style at z19

New pipeline rendering in the AC-Style at z19

This is primarily achieved by two things:

The dashing pattern is adjusted in length and phase to the line length in a way that they start on a pipe segment in the middle between flanges and end in the same fashion.

Dashing pattern adjustment to the segment length

Dashing pattern adjustment to the segment length

And the pipelines are split at intersections among themselves and with other line features, specifically roads, and at the same time separately mapped pipelines are merged where two of them meet end to end when they share relevant attributes. Furthermore, the dashing is also split at sharp corners.

Dashing adjustments when pipelines intersect with roads

Dashing adjustments when pipelines intersect with roads

In addition, the pipeline rendering is integrated into the road layer so pipelines are correctly layered both relative to each other and relative to roads. And they are shown with a correct drawing order for casing and fill.

Pipeline layering relative to other pipelines and roads

Pipeline layering relative to other pipelines and roads

I also re-designed the use of color to visualize the substance transported in the pipeline.

Different line colors used for different substances at z19

Different line colors used for different substances at z19

The zoom level progression remains similar to that in OSM-Carto with some smaller adjustments.

Zoom level progression of the pipeline rendering

Zoom level progression of the pipeline rendering

Real world examples

Fuel pipelines at z18 at the Frankfurt Airport

Fuel pipelines at z18 at the Frankfurt Airport

Gas and unspecified content pipelines at z18 in St. Petersburg, Russia

Gas and unspecified content pipelines at z18 in St. Petersburg, Russia

Hot water pipelines at z18 in St. Petersburg, Russia

Hot water pipelines at z18 in St. Petersburg, Russia

Conclusions

What i demonstrated here is that use of line dashing with current map rendering frameworks is not strictly limited to the primitive mechanical application of a static dashing pattern, as it is common in automatically rendered maps these days. Achieving high quality dashing with the techniques shown here requires both dynamically adjusting the dashing pattern to the individual geometry and splitting and merging geometries based on their shape, geometric context and topology. The dynamic dashing pattern adjustment also requires a custom modification to Carto that allows defining dasharrays through fields.

The benefit of doing this is a much clearer and much better readable map image with fewer artefacts and a more organic depiction of dashed features.

The implementation of what i described in this blog post can be found in the AC-Style.

One Comment

  1. Pingback: weeklyOSM 750 – weekly – semanario – hebdo – 週刊 – týdeník – Wochennotiz – 주간 – tygodnik

Leave a Reply

Required fields are marked *.



By submitting your comment you agree to the privacy policy and agree to the information you provide (except for the email address) to be published on this blog.