Locus Map - forum

Development => Other features => Topic started by: Menion on February 20, 2023, 22:04:30

Title: LoMaps + MapsForge V4
Post by: Menion on February 20, 2023, 22:04:30
Hi guys,
finally, after years, we are preparing LoMaps based on the latest MapsForge V4 library.

Useful info (numbered so it may be easier to ask for additional info if needed).

1. Required Beta version 4.14.2.3+: http://bit.ly/lmVersionsTest

2. App contains the latest public code for MapsForge lib. So not the latest official 0.18.0 version, but 0.18.0 + latest changes and fixes: https://github.com/mapsforge/mapsforge/blob/master/docs/Changelog.md#new-since-0180

3. LoMaps, for testing of the new theme (currently only Europe) are prepared here: http://bit.ly/3IFmOS4

4. Public repository with the latest "LoMaps offline theme" and also tagging file is here: https://github.com/asamm/lomaps-mapsforge . Seems that @voldapet has to add some "readme".

5. You may notice that themes contains also a separate "poi" theme. This is a special addition currently only for internal LoMaps that affect the display of offline LoPoints (the base map theme does not contain instructions for the LoPoints icons at all). If interested, I may add support for this for public themes as well.

6. The New MapsForge library contains many useful improvements and also some fixes that may be interesting for overcomplicated hacks that are done in OpenAndroMaps regards colors (more here: https://github.com/mapsforge/mapsforge/pull/1366 )

7. Here also comes the idea to unite tag-mapping-xml (https://github.com/asamm/lomaps-mapsforge/tree/main/various/tag-mapping-xml) for main MapsForgeV4-based maps. This should make a life for all theme creators so much easier. What do you think, mainly @Tobias?

8. I would also like to notify all map creators who have themes created for current V3-based LoMaps (and others) about this, namely: @john_percy , @Magellan , @karlchick , @LocusUser#1 , @Tobias, and others ...

9. And the last. If you notice any issue in the rendering system for V4 maps, feel free to ask me as well. I may help here a little bit.

10. New maps are not compatible with current public maps, so auto-loading won't work between them.

Uff, hope this is all. Thanks for reading and testing if someone will want to try it  ;)
Title: Re: LoMaps + MapsForge V4
Post by: Andrew Heard on February 21, 2023, 02:32:48
Well done @menion. I did some mucking around with the Ireland map, checking LoPoints. Twice LM completely froze with apparent high CPU load although not detected by Android as a crash. Even screen capture would not work. I just had LoPoints "around" for some category. Nothing too taxing. After re-run, LM displayed start-up screen but not Loading... & got no further until full restart. I wasn't sure what.ZIP theme file to use from Github so was just internal LM theme.
Title: Re: LoMaps + MapsForge V4
Post by: Menion on February 21, 2023, 07:43:55
Froze? Hmm quite unexpected. Anyway maybe I see something in automatic crash reports, thanks, will look at it.

Themes > use internal. I've mentioned our repository just for theme creators or those who are interested in what is on the background.
Title: Re: LoMaps + MapsForge V4
Post by: Andrew Heard on February 21, 2023, 08:04:29
Worse since - going all very slow. Even after phone reboot. Using New Zealand map. Gave up - LM essential for holiday; silly of me to test while away. Reverted to public 4.14 as previous .1 beta APK no longer available. Backup/ restore perfect, I think. Now no problem.
There was no crash so don't expect a report.
Title: Re: LoMaps + MapsForge V4
Post by: michaelbechtold on February 21, 2023, 09:03:36
I'm not suffering like Andrew did, vector and raster maps fast and smooth. However, all vector maps show up in maps manager and in nearby list THREE times. I've imported one V4 LoMap and only then noticed. So I cannot tell if that issue was present before tth import already.
Regardless of the beta pain to come still, I'm happy about your contributions to MF and the move of LoMpas to V4. I.e. pain well spent :-)
Cheers
Michael
Title: Re: LoMaps + MapsForge V4
Post by: balloni55 on February 21, 2023, 12:54:37
my first impressions
- opening the theme window takes ~25 sec regardless which V4 card or theme is used
- neither in the map name nor in the map details the "normal user" can see that it is a V4 map

EDIT
in addition, the existing V3 map is overwritten without request and since I use LMP in parallel, this map is no longer available there
Title: Re: LoMaps + MapsForge V4
Post by: Andrew Heard on February 21, 2023, 21:14:59
Quote from: michaelbechtold on February 21, 2023, 09:03:36I'm not suffering like Andrew did, vector and raster maps fast and smooth
maybe some southern hemisphere issue? I could do more rigorous testing if home, but not while on holiday.
Title: Re: LoMaps + MapsForge V4
Post by: T-mo on February 26, 2023, 17:32:27
- chosed 1 of the linked LoMaps and copied .osm.map to a dedicated folder inside mapsVector, skipped the poi.db
- offline-theme #4: put theme.xml and the 3 icon-folders to a separate directory and zipped it (compression none, store). Put this zip into mapsVector/_themes/

everything buttersmooth using new LoMap with this MF-theme and also with any other installed theme, no delays, theme-layers and switches all like expected
Title: Re: LoMaps + MapsForge V4
Post by: Menion on February 28, 2023, 14:49:24
Hi guys,
thanks for useful info.

Version with fixed slowdown (hopefully is in preparation). The issue was in the MapsForge itself and in the way, how we use repeated symbols along the line.

New maps for Europe are already uploaded on Google Drive. The New Beta app version will be published tomorrow (or today evening).

@Tobias maybe this (https://github.com/mapsforge/mapsforge/pull/1393) may be interesting for you. If you also find a while to verify that the rotation of symbols works correctly, it will be fine, thanks.

Title: Re: LoMaps + MapsForge V4
Post by: Andrew Heard on February 28, 2023, 20:40:40
Quote from: Menion on February 28, 2023, 14:49:24this (https://github.com/mapsforge/mapsforge/pull/1393) may be interesting for you
wow - huge effort - impressive results
Title: Re: LoMaps + MapsForge V4
Post by: balloni55 on March 01, 2023, 13:36:59
Quote from: balloni55 on February 21, 2023, 12:54:37my first impressions
- opening the theme window takes ~25 sec regardless which V4 card or theme is used
- neither in the map name nor in the map details the "normal user" can see that it is a V4 map

EDIT
in addition, the existing V3 map is overwritten without request and since I use LMP in parallel, this map is no longer available there
no answer and no improvement with V4.14.2.4 and new map 20.02.2023
Title: Re: LoMaps + MapsForge V4
Post by: Tapio on March 01, 2023, 15:29:57
I have general questions:

a) Any difference to the available OAM Mapsforge V5 maps?
b) When will they be in the store?
c) Are they still exclusively used for e. g. retrieving the city name (for track naming)?

I noticed having more *.db of the same area (one is from asamm, the other from OAM) is not ideal. When I display Lopints Offline via the "Map-screen content" it displays many points twice because of the two databases.
Title: Re: LoMaps + MapsForge V4
Post by: karlchick on March 02, 2023, 11:36:21
Some initial thoughts from me:

Point 1:

I see bicycle=designated is added.

Could we include the following?
   - bicycle=no|yes|designated|permissive
   - foot=no|yes|designated|permissive
   - horse=no|yes|designated|permissive


Point 2:

In the UK we have footpaths and bridleways that are legally protected and signed along their routes - these are known as Public Rights of Way (PROW).

OSM has inluded tagging for these ways (designation):

   https://wiki.openstreetmap.org/wiki/Key:designation

and has the following guidance for usage:

   https://wiki.openstreetmap.org/wiki/Access_provisions_in_the_United_Kingdom

Would it be possible to include this designation tag in LoMap maps?

For the UK, the following values would be useful: public_footpath, public_bridleway, restricted_byway, byway_open_to_all_traffic.
The following values are also used in Isle of Man: access_land, public_cycleway, green_lane.
The following values are also used in Scotland: core_path.

