Curved vs. awkward contour lines

Sonny shared this question 2 months ago
Answered

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, freizeitkarte-osm.de) 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)

f909ebaa5df4b007e35f43d9c7345518


OpenAndroMaps v3: (curved)

275ec6b64e939a33d6b51501b23b7574

OpenAndroMaps v5: (awkward)

56f8395bfe456f2c876f013df9a4afd4:

Replies (3)

photo
1

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,

Petr

photo
2

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.

photo
1

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.

Cheers

Michael

photo
1

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.

photo
Leave a Comment
 
Attach a file