Skip to main content

I have been trying to label contour lines as a learning exercise into FME. I am starting to get my workspace more or less dialled, and am now trying to straighten out the last quirks. Have a look at the "600", "200" and "500" in the middle of the image. The Labeller has placed them at unfortunate spots, and they are rotated away from the general direction of their contour lines. It would look much neater if they where placed along a straighter stretch of their respective lines. How could I achieve this? I imagine that this would be quite resource intensive for a larger area? So method efficiency should probably be a consideration?

You could try generalizing your countour line before creating the labels, that should hopefully iron out (most of) the kinks that are introduced due to the very detailed lines. You could then use the AnchoredSnapper to snap the label point back to the original contour line.


I totally agree, generalize the lines before labeling them (but not too much, you don't want contour lines to cross).

 

 

Alternatively, you may want to try the MapTextLabeller, it is an extra-cost plugin but I think it has some smarter algorithms for the placement of the numbers than the regular Labeller.

 

 

I do think that in these cases the human touch still can't be beat by machines.

 

 

 


You could try generalizing your countour line before creating the labels, that should hopefully iron out (most of) the kinks that are introduced due to the very detailed lines. You could then use the AnchoredSnapper to snap the label point back to the original contour line.

I totally agree, generalize the lines before labeling them (but not too much, you don't want contour lines to cross).

 

 

Alternatively, you may want to try the MapTextLabeller, it is an extra-cost plugin but I think it has some smarter algorithms for the placement of the numbers than the regular Labeller.

 

 

I do think that in these cases the human touch still can't be beat by machines.

 

 

 


Thanks for the suggestions! I played around with the Generalizer a bit but felt that while it solved some issues it also introduced a bunch of new ones. Some labels that where previously straying where now brought back to line. Meanwhile others decided to go wandering...

Is there a way to measure the contour lines to find suitable stretches of real estate where the line is fairly straight? That would of course also require that one could somehow move the point/labels to those locations.

Is there an alternate way to distribute points in the same way that the labeller works? I don't really need to generate the labels until much later, so a point object that has settings for distribution and picks up a rotation value from "it's" line might be interesting to experiment with.

And I agree that machine probably wont beat man here. But I am curious to see how close I can get. :)


Thanks for the suggestions! I played around with the Generalizer a bit but felt that while it solved some issues it also introduced a bunch of new ones. Some labels that where previously straying where now brought back to line. Meanwhile others decided to go wandering...

Is there a way to measure the contour lines to find suitable stretches of real estate where the line is fairly straight? That would of course also require that one could somehow move the point/labels to those locations.

Is there an alternate way to distribute points in the same way that the labeller works? I don't really need to generate the labels until much later, so a point object that has settings for distribution and picks up a rotation value from "it's" line might be interesting to experiment with.

And I agree that machine probably wont beat man here. But I am curious to see how close I can get. :)

Did you snap your labels back onto the original geometry using the AnchoredSnapper?

 

Also, you'll probably have to play around with the Generalizer parameters. You should probably also look at the SherbendGeneralizer transformer.

Reply