This would provide a massive improvement to be able to indicate footpaths that are of interest to hikers, cyclists and horse riders:
   - bridleways can often be part of a highway=track + designation=public_bridleway - these are currently not displayed in LocusMap but are quite common.
   - bridleways (in the UK at least) are also legally accessible for cyclists - some are sealed and useful to road-bikes but some not and need off-road bicycles.
   - many footpaths in OSM are foot=designated but only because there is a general (Cycle|Foot) signage used by the councils to indicate a shared space footway - these are publicly accessible paths, usually pavements, cyceways, side_walks, combined cycle lanes and footpaths - most are in/around towns. They are not PROW but if rendered as "footpaths" clutter the map with many "additional" paths, resulting in a "can't see the wood for the trees" situation for the walker...


Point 3:

Car parking amenities seem to be growing in OSM over the last year, to the point that the maps are starting to be cluttered with many additional parking=side_street.

Could you include the parking=* tag to help identify which car parking amenties are dedicated off-street parking from the many on-street packing, see:

https://wiki.openstreetmap.org/wiki/Key:parking

This tag is also useful for being able to indicate multi-storey and underground car parks.

When combined with access tag, it allows to identify those car parks that are publicly accessible and likely destinations for people arriving somewhere to park.


Point 4:

I see that many of the appear-zoom levels have been tweaked, some appearing much later...

I noticed when we went from v3 to v4 for OAM that there is a difference in visual scaling between LoMap and v4 maps of the same zoom level.
e.g. zoom=16 in LoMap appears similar in scale to zoom=15 in v4 maps.
This has the effect (for the user) that symbols/ways seem appear much later in v4 maps. When you zoom out in v4 maps you seem to get less information compared to when you switch to LoMap.
...so I was a little surprised to see some appear-zoom levels being increased for some tags...


Point 5:

The OAM maps have recently added OS crag data available from  OS open data. I think Christian did some magic scripting behind the scenes to make this possible for OAM and it is a massive improvement for UK maps.
Is this something that might be considered for LoMap v4?


Point 6:
In OAM maps the map tagging separates out common tag values, e.g. foot=yes and bicycle=yes are transformed into foot=ft_yes and bicycle_bic_yes.
I'm wondering if this is something that is desirable for LoMap v4 maps?
I'm not 100% sure why this was done, but is does mean that you can OR together many tags and check for specific instances of common values like ft_yes or bic_yes.
Perhaps this is now resolved with the bugfix to the double tag issue mentioned earlier?
Title: Re: LoMaps + MapsForge V4
Post by: Andrew Heard on March 03, 2023, 05:49:20
4.14.2.4: after crashing with previous beta .3 & revert to public APK, I took the risk & installed latest anyway - and so far none of the previous issues with black screen or freezing - well done @menion.
Title: Re: LoMaps + MapsForge V4
Post by: voldapet on March 03, 2023, 11:38:50
@karlchick

Thank you for the detailed description. To your points:
I created a new PR that summarizes your suggestions. Please check if acceptable. BTW: repo is public so feel free to participate and create your own pull requests  ;) .
https://github.com/asamm/lomaps-mapsforge/pull/3/commits/194b33ca583a385f973a32db2ea8b83507376bf7

Point 1
- make sense, added
BTW: are there any standard symbols or styles that indicate designation in the UK maps?

Point 2
- added but I'm not sure if tags access_land, public_cycleway, green_lane will be used ...

Point 3
- I would like to avoid using '*' for such elements. I have therefore selected the most important / most used types

Point 4
- the LoMaps V3 was generated as 512x512 tiles and zoom or area is really "shifted" in comparison of 256x256 V4 tiles. There were minor changes in `zoom-appear` attribute for some elements. But it was mainly for zoom-levels 9 - 10 (I think). Do you have some specific requests to change the zoom-appear for certain elements?

Point 5
Well, everything is possible. But there are so-called JohnThorn maps in Locus Store. These maps combine OSM data with OS open data. John Thorn created powerful tools to combine the data but the theme would be (IMHO) a little bit better. What about contacting John and discussing with him a better theme?

Point 6
To be honest I don't know the exact reason for `foot=ft_yes` and `bicycle_bic_yes` but it was very likely because bug in tag matching in Mapsforge as menion already mentioned. This problem is solved https://github.com/mapsforge/mapsforge/pull/1366 (currently only in Locus and waiting for the new official release of mapsforge.)
Title: Re: LoMaps + MapsForge V4
Post by: karlchick on March 03, 2023, 14:51:45
@voldapet

Thank you for raising the PR.

Regarding: Point 5

John's JohnThorn maps are raster maps, so there is no theming possible within the LocusMap app...

the OAM maps now include (for UK maps) an additional tag:

<!-- OS_OpenData -->
<osm-tag key='os_open_data' value='crags' zoom-appear='13' />

which renders the OS crag data, so from a theme point of view it is very simple to include... but of course there (presumably) was some considerable scripting effort for the map generation to merge in the OS open data.

Attached is an example of using OAM maps before and after OS crags were included.
Title: Re: LoMaps + MapsForge V4
Post by: voldapet on March 06, 2023, 12:07:42
@karlchick

JohnThorn Maps are standard Mapsforge Vector maps (in V3 version I think). So I think it might be possible to create a good map with "GB/OS  style".

We are planning a gradual improvement of LoMaps and I can agree that it might be useful to add some non-OSM data, but there is no precise plan at the moment.
 
Title: Re: LoMaps + MapsForge V4
Post by: karlchick on March 20, 2023, 13:41:42
Quote from: voldapet on March 03, 2023, 11:38:50@karlchick
Point 4
- the LoMaps V3 was generated as 512x512 tiles and zoom or area is really "shifted" in comparison of 256x256 V4 tiles. There were minor changes in `zoom-appear` attribute for some elements. But it was mainly for zoom-levels 9 - 10 (I think). Do you have some specific requests to change the zoom-appear for certain elements?

Point 7, re:Point 4
In OAM most of the natural land features (that can cover large areas) appear from zoom level 12, but in LoMap v4 these are appearing at later zoom levels:

From Z13: beach, cliff, desert, fell, heath, marsh, scree, shingle, valley

From Z14: barerock, earthbank, grassland, sand, rock, wetland

Can these appear from Z12? In fact OAM has sand appear from Z10.

At the moment the map goes very bare when zooming out from Z13/Z14 compared to OAM, see attached.



...and few more requests...

Point 8
Can we include "surface" tag for "highway" and "natural" elements?
I think only tracktype is included, but often only "surface" is set in osm. Being able to differentiate sealed surfaces is very useful to many map users (e.g. using pushchairs, cycles, wheelchairs).


Point 9
Is it possible to include 10m contours? And make contours appear earlier too? E.g. major from Z9, medium from Z10,  minor from Z12.  See attached for comparison of LoMap v4 with OAM at Z12.


Point 10
Can we have "peak_dist" available, this allows the theme to bring peaks into view in sensible order and avoid cluttered view, also to have text size varying based on peaks significance, see attached example, note how LoMap v4 map has all peaks same size font. Note that peak_dist values need to override the default peak appear zoom levels to introduce peaks gradually from Z9 to Z12, see OAM tagmapping file as an example.
Title: Re: LoMaps + MapsForge V4
Post by: karlchick on March 20, 2023, 22:01:12
Point 11
I'm missing a lot of tidal mud areas around some of the British coastline, see attached comparison of OAM vs LoMap v4.

OAM have mapped natural=mud + tidal=yes to be treated the same as wetland=tidalflat.

Can something be done to include mud+tidal in LoMap v4 maps? E.g. treat as wetland=tidalflat, or include natural=mud + tidal=yes...
Title: Re: LoMaps + MapsForge V4
Post by: john_percy on March 21, 2023, 00:26:38
1. The latest beta (4.15.1.2_1097) downloads but won't install for me. Do I need a gold or silver subscription?
EDIT: Aha! The latest "normal" version which I have installed is a higher version number.
2. What advantages will these latest maps have over OAM ones, particularly if you collaborate in unifying tag mapping etc.?

Sent from my moto g(6) plus using Tapatalk
Title: Re: LoMaps + MapsForge V4
Post by: karlchick on March 21, 2023, 09:04:34
Point 12
Since my theme for v4 is currently targeting OAM I am naturally comparing how OAM abd LoMap v4 maps differ.

I've just remembered that landuse for residential areas is very different in Lomaps, which provides "lm_landuse". This tag uses its own method to establish residential areas, but this results in rather approximate areas, see attached which compares building up residential area using various landuse values (RED) in OAM vs using lm_landuse in LoMap (BLUE).

