When illustrating roads we will often want to show principal highways or other roads using lines that have "borders" on the edge of the lines with the borders naturally being spliced together at intersections.
This is an easy effect to achieve in Manifold. Although Manifold includes a bordered line style, using the default bordered line style does not achieve "splices" at places where several line segments come together. The technique described in this topic will create seamless splices at such intersections.
Step 1: Import and clean up the drawing
For this example we will import the bay_roads_eg.mif drawing.
After importing, we will create a map from the drawing, open the map and zoom in as seen above. Note that the example drawing contains points at the intersections of the road lines. We will eliminate them.
To do so, we set selection modes to select points and to not select areas or lines.
Choosing Edit - Select By Type will select all of the points in the drawing.
We can then choose Edit - Delete (or press the Delete button or press the Delete key) to delete the points
Step 2: Duplicate the layer
Next, we will duplicate the layer. To do so, right click on the Bay_roads_eg Drawing layer tab and choose Duplicate.
A new drawing layer called Bay_roads_eg Drawing 2 will appear in the map just above the original layer. The map will not change appearance since the duplicate exactly overlays the original layer and (thus far) is formatted identically.
Step 3: Format the layers
The final step is to format the two layers to provide the desired appearance. We begin by clicking on the lower layer tab (Bay_roads_eg Drawing) so that the focus is on that layer.
Change the thickness of the lines in that layer by clicking on the size button for lines in the Format toolbar and choosing 6 for the size.
The result is that the lines in the lower layer become very much thicker.
We now click on the layer tab for the upper layer (Bay_roads_eg Drawing 2) so that the focus is on that layer.
Change the color of the lines in that layer by clicking on the foreground color well and changing the color to yellow.
With the color change we can see the yellow lines in the upper layer above the thick black lines in the lower layer.
We can now increase the thickness of the yellow lines in the upper layer by changing their size to 4.
This provides the desired effect.
We can create many variations by mixing different format styles in different layers.
For example, if we format the upper Bay_roads_eg Drawing 2 layer as seen above we can create dotted line highways.
The dotted lines in the center of the highways are created because the upper layer uses black for the dots and a wider, size 4 yellow line for the outline of the dotted line.
We can create maps of great complexity using the above method. In fact, we can combine many layers into a map and arrange Zoom Ranges on the layers so that as we zoom in road lines that are initially shown as single, thin lines begin appearing as bordered lines as seen above. To do this, specify Zoom Ranges so that the layers showing thin lines switch off at the zoom level at which the bordered line layers switch on.
Tech Tip: Interweaving Lines
Maps of great depth can be created by stacking layers and using the formatting shown above. However, all objects in a given layer will be seen above all objects in layers below them. On occasion we may want to create an "interwoven" line that is sometimes above and sometimes below objects in different layers. This requires additional work, but it can be done if the visual effect merits the extra work. The rest of this topic describes an intermediate method that would rarely be done but is nonetheless interesting as an example of the great flexibility of Manifold tools.
Suppose we wish to draw an interwoven line that is sometimes above the yellow roads and sometimes below them. We create two drawing layers called above and below where the above layer is above the yellow roads layers and the below layer is below the yellow roads layers. Beginning at the lower left of the curved black line we draw a line in the above layer. We then click on the below layer to move the focus there. Turning on Snap to Lines , we can then draw another line that continues the curve, using Snap to be sure it starts exactly at the end of the previous line. We finish this next line before we need to go above the yellow roads.
We then click on the above layer and draw a line that continues the curve above the yellow roads. We continue in this way switching between the above and below layers as necessary to draw the line. The illustration above has had the above layer formatted in red and the below layer formatted in blue so we can see how the intertwining line is made up of many different lines in the above and below layers.
To achieve a bordered line effect for the interwoven line we duplicate both the above and below layers. The lower layer of each pair we format in black color with a size of 6. The upper layer of each pair we format in bright green with a thickness of 4.
An unpleasant effect occurs at the end of each green line where a black border appears. Because Manifold rounds the ends of lines with increased sizes, the black pixels at the end of the above layer are appearing above the green pixels of the Below 2 layer. Curing this is tedious, but possible.
The visually best way of fixing this is to create an additional drawing layer called ends and creating a line that crosses the boundary between the green lines.
If we zoom in we can see how these lines were created. With Snap to Lines turned on we can create a line that runs from the next to last coordinate of one line to its end to the next to last coordinate of the following line.
Zoomed out once more, we format the ends layer in green color with a size of 4. This achieves a seamless effect of an intertwining green line that sometimes goes above and sometimes below the yellow lines. Because the pixels line up perfectly there is no visual clue that the effect is made up of many layers.
The above exercise could be very tedious for a large map. Is there an automated way to sometimes move a line above and sometimes below another layer? If our data set consists of multiple lines where lines at intersections have some data attribute code such as a bridge or underpass code we can select "above" segments by this attribute, cut them out of the initial drawing and paste them into an "above" drawing layer.
If our drawing has no such data attributes, we can take a semi-automated approach of using a grid of lines at suitable resolution and the Intersect Lines transform to chop up a continuous line into many smaller lines. We can then visually select all portions that should be "above" the other lines using Add to Selection mode, cut them out of the layer and paste them into an "above" drawing layer. We can then use Join Lines to reassemble into a smaller set of lines the many lines created by the Intersect transform and left behind in the original layer.
In both of the above cases, creating "end" lines to bridge the dark pixels that appear between lines will be tedious, but at least we will not have to create the many parts of the intertwining line itself.