New vector maps for Locus - feedback

Started by voldapet, December 08, 2012, 16:32:32

0 Members and 4 Guests are viewing this topic.

john_percy

#90
Missing wood
The wood (Everdon Stubbs https://www.openstreetmap.org/query#map=15/52.20507/-1.11537) does not display on the latest LoMap of England (18 September 2025). I have checked it using the internal Hike theme as well as external themes. However the wood is displayed if the latest OAM Great Britain is used.
Using Locus Classic, an older LoMap shows the wood but using the latest LoMap it is not displayed.
The wood is displayed if the online LoMap is used.
It may be relevant that the wood is also a protected area (nature reserve) as I have another problem with a nature reserve where the LoMap version has the area as not closed, while it is clearly closed in OSM and in OAM maps. See my next post.
[Edit] The wood appears at zoom level 11 but disappears at higher zooms with the latest map.
Voluntary and Velocity themes - https://voluntary.nichesite.org
  •  

john_percy

#91
Areas broken for nature reserves
Summer Leys nature reserve - https://www.openstreetmap.org/query#map=14/52.26535/-0.70384 is broken in LoMaps.
Using the latest LoMap of England (18 September 2025), the perimeter of the nature reserve is not closed, although it is closed in the OSM data and also on OAM maps.
I have tweaked my theme to show this in orange on the screenshots below.
If I modify the theme to test for closed=yes, the nature reserve does not show, so for some reason the area in LoMaps is not closed.
This problem has existed here in LoMaps for a considerable time.

[Edit] I have since found exactly the same issue occurs with Sherwood Forest NNR https://www.openstreetmap.org/query#map=13/53.20855/-1.08195
Like Summer Leys above, the area is not closed in LoMaps but is in OAM maps, consequently it will not fill correctly.
Voluntary and Velocity themes - https://voluntary.nichesite.org
  •  

voldapet

#92
Hi John,

Thank you for the detailed report. I generated a completely new England map using the latest official Mapsforge writer and reviewed the reported issues. The Sherwood Forest NNR and Summer Leys Nature Reserve appear to be fine—please see the attached screenshots (using the internal theme).

However, Everdon Stubb is indeed broken. The issue seems related to map tile clipping—the polygon is likely not correctly closed at the edge of the map tiles. I'm not sure why OAM works correctly; perhaps it uses some pre-processing or a different bounding box enlargement. I'll investigate this in more detail over the next few days.

EDIT: problem is caused because of combination natural=wood and boundary=protected_area. The protected area is processed with force-polygon-line="true" (to correctly display the dashed green border). For this reason is polygon represented as line and isn't closed. I'll consider if there is (quick) way for improvement...

Thanks
Petr

  •  

john_percy

#93
Quote from: voldapet on December 18, 2025, 21:59:08I generated a completely new England map using the latest official Mapsforge writer and reviewed the reported issues.
I can't tell from your screenshot of Summer Leys whether the issue is now resolved. The perimeter line appeared fine before (and still does) but I couldn't do a correct fill with my theme as the area wasn't actually closed. I don't think the internal themes do any kind of fill on nature reserves, so your screenshot doesn't help.
The problem with Everdon Stubbs is more complicated. Not only is the area not closed, but the natural=wood attribute seems to have been lost. It won't even do an incorrect fill of the wood (though it will do an incorrect fill of the protected area). I'm not sure what attribute you are filling in your screenshot. Also, looking at the OSM data, the first node is the same as the last one, which I assume means that this is a closed area.
Voluntary and Velocity themes - https://voluntary.nichesite.org
  •  

voldapet

Ah, I hadn't noticed your last post and went ahead editing my post from yesterday
Problem is caused because of combination natural=wood and boundary=protected_area. In LoMaps is the protected area  processed with force-polygon-line="true" (to correctly display the dashed green border). For this reason is polygon represented as line or several lines in the map file and isn't closed.
  •  

john_percy

#95
Quote from: voldapet on Yesterday at 14:14:26In LoMaps is the protected area  processed with force-polygon-line="true"
Which also means that I can't reliably use a fill for protected areas. Some protected areas apparently remain closed however.

Voluntary and Velocity themes - https://voluntary.nichesite.org
  •  

voldapet

Exactly, and we can't fill forest areas that are also designated as protected areas. The best solution might be duplicating the protected areas under a different key, such as ls_boundary=protected_areas, but that would invalidate all existing themes. Difficult decision...
  •  
    The following users thanked this post: john_percy

john_percy

#97
That does seem to be the way to go. See Emux's post: https://github.com/mapsforge/mapsforge/discussions/1698#discussioncomment-13332663
If I might suggest and if it is possible:
1. Duplicate the protected_area with a different key instead of boundary, lm_boundary=protected_area (say) and inherit all its attributes.
2. Remove all other attributes from the first version except boundary=protected_area, do force_polygon=line and add a new attribute fpl=fpl_yes. This will be used for drawing the perimeter with no changes needed in themes. Third party themes can choose to fill this area in (eg) OAM maps but not in LoMaps by testing for fpl=~. If a theme is left unchanged the display is no worse than currently.
3. You need do no changes to the copied area. Forests etc will display correctly with no changes in the themes. Third party themes can use the lm_boundary key to fill protected areas in LoMaps if they wish. Again, if the theme is unchanged the display is no worse than currently.
4. The rules become (in outline):

rule: natural=wood|forest
  draw fill of wood
/rule

rule: boundary|lm_boundary=protected_area, closed=yes
  rule: fpl=~
    draw fill of protected area
  /rule
/rule

rule: boundary=protected_area
  draw perimeter of protected area
/rule

[EDIT] By the way, your current force_polygon_line routine seems to lose the wood entirely, not just leave it attached to an unclosed area. As it stands, the protected area fills badly (as expected) but the wood does not fill at all and does not appear.
Voluntary and Velocity themes - https://voluntary.nichesite.org
  •