Can we have the missing landuse=residential tag value?
Title: Re: LoMaps + MapsForge V4
Post by: karlchick on March 21, 2023, 10:01:18
Point 13
I have also noticed that LoMaps draws the coastline differently, sometimes pruning parts of the land off. Perhaps LoMap coastline is using some method similar to residential landuse?

The result seems less accurate.

See attached example, bottom is OSM, left is OAM, right is LoMap.
Title: Re: LoMaps + MapsForge V4
Post by: karlchick on March 21, 2023, 10:15:23
Quote from: john_percy on March 21, 2023, 00:26:382. What advantages will these latest maps have over OAM ones, particularly if you collaborate in unifying tag mapping etc.?

For me, I see the advantage that LoMap will have over OAM is they will include different tags, e.g. designation (PROW at last!), building=cathedral, horse, and (to be checked, but hopefully) a carry over of the combined network names when they follow the same sections of ways.
Title: Re: LoMaps + MapsForge V4
Post by: karlchick on March 21, 2023, 18:55:07
Quote from: voldapet on March 03, 2023, 11:38:50@karlchick
Point 1
- make sense, added
BTW: are there any standard symbols or styles that indicate designation in the UK maps?

Point 2
- added but I'm not sure if tags access_land, public_cycleway, green_lane will be used ...

@voldapet
@Menion
Much appreciate you adding these requests to LoMaps, especially points #1 and #2, when can we expect an updated set of maps with these additions included?
Title: Re: LoMaps + MapsForge V4
Post by: john_percy on March 21, 2023, 23:18:25
As far as I can tell none of the hiking trails in England that were present in the previous version are showing up in the new map of England with the beta using either the internal theme or the available theme.xml downloaded from GitHub.




POSTSCRIPT: It seems to be connected with routes which have neither osmc nor sac_scale. Changing line 1246 to test for sac_scale=hiking|~ makes some routes show.
Title: Re: LoMaps + MapsForge V4
Post by: karlchick on March 23, 2023, 11:19:10
Point 14
By overlaying LoMap over OAM map I noticed a missing building=sports_centre, see attached.

Link to osm item: https://www.openstreetmap.org/#map=18/51.74991/-2.22494
Title: Re: LoMaps + MapsForge V4
Post by: voldapet on March 23, 2023, 12:05:27
@karlchick

Point 1 /2
Updated maps (with additions in tag-mapping file) should be available in second half og April

Point 7
I always wooried to add not neccesary data into lower zoom because the size of meta tiles and speed of rendering. But
- I agree that that cliff, valley could appear in zl10
- I'm still not convinced that the rest should be available from zl12 but it has minor effect, so added

Point 8
Do you want to render a surface type in the map? Or you want to use a surface as fallback if tracktype isn't defined? What surface type you'd required? https://wiki.openstreetmap.org/wiki/Key:surface

Point 9
I'm sorry, but are you really sure that the contours in <Z12 have any practical benefit for hikers/bikers?

Point 10
That's a great feature. Honestly, I didn't even know it is available in OAM. I have already discussed some peak priority with one of my colleagues a few months ago and we definitely like it. We'll add it to our TODO list of further improvements.

Point 11
I see. I added `tidal=yes` and `natural=mud`

Point 12
The `lm_landuse` item should contain a combination of the original `landuse=residential` and the custom areas generated from the building location. IIRC, there is a logic where small areas are removed from the dataset. Frankly, I would prefer to avoid adding `landuse=residential` because of duplication of data. I'll check (later) the simplification factor and also the filtration of small areas...

Point 13
It's very likely caused by old coastline data. It should be improved in the next version of LoMaps...

Point 14
Thank you. Buildings reviewed and some missing are added

Current changes available as https://github.com/asamm/lomaps-mapsforge/pull/4/files

@john_percy
Thank you! It seems that the new theme displays only routes with the defined `osmc:symbol` tag and there is no fallback for IWN, RWN, etc without `osmc:symbol`. I'll improve it
Title: Re: LoMaps + MapsForge V4
Post by: karlchick on March 23, 2023, 15:14:59
Quote from: voldapet on March 23, 2023, 12:05:27@karlchick
Point 8
Do you want to render a surface type in the map? Or you want to use a surface as fallback if tracktype isn't defined? What surface type you'd required? https://wiki.openstreetmap.org/wiki/Key:surface

Point 9
I'm sorry, but are you really sure that the contours in <Z12 have any practical benefit for hikers/bikers?

Point 12
The `lm_landuse` item should contain a combination of the original `landuse=residential` and the custom areas generated from the building location. IIRC, there is a logic where small areas are removed from the dataset. Frankly, I would prefer to avoid adding `landuse=residential` because of duplication of data. I'll check (later) the simplification factor and also the filtration of small areas...

Point 8
If you want to align with OAM surfaces, that would make our lives as theme creators alot simpler, here are the OAM tag mapping settings:

<osm-tag key='surface' value='paved' equivalent-values='hard' renderable='false' zoom-appear='8' />
<osm-tag key='surface' value='asphalt' equivalent-values='concrete,cement,metal_grid,brick,chipseal,interlock,plastic,granite' renderable='false' zoom-appear='8' />
<osm-tag key='surface' value='compacted' equivalent-values='fine_gravel' renderable='false' zoom-appear='8' />
<osm-tag key='surface' value='smooth_paved' equivalent-values='concrete:plates,concrete:lanes,paving_stones,paving_stones:30,paving_stones:20,bricks,cement,metal,wood' renderable='false' zoom-appear='8' />
<osm-tag key='surface' value='rough_paved' equivalent-values='unhewn_cobblestone,cobblestone,stone,grass_paver,cobblestone:flattened,sett' renderable='false' zoom-appear='8' />
<osm-tag key='surface' value='gravel' equivalent-values='pebblestone,woodchips' renderable='false' zoom-appear='8' />
<osm-tag key='surface' value='raw' equivalent-values='ground,dirt,grass,sand,earth,mud,clay,saltrock,stone,dirt/sand,soil,trail' renderable='false' zoom-appear='8' />
<osm-tag key='surface' value='winter' equivalent-values='ice,snow' renderable='false' />
<osm-tag key='surface' value='unpaved' equivalent-values='unpaved_minor' renderable='false' zoom-appear='8' />

Point 9
I think having the major and then major and medium gradually introduced earlier provides the following benefits:
  1. You can visualise the landscape over a wider area, see how hills/mountains lie with respect to other landscape features like  lakes and roads etc.
  2. The map doesn't suddenly become very blank.
I can understand how this might have been desirable with older phones with limited resources, but most modern phones now easily cope with this in OAM maps.

Point 12
I dispute that landuse=residential is duplication, the lm_landuse tag is not the same ways/shapes. I really would prefer to use landuse=residential instead of lm_landuse since it matches OSM and also matches the other corresponding OSm tagged ways, e.g. schools, grass, parking etc. I find that lm_landuse=residential often cuts across a lot of other ways, or is completely missing for large parts of villages, or includes areas that are not residential.  E.g. see attached which compares LoMap and OAM residential areas (beige areas).
Title: Re: LoMaps + MapsForge V4
Post by: karlchick on March 24, 2023, 09:42:34
Point 8
Something else about surface tags, in OAM they are also provided for the above surface mappings for several other types of ways, like natural=beach/desert/wetland/sand. Making it possible to render pebble beaches and gravel banks differently.
Title: Re: LoMaps + MapsForge V4
Post by: john_percy on March 24, 2023, 09:47:33
@voldapet
Looking at hiking and foot networks on the England map, it seems to me that the names and/or refs for foot routes are missing, unlike for hiking routes. I don't think it's just a v4 problem, and I don't think it's due to the theme.


Title: Re: LoMaps + MapsForge V4
Post by: voldapet on March 24, 2023, 16:18:29
@karlchick
Point 8
OK - surface tags added based on OAM definition. But changed zoom-level to ZL=9


Point 9
I can understand but:
1. for this reason there is hill-shading feature
2. the question is whether this is a shortage and what about the areas in the lowlands ;-)
However, how are contours displayed on the official OS map? Do you know if any OS map at a scale smaller than 1:100k contains contours?

