This object is in archive! 

Curved vs. awkward contour lines

Sonny shared this question 16 months ago

I noticed that on some maps there are quite good-looking curved contour lines (LoMaps, older OpenAndroMaps v3). But sadly on some other maps (newer OpenAndroMaps v5, they are rather awkward (independent of the used Theme) - which looks artificial compared to other curved elements on the map like streets or rivers.

The beautiful curved contour lines just appear within Locus. The same maps within other apps (Orux or Cruiser) are looking awkward too (independent of the used Theme). So it seems that Locus applies some kind of "Bézier curve"-filter. But not to actual maps based on Mapsforge v5.

Do you have an idea of the reason and are you able to make curved contour lines work for Mapsforge v5 maps too?

LoMaps: (curved)


OpenAndroMaps v3: (curved)


OpenAndroMaps v5: (awkward)


Replies (3)


LoMaps and other Mapsforge V3 maps are rendered using our internal fork of Mapsforge lib. We created several render rules those weren't available in the official renderer and they were made basically only for LoMaps and the internal LoMaps theme. One of them is a directive to render lines as a cubic curve and it's used for contour lines. So any V3 map with Locus theme can use using curve="cubic" attribute

<line stroke="#A07F5F" stroke-width="0.18dp" curve="cubic" />
But the Mapsforge V4/V5 maps are rendered by the official Mapsforge renderer where this option isn't very likely available (I'm not so familiar with the official render possibilities)

To be honest, we have been planning for maybe two years to switch LoMaps to V4 and pull the potential renderer improvements into Mapsforge repo. But we're still on V3 because there's always been something more important...




Thanks for your good explanation Petr!

I think people would appreciate if Locus-Team would cooperate with Mapsforge-Team regarding curve="cubic" attribute within the developement of the official Mapsforge renderer. It would be a pity if such a beautiful feature and know-how would get lost and not be used any more.


Tbh: the key quality indicator is the source of the contour information. OAM uses Sonny's LIDAR based data for (most of) Europe. And I think LoMaps use the same data.

Did you do the maths to evaluate the difference between cubic and straight lines? I agree aesthetics can be a criteria, but the practical difference is nil.

Just my 2c.




Honestly, we haven't tested it. We used to use data only from SRTM when we created this parameter. The accuracy of cubic lines wasn't so important because of the original accuracy of SRTM data itself.

You're right that it's possible that some details are lost when the precise Lidar data are used for generation. But on the other hand I have to say that the contour lines are generated from SRTM3 dataset and the details may be lost in the data resolution.

Replies have been locked on this page!