|
I've been working on a technique for labeling contour lines in maps that is more readable and clean than auto-labeling, yet nowhere near as manually intensive as having to do everything by hand in an illustration program. I'm still refining this, but I am narrowing in on a pretty good balance, I think, between manual placement and automated labels. Right now, one of the steps does require surface tools, but there's no reason why this couldn't be done without that extension: it would just take a bit more work. Here's the process, and note that some of these steps can be automated: Step 1. Create your contours. Step 2. Move your major contour intervals (the ones you will be labeling) into a separate component. This isn't necessary, but it makes life a whole lot easier in step 3. Step 3. Using the "line snap" and "line segment snap" options, create points where you want your labels to appear. The use of the snap will ensure the points lie on the contour lines. This part is critical for step 6. Step 4. Cut the points from the drawing and paste them as a new drawing. Name it "label points" or something obvious. :) Step 5. Create a map with the major contour lines and the points as layers. Step 6. Use "spatial overlay" to transfer lines to contained points. This will transfer the heights from your contour lines to the label points drawing. Note that you could do a spatial overlay with the points and the contours in the same drawing, but you eventually have to separate the points out, anyway. If, for some reason, some points don't transfer, then some of your points didn't "snap" to the line segments. Adjust your drawing precision for your label points and use the "attach to" transform to attach them to the contour lines. Step 7. Add a column to the label points drawing for "Aspect". This should be a floating point number. Step 8. Use this SQL query to transfer the aspect from the source surface to the Aspect column (edited as per Nick Verge's correction). Note that this does require Surface Tools: UPDATE [Label points] SET [Aspect]=AspectHeight([Surface],[Geom (I)])+180 We'll use this "Aspect" column to set the label rotation angle. The IIF statements ensure we get (a) positive rotation angles (necessary for thematic formatting) and (b) angles that are oriented for properly for reading on a map. Step 8. Create the labels for the label points drawing. Step 9. Use thematic formatting to set the label rotation. Use the "Aspect" column for the source field, and a method of "Equal Intervals". Select "continuous shading" and 2 breaks. Manually set the range from 0 to 360, with target values of 0 and 360, respectively. This will set the rotation angle to exactly be whatever is in the aspect column. Step 10. Add new points as desired to clarify your drawing.See the attached .map file which shows a sample map. If you were going to create a printed map, you'd probably want to create buffers around your label points and use those to clip the contour lines around your labels to give a proper, finished look. This would be the very last step once you'd settled on an output size and resolution, since Manifold doesn't change the font size with zoom/scale in a map. Only in a layout component would you be able to correctly gauge the required buffer width. Attachments: contour-example.png contour-labeling.map theme-settings.png
|