Point 12
Thank you for the explanation. I checked the generation of the `lm_residential` fields and I must say that it is not ideal for your use-case. We use `lm_residential` mainly as a light background to highlight urban areas in small zooms. 
We don't mind if the geometry is simplified - rather that is the goal. `lm_residential` areas really contain the original `landuse=residential` areas but are affected by simplification. One more note - some areas are missing because the lm_residentail areas were quite outdated. 

So I added the `landuse=residential` into tag-mapping file because it isn't really ideal.

I also a little bit improved the generation of `lm_residential` areas - see the screenshot from testing LoMap

@john_percy
Could I kindly ask you for an example of the route without name?


Title: Re: LoMaps + MapsForge V4
Post by: karlchick on March 24, 2023, 18:44:01
@voldapet

Point 9
The 1:250,000 OS maps do indeed include contours,  see attached screenshot from memory map and here is a link to the OS 250k legend

OS 250k Legend (https://www.google.com/url?sa=t&source=web&rct=j&url=https://www.ordnancesurvey.co.uk/documents/250k-raster-legend.pdf&ved=2ahUKEwjV2-ivi_X9AhVKTcAKHfCdCvgQFnoECBoQAQ&usg=AOvVaw0-HSghzr2bVQwcBB9jEVti)

You cannot view this attachment.

Interestingly 1:100k maps in the UK have pretty much fallen out of favour, they used to popular in the 50s to 70s as 1/2" scale maps. They used to also include contours, and were very useful for cycle touring. There is an interesting article about these maps:

The great lost map scale (https://blog.systemed.net/post/4)
Title: Re: LoMaps + MapsForge V4
Post by: john_percy on March 24, 2023, 19:58:07
@voldapet
Brancaster Staithe Circular https://www.openstreetmap.org/relation/11630291

Grand Union Canal Walk
https://www.openstreetmap.org/relation/349327



Sent from my moto g(6) plus using Tapatalk
Title: Re: LoMaps + MapsForge V4
Post by: karlchick on March 26, 2023, 17:23:05
QuotePOSTSCRIPT: It seems to be connected with routes which have neither osmc nor sac_scale. Changing line 1246 to test for sac_scale=hiking|~ makes some routes show.


I have also noticed this, the best I could render is attached (LoMap v3, LoMap v4, OAM). Seems some routes have ref tags and some do not, even when provided in OSM, e.g. NCN routes 1 in this example.

Note that OAM is only showing a single ref tag and seems to pick the ICN EV12 instead over the NCN 1, so highest order/class of route... I really hope LoMap will show a concatenation of all route refs when on the same way, e.g. EV12/1 in this case...
Title: Re: LoMaps + MapsForge V4
Post by: john_percy on March 30, 2023, 10:42:45
A beta version of the Voluntary and Velocity themes to work with both this Locus beta app & maps and OAM maps is now available at:
https://voluntary.nichesite.org/beta.html


The new versions are named Voluntary V5 LE and Velocity V5 LE (Locus Edition)
Title: Re: LoMaps + MapsForge V4
Post by: karlchick on March 30, 2023, 22:55:48
Hmm.. I think the LoMap approach to cycle/mtb routes is very different compared to OAM.

OAM seems to remap the cycle/mtb/hiking network values through to the highways they are related and uses separated tags for each type of route (network=cycle, mtnetwork=mtb and hknetwork=hiking).

OAM additionally resolves issues like route=mtb and network=ncn, by remapping these through to mtbnetwork=nmn. An example of this can be seen in the attached first pair of images showing LoMap/OAM with the latest v5 Voluntary theme, see how the mtb route is displayed in LoMap with blue/purple blobs but in OAM is only purple blobs.

I resolved this for now in LoMap maps by ignoring the network tag and using just the route=mtb/bicycle values to differentiate them. Separate rules are used for OAM and ignored by LoMap by checking for route="~", since OAM doesn't used route tags for network routes. See second pair of images comparing LoMap/OAM with my latest OS prototype theme.

LoMap having separated routes results in multiple renders for each route, advantage is ref labels for both routes, disadvantage is multiple highlight/emphasis drawn.
 
Another feature/issue... since LoMap is using separated route ways from the highways, I can't determine if a route is off-road. With OAM I am introducing hollow blobs when a route is off-road, see attached third pair of images.

Finally, I am missing OAM's feature to autogenerate route refs when a route has no ref tag, it does this by raking the first letter if each word in the routes name and any numbers, see examples attached and how OAM names the mtb route PWCR.
Title: Re: LoMaps + MapsForge V4
Post by: john_percy on March 31, 2023, 09:39:38
I confirm @karlchick's general analysis.

Quote from: karlchick on March 30, 2023, 22:55:48An example of this can be seen in the attached first pair of images showing LoMap/OAM with the latest v5 Voluntary theme, see how the mtb route is displayed in LoMap with blue/purple blobs but in OAM is only purple blobs.

OAM can display hiking, cycle and MTB networks at the same time  what it can't do is display more than one of each type of route at the same time. It always selects the "higher" route. International routes are preferred over national ones and so on.

The blue blobs on the MTB route in Voluntary in the Lomaps version are incorrect. There are not both MTB and bike routes along that road.  In the original map data, MTB networks may have values of icn, ncn, rcn, lcn like cycling networks. OAM changes those to imn, nmn, rmn, lmn to avoid confusion. I was testing on the network value which was ok for OAM but ambiguous for Lomaps. I have adjusted the test and the MTB route displays correctly in the latest beta version Voluntary V5 LE from https://voluntary.nichesite.org/beta.html

The latest Voluntary V5 LE  beta also shows highlighting on Lomaps as seen in the screenshot below.
Title: Re: LoMaps + MapsForge V4
Post by: voldapet on March 31, 2023, 14:46:07
@karlchick  @john_percy
Thank you for report about missing hiking routes. It has been fixed and a workaround is available for routes without a defined `osmc:symbol` tag.

@karlchick

Point 9
I see. From the next version will be medium/major contour lines will be available from:
<osm-tag key="contour_ext" value="elevation_medium" zoom-appear="9" force-polygon-line="true" />
<osm-tag key="contour_ext" value="elevation_major" zoom-appear="9" force-polygon-line="true" />


Point 13 (multiple routes)
Every cycle/mtb/hiking relation is extracted into separated ways. There is no remapping. The `route` or `network` tags are inherited from source relation. You're right the ways may be multiple rendered but that's our goal for LoMap themes (especially for hiking routes with osmc:symbol).
Please see the following example: The way https://www.openstreetmap.org/way/31661172 is member of these two relations https://www.openstreetmap.org/relation/75894 and https://www.openstreetmap.org/relation/9476067
The generator of marked trails for LoMaps creates two new ways (one for each relation). The tags for the new ways (see below) contain the tags from original way (osmc_highway and highway) and rest of tags is taken (derived) from parent relations. I also mention that the tag 'name' is extended and contains also the `ref` tag (if not already part of the name).

 
<way id="16000000000060" user="AsammSW" version="1" >
  <tag k="type" v="route"/>
  <tag k="route" v="bicycle"/>
  <tag k="network" v="ncn"/>
  <tag k="ref" v="1"/>
  <tag k="name" v="NCN National Route 1"/>
  <tag k="osmc_highway" v="tertiary"/>
  <tag k="highway" v="tertiary"/>
  <tag k="osmc" v="yes"/>
  </way>
  <way id="16000000000061" user="AsammSW" version="1" >
  <tag k="type" v="route"/>
  <tag k="route" v="bicycle"/>
  <tag k="network" v="icn"/>
  <tag k="ref" v="EV12"/>
  <tag k="name" v="EuroVelo 12 - North Sea Cycle Route - part United Kingdom 2, EV12"/>
  <tag k="osmc_highway" v="tertiary"/>
  <tag k="highway" v="tertiary"/>
  <tag k="osmc" v="yes"/>
  <tag k="osmc_color" v=""/>
  <tag k="osmc_background" v="blue"/>
  <tag k="osmc_foreground" v=""/>
  <tag k="osmc_text" v="EV12"/>
  <tag k="osmc_text_length" v="4"/>
  <tag k="osmc_text_color" v="white"/>
  </way>

QuoteLoMap having separated routes results in multiple renders for each route, advantage is ref labels for both routes, disadvantage is multiple highlight/emphasis drawn.
If this is a major complication perhaps it would be possible to indicate that the way is an xth copy of original way and that multiple routes are concurrent.

QuoteAnother feature/issue... since LoMap is using separated route ways from the highway
There is already a custom `osmc_highway` tag that divides the original highway into 3 types (we use it to set the correct offset from the parent way). Anyway, I can agree that the original `highway` tag may be useful and the next version of LoMap will contain the `highway` tag inherited from the original OSM way (as shown on the example above).
Title: Re: LoMaps + MapsForge V4
Post by: voldapet on March 31, 2023, 15:13:42
@john_percy
QuoteBrancaster Staithe Circular https://www.openstreetmap.org/relation/11630291

Grand Union Canal Walk
https://www.openstreetmap.org/relation/349327

I'm sorry but both routes contain the names

Title: Re: LoMaps + MapsForge V4
Post by: john_percy on March 31, 2023, 17:50:44
@voldapet
1. Thanks for your response about foot routes. Found the mistake in my theme!
2. If you add a highway tag to all routes (as in your example code) won't that cause them all to render as highways unless one adds a "route=~" test to all genuine highways? Would it better to transfer the underlying highway to a rt_highway tag or similar?


Sent from my moto g(6) plus using Tapatalk

Title: Re: LoMaps + MapsForge V4
Post by: voldapet on March 31, 2023, 18:33:08
@john_percy
Quote. If you add a highway tag to all routes (as in your example code) won't that cause them all to render as highway
What a big mistake ::) You're absolutely right. I changed it to `lm_highway` (to use same prefix as lm_residential)
   <tag k="lm_highway" v="footway"/>
Title: Re: LoMaps + MapsForge V4
Post by: john_percy on April 01, 2023, 10:20:39
@voldapet
Quote from: voldapet on March 03, 2023, 11:38:50@karlchick
BTW: are there any standard symbols or styles that indicate designation in the UK maps?
See attached Ordnance Survey legends. PROW are red or green according to the map scale; there are different markings for different types of access rights.



Sent from my moto g(6) plus using Tapatalk
Title: Re: LoMaps + MapsForge V4
Post by: karlchick on April 01, 2023, 11:21:22
Quote from: john_percy on April 01, 2023, 10:20:39@voldapet
Quote from: voldapet on March 03, 2023, 11:38:50@karlchick
BTW: are there any standard symbols or styles that indicate designation in the UK maps?
See attached Ordnance Survey legends. PROW are red or green according to the map scale; there are different markings for different types of access rights.

@voldapet
Sorry, I missed that question. Yes OS maps do have symbology for different access rights, colours, dashes and dots are used to represent different Public Rights Of Way (PROW) as in 3rd and 4th attachments.

The designation tags in OSM should allow me to represent all these in the theme, I think.

Note that newer OS maps now also include orange dashed pathways for Permissibe PROW. I have tried to emulate this in OAM using combinations of available tags and it largely works, see first attached (left OS, right OAM). Currently path, PROW path, PROW bridleway, PROW permissive path. It should be a lot easier with the designation tag, but sometimes the access is set to permissive in other situations, hence OAM's foot=ft ft_permissive is useful...

I have also added tidal paths (blue) as a non-OS option, see second attached. Note I use thinner dashed paths for non-PROW paths (as do OS maps). This example shows a low tide alternative path that people sometimes use when walking the South West Coastal Path (SWCP). It has tidal paths/steps and a permissive set of stairs to return  to the hiking SWCP route.

With the designation tag I should be able to represent all the OS symbols... I'm looking forward to an updated LoMap to play with.

Edit:updated images for latest fixes.
Title: Re: LoMaps + MapsForge V4
Post by: karlchick on April 02, 2023, 14:56:33
@voldapet

Point 14
Request: would it be possible add natural=bay to LoMaps?

Attached is an example from OSM and comparison of OAM vs LoMap.

Point 15
This is probably something I should request against the app rather than here, but I'm wondering if it would be possible to have a grid like OS maps have, perhaps 1km lines and 10km lines that can be customised by the theme to appear at suitable zoom levels and stroke styles etc..???
Title: Re: LoMaps + MapsForge V4
Post by: voldapet on April 06, 2023, 21:48:29
Thank you for explaining the OS symbolism and access. I need to consider whether to use it for LoMaps

Point 14
No problem

Point 15
I'm sorry, but I really don't think this should be rendered by themes...
Title: Re: LoMaps + MapsForge V4
Post by: john_percy on April 16, 2023, 10:05:25
@voldapet
Could you please include the bridge=viaduct tag which particularly affects rendering railways. AFAIK it is functionally equivalent to bridge=yes.


Sent from my moto g(6) plus using Tapatalk

Title: Re: LoMaps + MapsForge V4
Post by: michaelbechtold on April 22, 2023, 15:48:37
When will V4 be generally available, i.e. in app LoMaps downloads deliver V4 maps rather than the old V3?
Title: Re: LoMaps + MapsForge V4
Post by: voldapet on April 23, 2023, 07:59:04
@michaelbechtold There are already Czech R. and Slovakia LoMaps available as V4 in the Locus store (version 2023.03.23). The rest will be released probably during the next week.

@john_percy
bridge=viaduct - added
Title: Re: LoMaps + MapsForge V4
Post by: john_percy on April 26, 2023, 15:31:49
@voldapet
I think the is something wrong with the rendering of tunnels. The screenshot below  is of the Dartford crossing of the Thames East of London. Map is England, internal theme Road
Region 1 is road underwater: nothing shown
Region 2 is road underground: normal road shown plus underground markings
Region 3 is road above ground for comparison
It seems to me:
1. Layer=-1 puts the tunnel under everything, so solid colours like the river block visibility of the road markings. Every area needs to be semi transparent for this to work.
2. Tunnel=~|no seems to also select tunnel=yes, so underground roads are selected as well as above ground roads and rendered.


The second screenshot shows the same area and theme with an OAM map.


Edit: Does the common value bug persist for "no"? OAM removes all tag value=no before processing the map. Changing the test for non-tunnels to simply tunnel=~ deals with my point 2 above but leaves the tunnel hidden by the river in the underwater section. See the effect of a modified internal theme below.

Title: Re: LoMaps + MapsForge V4
Post by: voldapet on April 28, 2023, 16:35:35
@john_percy Thank you for the detailed testing.
Region 1 - you're right. Transparency is used for other areas and should be used also for water areas. I'll fix it

Region 2 - what an interesting issue :o I found out that the problem is caused by the tag foot="no". It causes the rule <rule e="way" k="tunnel" v="~|no|false"> to be considered as "TRUE" and the way is rendered also as non-tunnel
You're right that changing rule to tunnel=~ solves it but I'll ask menion to fix it also in mapsforge

@michaelbechtold - LoMaps V4 are ready in Locus Store for all countries
Title: Re: LoMaps + MapsForge V4
Post by: karlchick on April 28, 2023, 18:07:09
Regarding region 1, I don't want to use transparency for water, and don't for OAM maps.  Surely I should be able to draw above the water a tunnel using tunnel=yes, but this doesn't seem to work for LoMap v4 maps, see attached.

Also the cycle circles are incorrectl being drawn on water by matching tunnel="~|no" biut there are no other tags with value "no" involved in my theme for the cycle circles..  it's almost like the tunnel=yes is missing...

Checking other tunnels, all if them render as though missing tunnel=yes.
Title: Re: LoMaps + MapsForge V4
Post by: john_percy on April 28, 2023, 19:43:18
Like @karlchick I don't want to render all areas as semi transparent. I believe OAM removes layer=-1 from tunnels in preprocessing and allows tunnels to be rendered by the theme with skillful use of transparency and position in the theme. I prefer this and I think it gives a better result overall.
The reason @karlchick can't get cycle route blobs to behave as wanted in tunnels (or on bridges) is because Lomaps treats all hiking, cycling and MTB routes as separate ways which don't inherit the tag values of the highways they follow. So the road has a tunnel tag but the cycle route does not.
Edit: @karlchick You'll also find that your cycle blobs are missing from the bridge (adjacent to the tunnel) in the Lomaps version. They have been drawn on layer 0, underneath the bridge layer, as the cycle route doesn't inherit the layer tag either.

Sent from my moto g(6) plus using Tapatalk
Title: Re: LoMaps + MapsForge V4
Post by: john_percy on April 30, 2023, 18:39:09
@voldapet
Any idea why the wood doesn't show at https://www.openstreetmap.org/way/4018087#map=15/52.2051/-1.1154 ?
Screenshots are of v3 & v4 Lomaps with internal hike & bike theme.

Sent from my moto g(6) plus using Tapatalk

Title: Re: LoMaps + MapsForge V4
Post by: voldapet on May 02, 2023, 09:56:17
@karlchick @john_percy
The problem with hidden tunnels (section 1) has to be here from the beginning of LoMaps (I guess). There is no tag transformation for "layer < 0" and all elements in layer < 0 may be hidden under other areas from layer = 0 and higher. I think that OAM really "move" some elements from layer < 0 to layer = 0 but I don't know the exact logic. I think we considered some kind of tag transformation a few years ago, but I think we rejected it and I don't remember the reason. So would you prefer to move the tunnel to layer=0? Can it have some side effects?

QuoteThe reason @karlchick can't get cycle route blobs to behave as wanted in tunnels (or on bridges) is because Lomaps treats all hiking, cycling and MTB routes as separate ways which don't inherit the tag values of the highways they follow. So the road has a tunnel tag but the cycle route does not.
Exactly, but it shouldn't be a problem to inherit it. (I already thought about it when I saw the cycle route on the example above).

@natural=wood
The area isn't rendered because it isn't properly closed (The area is partially filled when I removed the "closed=yes" attribute)
. I also checked the OSM data and it seems to be OK. So there has to be some issue during map generation.  :-\


Title: Re: LoMaps + MapsForge V4
Post by: john_percy on May 02, 2023, 10:15:37
1. The only side effect of moving tunnels to layer 0 I'm aware of is that tunnel=yes and tunnel=no|~ have to be tested for explicitly in the theme, and dealt with accordingly.
2. Letting routes inherit bridge, tunnel and layers would be helpful, thanks.
3. The wood renders ok for me with my Voluntary themes with the OAM map but not the LoMap v4.
Title: Re: LoMaps + MapsForge V4
Post by: voldapet on May 02, 2023, 12:45:34
1. agree.. :)
2. Do you know if OAM map substitute "layer" with some special tag?
3. there has to be really something wrong in the map. I'll check it later
Title: Re: LoMaps + MapsForge V4
Post by: john_percy on May 02, 2023, 12:55:44
2. I don't believe so. The themes just check for tunnel or underground (for pipelines etc). I think bridges etc retain their layer tag.


Sent from my moto g(6) plus using Tapatalk

Title: Re: LoMaps + MapsForge V4
Post by: john_percy on May 06, 2023, 09:55:33
@voldapet
I'm looking at osmc waymarking but I can't see any markings on some routes I am looking at, where OAM maps show osmc markings. For example, one location is N 51.61224°, E 007.57491° (from Locus). I'm using LoMap Nordrhein-Westfalen from the beta folder and the theme you shared above.

Is it something about these particular routes?
Is it a fault in this particular map?
It's a black_rectangle that seems not to display. Or is it because of the text that should display on the rectangle?
Title: Re: LoMaps + MapsForge V4
Post by: john_percy on May 07, 2023, 00:18:35
@voldapet
I tried "Validate" on Locus theme from GitHub:

Sent from my moto g(6) plus using Tapatalk

Title: Re: LoMaps + MapsForge V4
Post by: karlchick on May 08, 2023, 10:56:05
@voldapet

I just realised that updated maps and tagmapping files are available in GitHub, thank you, very much appreciated.

I've started work on theming the designation tags, and realised we missed out one of the important values:

designation=unclassified_highway

Not a very self explanatory value! But this equates to routes that would be indicated on OS maps as "Other route with public access", i.e. green dots.

Please can you add this value to the Lomap v4 maps too?
Title: Re: LoMaps + MapsForge V4
Post by: john_percy on May 10, 2023, 14:15:27
@voldapet
Near 3 words location https://w3w.co/rocker.iceberg.heavy two OSMC routes have their markers superimposed at one location (western point) and not superimposed at another (eastern point).
Judging by the OSMC colour lines on the map, LoMaps has given both no osmc_order on the western segment but separated them on the eastern one.

Sent from my moto g(6) plus using Tapatalk

Title: Re: LoMaps + MapsForge V4
Post by: voldapet on May 11, 2023, 13:33:46
@john_percy
QuoteI'm looking at osmc waymarking but I can't see any markings on some routes I am looking at, where OAM maps show osmc markings. For example, one location is N 51.61224°, E 007.57491° (from Locus).
I'm sorry but on given coordinates isn't any osm relation with the specified "osmc:symbol". Could I kindly ask you for some screenshot or a better explanation? Maybe I miss something

Superimposed symbols
Thank you for the report. The definition of "osmc_order" depends on the main color of the route. If multiple routes have the same color, then osmc_order can be the same for those routes. The "osmc_order" was initially used to set a different offset (dy) for parallel routes. But later I decided to use this attribute also for drawing the symbol along the route and it can cause the following problems. More interesting is the easter part where symbols do not overlap. But this is basically an error because 2 blue lines are rendered and it should not happen.
I'll check it and I'll consider consider a custom order tag for symbols...

@Invalid theme - I'll ask @Menion to check it because the theme contains the reported icon and it should be valid

@karlchick - No problem I'll add it.
Title: Re: LoMaps + MapsForge V4
Post by: john_percy on May 11, 2023, 13:52:35
@voldapet
Three words: gardens.scout.embers
The screenshots are LoMaps with internal theme, OAM with Voluntary beta theme, LoMaps with Voluntary beta.

Emscherparkweg XE
osmc: symbol red:black:black_rectangle:XE:white



Sent from my moto g(6) plus using Tapatalk

Title: Re: LoMaps + MapsForge V4
Post by: voldapet on May 11, 2023, 14:22:46
@john_percy
ahh thank you. I missed it.

The "osmc:symbol" for this way is extracted into these values:
  <tag k="osmc" v="yes"/>
  <tag k="osmc_color" v="red"/>
  <tag k="osmc_background" v="black"/>
  <tag k="osmc_foreground" v=""/>
  <tag k="osmc_text" v="XE"/>
  <tag k="osmc_text_length" v="2"/>
  <tag k="osmc_text_color" v="white"/>

Please note especially the "osmc_foreground" that's empty but it should be "black_rectangle". This is my ugly workaround when the color of the foreground symbol is the same as the color of the background. The pseudo-code should look like:
if osmc_foreground.hasTheSameColor(osmc_background):
  set_value_empty_for(osmc_foreground)

The reason for this hack is a problematic rendering of text symbols that are not rendered by LoMaps theme. In the theme is a rule that requires defined osmc_foreground - I mean symbols are rendered only when osmc_foreground is defined (to avoid empty black rectangles).

Anyway the text and text color values are available in the data and you can use them
Title: Re: LoMaps + MapsForge V4
Post by: john_percy on May 11, 2023, 17:06:40
@voldapet
Thanks for the explanation.
However I can find no indication that osmc_text exists in the map as a variable. I know previous versions of Mapsforge only supported a few variables, such as ref, name, addr:housenumber. Is that changed?

Sent from my moto g(6) plus using Tapatalk

Title: Re: LoMaps + MapsForge V4
Post by: voldapet on May 12, 2023, 10:56:44
@john_percy
Mapsforge now supports any "key" that can be used as a text value. So you can, for example, display the value of the key "highway"
<pathText k="highway" font-style="normal" font-size=....
Anyway, you are right - "osmc_text" and "osmc_text_length" are really missing in the latest LoMaps. The latest version of LoMaps was released in version 4 which doesn't contain variable "tag-values" (%s, %f)

Anyway, I generated a new version of LoMaps (see attached map of Monaco) as version 5. The mentioned "osmc_text" and "osmc_text_length" tags should be available in the data. But I think I found some bug in the Mapsforge generator, where the tag-value variable is not included in the data if there is another tag with the same value. The value of "osmc_text" is often the same as the value of "ref", and it seems that in such a situation the "osmc_text" is not added to the data. I need to test this with @Menion in more detail and debug the data in the map tiles.


For this reason, I edited one tourist way  (https://www.openstreetmap.org/way/1005061875#map=18/43.73591/7.40585)with "osmc_text" value and set value "03 testtest" (avaialable in attached monaco map). You can test it with your theme...

PathText to display the text "03 testtest"
<pathText k="osmc_text" dy="2" font-style="bold" font-size="16" fill="#e67400" stroke="#ffffff" stroke-width="2.5" priority="1000"/>
Title: Re: LoMaps + MapsForge V4
Post by: karlchick on May 14, 2023, 11:43:04
@voldapet

Point 13
Would it be possible to include service tag values for highways? Seems only service values for railways are included.

This would allow lesser important service roads to be drawn thinner and less distracting, attached is a comparison of lomap vs oam. On lomap the car parks are very prominent as the parking aisles are drawn as service roads.
Title: Re: LoMaps + MapsForge V4
Post by: voldapet on May 16, 2023, 14:21:40
@karlchick
Point 13
I see. I added:

<osm-tag key="service" value="alley" zoom-appear="13" />
<osm-tag key="service" value="driveway" zoom-appear="13" />
<osm-tag key="service" value="emergency_access " zoom-appear="13" />
<osm-tag key="service" value="parking_aisle" zoom-appear="13" />
<osm-tag key="service" value="slipway" zoom-appear="13" />
Title: Re: LoMaps + MapsForge V4
Post by: john_percy on May 17, 2023, 00:00:21
@voldapet
Does highway=construction flow through to lm_highway=construction? I suspect not.
I don't think it affects the internal theme adversely but it does affect my Voluntary theme in terms of route marking offset and width etc.

Title: Re: LoMaps + MapsForge V4
Post by: john_percy on May 17, 2023, 11:12:10
@voldapet
Also Höhlenweg X4, N 51.37576°, E 007.63249° is a route of type=disused_route but shows on the map.


Sent from my moto g(6) plus using Tapatalk

Title: Re: LoMaps + MapsForge V4
Post by: john_percy on May 18, 2023, 12:34:08
Also Blue Pedalway ought not really to appear on the map as its state is only "proposed". https://www.openstreetmap.org/?mlat=52.6043&mlon=0.9077#map=10/52.6043/0.9077

geo:52.6043,0.9077?z=10

state=proposed
lcn=proposed
Title: Re: LoMaps + MapsForge V4
Post by: voldapet on May 18, 2023, 13:33:20
@john_percy Thank you for your report/feedback
You're right we ignore mentioned proposed or disused tags. I'll improve it.
Anyway, do you know more about tag type=disused_route ? I can't find any official documentation for this tags. I'm also wonder if there are more disused combinations...

- lm_highway=construction is really missing and will be improved in the next version of LoMaps
Title: Re: LoMaps + MapsForge V4
Post by: john_percy on May 18, 2023, 14:58:19
@voldapet
I think this particular example of a disused route ought to fail on a check on the relation for type=route, which I am sure you need to do in any case when preparing the map. I don't think this usage is documented but there are a whole host of ways of tagging lifecycle stages:
https://wiki.openstreetmap.org/wiki/Comparison_of_life_cycle_concepts
Edit: I could imagine type=disused:route as a possible interpretation of the wiki but that may not be allowed syntax.

Title: Re: LoMaps + MapsForge V4
Post by: john_percy on June 01, 2023, 00:19:34
@voldapet
I'm attempting to follow the instructions for a custom poi theme. I've just downloaded the latest beta.
I have a theme file "Voluntary V5 LE.xml"
I'm attempting a poi theme file "Voluntary V5 LE_vol-multi.poi.xml" for a style "Multi" with a layer id "vol-multi".
a) the poi theme shows up in the list of selectable themes. I'm sure that's not desirable.
b) it doesn't seem to have any effect




Sent from my moto g(6) plus using Tapatalk
Title: Re: LoMaps + MapsForge V4
Post by: Tapio on June 01, 2023, 07:48:08
Quote from: john_percy on June 01, 2023, 00:19:34I'm attempting to follow the instructions for a custom poi theme.
What's that about, URL please?
Title: Re: LoMaps + MapsForge V4
Post by: voldapet on June 01, 2023, 09:00:45
@john_percy
The naming convention for "poi" theme is nameOfBaseMapTheme_layerId.poi.xml
When the layerId id of layer is defined in <stylemenu> of the base map theme.

Anyway, only the internal theme supports this special "poi" themes. It is not yet fully implemented for alternative themes, but there are plans to support it...

@Tapio
Please see https://github.com/asamm/lomaps-mapsforge#poi-themes
Title: Re: LoMaps + MapsForge V4
Post by: voldapet on June 02, 2023, 13:54:51
@john_percy @karlchick
The new version of LoMaps 2023.05.05 is available in the store. It supports new tags and also some changes in Hike&Bike routes (problem with planned or unused routes). Please check & test :)
Thanks, Petr
Title: Re: LoMaps + MapsForge V4
Post by: john_percy on June 02, 2023, 14:12:14
@voldapet Are you able to make maps available for testing purposes as before?

Sent from my moto g(6) plus using Tapatalk

Title: Re: LoMaps + MapsForge V4
Post by: voldapet on June 02, 2023, 14:20:53
@john_percy ahh I'm sorry. I thought that everybody here is a Gold member ;) I'll discuss it with @Menion and I think we can add some maps again on GD as before.
Title: Re: LoMaps + MapsForge V4
Post by: Menion on June 02, 2023, 18:55:04
@john_percy
LoMaps of UK + Germany for the test are prepared here (http://bit.ly/3IFmOS4).
Title: Re: LoMaps + MapsForge V4
Post by: john_percy on June 03, 2023, 14:03:02
Thanks!

Disused route: name has gone, but route still shows as nwn. The two routes that run there are both lwn. https://forum.locusmap.eu/index.php?topic=8309.msg71706.msg#71706
Edit: or look here where there is only the one route and the route still shows but is nameless! geo:51.37445,7.63300?z=19

Tunnel unchanged https://forum.locusmap.eu/index.php?topic=8309.msg71369.msg#71369
Title: Re: LoMaps + MapsForge V4
Post by: karlchick on June 03, 2023, 17:11:32
Just spotted that cutting tag is not supported, is this possible to include?

Attached shows latest lomap v4 vs oam, getting alot closer to OS map now with the usage of the designation tag.  Note that green lane is missing the cutting in lomap.

I do also miss the increased number of contours of oam maps still... and, of course, the inclusion if OS crag data 😉.
Title: Re: LoMaps + MapsForge V4
Post by: karlchick on June 04, 2023, 12:33:34
Found another issue, I think... it looks like that tag lm_highway does not include all the tags that highway has? 

I'm using lm_highway with routes and designation, since routes are not tied to highways.

At the moment, I can't tell when a route is attached to a highway that has restrictions tagged through the designation tag. 

E.g. attached 1st image shows a route that follows a section of track and footway that is designation=unclassified_highway, highlighted red,  for these cases OS maps display just green dots instead of green dashes, see first image.

The second image shows what I want to display, using highway but this is not linked to route, so this affects footpaths with routes and no designation, see right side of second image...

BTW, the highlight colours used for designations here match the colours used for uk signage on PROW:
  - Yellow = footpath
  - Blue = Bridleway
  - Purple - Restricted byway
  - Red - Other routes / BOAT

Does lm_highway inherit all tags from the associated highway tag?

If not,  can designation tag be added to lm_highway?

Fyi, here is the theme code I'm trying to use in these cases:

<rule e="way" k="route" v="foot|hiking"
  <rule e="way" k="network" v="iwn|nwn|rwn|lwn|uwn">
      <rule e="way" k="lm_highway" v="footway|path|pedestrian|track|bridleway|cycleway|service" >
        <rule e="way" k="designation" v="~"> <!-- designation ways drawn elsewhere -->
            <!-- Draw footpaths -->
Title: Re: LoMaps + MapsForge V4
Post by: voldapet on June 04, 2023, 22:25:07
@john_percy
Disused route: I hope I found the correct ways you mentioned as problematic (see bellow). I'm sorry but both ways are members of valid relation and should be displayed? Did I miss something?
https://www.openstreetmap.org/way/27282386
https://www.openstreetmap.org/way/4421231 

Tunnels - what exactly do you mean? (the link is about viaduct). Anyway, the hiking/cycling ways should contain tunnels and bridge tags inherited from the original ways. The problem with layer=-1 for tunnels isn't still fixed - maybe later in 2023/2024

@karlchick
"lm_highway" has the same values as the original "highway" tag. The other tags (except mentioned tunnel/bridge) aren't inherited.
"Designation" tag can not be added at this moment. I'm sorry but Mapsforge can handle OSM features if they have a maximum of 15 tags. The hiking/cycling ways are on the edge of this limit (because custom tags like lm_highway, osmc foreground/background, colors, text, length of text, bridge,tunnel...)

Contour lines, OS data - maybe later ;)

Title: Re: LoMaps + MapsForge V4
Post by: john_percy on June 05, 2023, 09:46:44
@voldapet
Disused route
It is clearest where there is only one route such as Höhlenweg: https://www.openstreetmap.org/way/86496950
https://www.openstreetmap.org/relation/2003487
This is tagged type=disused_route (perhaps should be tagged type=historic:route). In any case it ISN'T type=route, which should be a requirement.

Tunnel
The linked post is about a tunnel, though there is a viaduct alongside. The problem is that the tunnel DOESN'T appear on Lomaps! (Maybe that's why you thought the link wasn't about a tunnel!) I think this must be the case with any underwater tunnel in LoMaps -- it dates back to the old maps as well.
Dartford East Tunnel, geo:51.4647,0.2571?z=14
https://www.openstreetmap.org/way/1881115
The best solution is to do with layers, so that may have to wait.
Title: Re: LoMaps + MapsForge V4
Post by: voldapet on June 05, 2023, 22:47:18
@john_percy
Disused route
I'm sorry but I don't understand - the relation https://www.openstreetmap.org/relation/2003487 isn't shown in the latest offline LoMaps

Tunnel
Dartford East Tunnel is in layer=-1 and this situation isn't still improved in the LoMaps. I think that OAM edits the layer tag to "solve" this issue. I think we could also try something similar sometime in future versions.
Title: Re: LoMaps + MapsForge V4
Post by: john_percy on June 05, 2023, 23:31:42
@voldapet
Disused route
Terribly sorry, my bad. I downloaded the wrong region of Germany from the latest maps and was inadvertently looking at an old map instead. You are correct, that issue has been resolved, thanks.

Title: Re: LoMaps + MapsForge V4
Post by: karlchick on June 08, 2023, 18:43:59
Another request... I'm finding it difficult to view the regional cycle networks when zoomed out, ie, get a feel for where they are and which link up with which.

This is because rcn they appear from zoom level 12, but I want to zoom out further.

OAM have rcn routes appear from 10, and this seems to work much better, see attached comparison image. Second image shows best view possible currently with LoMap by zooming out at level 12.
Title: Re: LoMaps + MapsForge V4
Post by: john_percy on July 09, 2023, 01:15:54
@Menion @voldapet
Doesn't Locus support the improved text break algorithm in Mapsforge? In the screenshot, the town name ought to break at a hyphen.

(As in https://github.com/mapsforge/mapsforge/pull/1392 )

Title: Re: LoMaps + MapsForge V4
Post by: Menion on July 09, 2023, 19:21:43
Should be. But it still seems not to work as expected > we have identical problems in LoMaps, unfortunately.
Title: Re: LoMaps + MapsForge V4
Post by: karlchick on August 13, 2023, 21:09:05
Would be possible to add railway=miniature to v4 LpMaps?

Attached shows it missing for LoMap v4 and visible on OAM.
Title: Re: LoMaps + MapsForge V4
Post by: karlchick on August 13, 2023, 21:53:04
Another issue found with v4 lomaps, natural=mud is listed in the tag mapping, but not appearing in the map, see attached.

Also, note that leisure=nature_reserve is not displayed either when the area is also tagged with boundary=protected_area.
Title: Re: LoMaps + MapsForge V4
Post by: voldapet on August 25, 2023, 12:18:39
Hi,

I'm sorry for the late reply. Finally, it's some time to focus on the map again :)
@karlchick
- railway=miniature added
- natural=mud - thank you for the report - my mistake. I added the natural=mud only into POINT section and WAYS were omitted (will be fixed in the next LoMaps)
- leisure=nature_reserve - I'm testing the latest LoMaps and seems to be OK (would you please check it again)
- icn&ncn available from zl=8 and rcn available from zl=10
Title: Re: LoMaps + MapsForge V4
Post by: karlchick on November 02, 2023, 13:27:07
Quote from: voldapet on August 25, 2023, 12:18:39- leisure=nature_reserve - I'm testing the latest LoMaps and seems to be OK (would you please check it again)

Still an issue in the latest LoMap, see attached. Link to osm data: https://www.openstreetmap.org/way/97554897#map=16/50.6817/-3.4543

But this might be a theme issue, mine and John's theme use very similar rules, but the internal theme is naming the nature reserve and outlining it... hmm...
Title: Re: LoMaps + MapsForge V4
Post by: john_percy on November 02, 2023, 14:08:29
That particular nature reserve is malformed in the mapping. It doesn't form a closed area and my theme specifically checks for that to avoid unpleasant artefacts.
Title: Re: LoMaps + MapsForge V4
Post by: voldapet on November 05, 2023, 21:48:15
@karlchick I'm sorry, could you please describe in more detail what is wrong with this nature_preserve? I must be blind or not understanding  :) 
Title: Re: LoMaps + MapsForge V4
Post by: john_percy on November 05, 2023, 22:12:09
It's not showing on @karlchick 's theme or mine. The reason is simply that the way is not closed and hence not legitimately an area.
Title: Re: LoMaps + MapsForge V4
Post by: karlchick on November 06, 2023, 01:51:29
Yes, it's as John said, our themes ignored  areas that are not closed. I'm changing my theme since I don't fill or outline nature_reserve areas, just use symbol with name.

It's not an issue with the map.
Title: Re: LoMaps + MapsForge V4
Post by: voldapet on November 06, 2023, 16:39:16
Ahh I see, thank you
Title: Re: LoMaps + MapsForge V4
Post by: karlchick on November 06, 2023, 17:19:48
Would it be possible to include the tidal tag with the lm_highway tag?
Title: Re: LoMaps + MapsForge V4
Post by: voldapet on November 07, 2023, 07:59:02
QuoteWould it be possible to include the tidal tag with the lm_highway tag?
It should be possible. But this is the same situation we discussed in another thread. Please consider whether this is really vital because of the number of (15) maximum tags.
Title: Re: LoMaps + MapsForge V4
Post by: karlchick on November 07, 2023, 08:22:54
Quote from: voldapet on November 07, 2023, 07:59:02
QuoteWould it be possible to include the tidal tag with the lm_highway tag?
It should be possible. But this is the same situation we discussed in another thread. Please consider whether this is really vital because of the number of (15) maximum tags.

Highway already has the tidal tag, and very useful it is too. I kind of assumed that lm_highway is a straight copy of highway, and hence including tidal tag would be fixing an ommission.

For routes related to highways, with lm_highway missing the tidal tag, I currently can't indicate tidal sections of routes. In OAM maps this isn't an issue since highways carry both the tidal tag and routes (albeit one of each type).

Are there other non highways tags being included in lm_highway?
Title: Re: LoMaps + MapsForge V4
Post by: voldapet on November 07, 2023, 09:03:53
@karlchick yes, 'lm_highway' is a copy of the original 'highway' tag. So every value of the 'highway' tag is available in 'lm_highway' tag. Of course, you need to take into account the set of tags of the tag mapping file https://github.com/asamm/lomaps-mapsforge/blob/main/various/tag-mapping-xml/tag-mapping-tourist.xml#L1328

The following tags are copied from the original way to "marked trail" way:
- highway (as lm_highway)
- sac_scale
- tunnel
- bridge
- layer
and ferry=route is mapped to custom lm_highway=ferry
Title: Re: LoMaps + MapsForge V4
Post by: karlchick on November 20, 2023, 18:06:59
Hmm.. so it sound like I should be able to see tidal=yes for lm_highway=footway (for a route=foot|hiking) when the original highway=footway had tidal=yes.

But I'm not seeing this, I can see the rendering for when highway has tidal=yes, but not for lm_highway with tidal=yes (they have different line thickness in my theme at the moment).
Title: Re: LoMaps + MapsForge V4
Post by: voldapet on November 20, 2023, 21:28:46
@karlchick
elements with lm_highway=* don't contains tag tidal=*
Please see the list of processed tags in my previous post