Menu

Show posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Show posts Menu

Messages - Magellan

#16
Themes - Vector maps / [Theme] OS Map
May 29, 2020, 17:45:48
The OS Map theme tries to emulate the Ordnance Survey 1:25k and 1:50k map styles as closely as is possible within the constraints of Locus Map and data provided by the vector maps. It should work with both LoMap and OAM maps (v3 and v4). I must give credit to John Campbell for his Voluntary UK theme that I used as a starting point (v. 190101).

The OS Map theme also provides a darker variation of OS style of map designed for use at night-time to help avoid spoiling night-vision whilst keeping a recognizably Ordnance Survey style of map.

The theme now consists of four main theme files, day/night for v3 maps and day/night for v4 maps. There are two PDF map legends, one for day and one night.

Here is a comparison of the same map rendered with: Internal Theme, Voluntary UK, OS Style and my new 4 OS map styles:


SCROLL TO VIEW THE COMPARISONS >>>>

Here are the list of all the changes made for each release:

v20200427
Initial release for v3 maps only

v20200529
Added v4 map support
Added option to highlight toll roads (default is not highlighted). Highlight means orange outline and orange dots as you zoom in.
Added option to set OS style roads names (pathtext) for countires that are left hand traffic or right hand traffic. This is only applicable to dual carriage ways.
Added drawing of footpaths and bridleways that are on dashed track/service roads.
Added thicker dashed 1:50k style for airport runways (was using thinner 1:25k for 1:50k before)
Added defibrillator symbol (non OS symbols)
Added OS text symbols for: Libraries, Shelters, Cairns, Caves, Adits [Mines, Mines (dis)], Waterfalls (Falls in blue)
Added library buildings to list of important building, i.e bolder outlines.
Added place markers for towns/cities (similar to Elevate theme) at low zoom levels (e.g. 5-7).
Added support for sizing of town/city names based on population density (popcat)
Changed borders (admin_level) to improve support for non-UK counties by grouping togther Parishes=9/10, Districts=7/8, Counties=5/6, National=2/3/4
Changed pharmacy amenity symbol to also include chemist shops (non OS symbols).
Changed order of options, putting least changed options towards bottom of list.
Changed embankments to draw at a higher level priority to avoid them being overdrawn by water ways and residential areas.
Changed footbridges to draw at a higher level priority to avoid them being overdrawn by water ways.
Changed tunnels to use smaller dashes for better match OS map style.
Changed 1:50k trunk_link and motorway_link roads to use correct/matching outline widths on bridges.
Changed highway labels at zoom levels 7-12 to use captions instead of pathtext for OS labels
Changed priorities of several symbols to improve visibility of churches, information and museums at lower zoom levels.
Changed car parks at lower zoom levels (upto zoom 15) to only show ~|destination|customers|public car parks.
Changed hill name sizes slightly larger
Changed (corrected) selection of national hiking routes to only include iwn|nwn, i.e. remove rwn|lwn|uwn.
Changed (corrected) selection of national cycling routes to only include icn|ncn, i.e. remove rcn|lcn|ucn.
Changed (corrected) wells so they now get displayed.
Changed doctors captions from red to black text.
Changed v3 theme place names to match/harmonise to style used on v4 theme.
Removed tourism brown dashed ways accidentally left in from donor theme (UK Voluntary)
Removed access cross hatchings on footpaths accidentally left in from donor theme (UK Voluntary)
Removed surface dashes on 'white' roads accidentally left in from donor theme (UK Voluntary) - If this is going to be in the theme then I need to think about how to do it in an OS style way...

v20200530
Fixed validation errors (one was a real issue in V4 theme for railway stations at zoom 13, rest were technical errors but not impacting display of maps).

v20200607
Split v3 and v4 theme files into separate day and night theme files so they can have different map=background tags, different PDF legends and increase performance.
Added night mode symbols for transmitters, windmills, wind turbines, lighthouses, ruins/archaeological, battlefields, telephones, helipads, bollards.
Added night mode PDF legend.
Added four .lnk files to map the two PDF legends to relevant four theme files.
Changed priority of cemetery symbol lower than church symbol.
Changed night mode track core colour to match service/residential roads.
Changed night mode tunnels to use own night equivalent of day tunnel colours.
Changed night mode steps to look similar to day time steps and less like a ladder.
Changed night mode turning circles and passing places to be more visible.
Changed area ways for residential roads to match residential road outlines for all map themes.
Changed AED, playground and shooting symbols to remove white outline/background to match other symbols.
Changed 50k toilet symbol to fix errors in tiny-svg rendering.

v20210103
Added cycle lanes and cycle tracks with display option "cycle lanes/tracks".
Added option to hide hiking route diamonds.
Added option to hide cycling route circles.
Changed emphasise hiking routes to highlight routes with route label from zoom level 7 to 14, 15 upwards as before.
Changed emphasise cycling routes to highlight routes with route label from zoom level 7 to 14, 15 upwards as before.
Changed emphasise hiking routes highlight colours, green for national and yellow for local.
Changed emphasise cycling routes highlight colours, red for national and blue for local.
Changed (renamed) option "left/right hand traffic road labels" to "drive on the left/right side" as this option now also affects oneway cycle lanes/tracks.

v20210210
Added captions for beaches, mud flats and sand banks.
Added captions for fells.
Added customer and private parking symbols.
Added cutlines (in woods/forests)
Added ditches that are barriers.
Added earth banks using typical OS slope pattern.
Added emphasise cycle lanes/tracks options using purple highlight colour.
Added gullies, rendered as OS cutting pattern.
Added hedges as a non-os option.
Added military bunkers (active and dis-used) symbols.
Added post boxes with red circle for left hand traffic and yellow square for right hand traffic - symbols to match the typical post box shape/colour used in LHT/RHT countries.
Added public artwork symbol.
Added town hall as an important building (bolder outline of building).
Added town hall symbol.
Changed abandoned/disused railways to render before rivers.
Changed climbing symbol to be larger.
Changed embankments for footpaths to be narrower.
Changed grade1 tracks to be thinner and matching the rest of the tracks.
Changed many railway/highway tunnels to render as transparent dashed outlines.
Changed OS 50k cycleways (single black dashes) to appear sooner from Z14.
Changed piers and walls to render after waterways to avoid being hidden by waterway areas.
Changed tidalflats that are hidden under water areas to be visible.
Changed waterways (in a major way), now they are all rendered as casings first and then as cores to avoid blue lines where they join.
Removed erroneous rendering of "water_park" as water, this was an incorrect understanding of its purpose (thanks John Percy for the hint).

v20210216
Added "dash unsealed roads" overlay option to give unsealed roads a dashed outline/casing.
Added "road surface/grade textures" overlay option to give unsealed roads a texture pattern that represents the type of surface, from Z14 onwards.
Added "emphasise road surface/grade textures" overlay option to highlight roads surfaces at lower zoom levels, from Z12 onwards.

v20231013
Removed springs and wells from 50k maps, as per OS map's convention.
Added support for LoMap v4 maps.
Added options to control what is shown as psuedo public right of way: "accessible footpaths" and "designated footpaths".
Added mountain bike routes using purple cirlces with options to hide routes, circles or highlight the routes.
Added option to emphasise public rights of way using colours that align with the UK signage arrows.
Added permissive footpaths and steps in orange.
Added tidal footpaths, steps and tracks in light blue.
Added support for private footpaths in dark red.
Added naming of pedestrian ways (including sealed footways/paths)
Added naming of ferry routes.
Added allotments, ATMs, banks, breakwaters, fire stations, groynes, hunting stands/butts, ice cream vendors, police stations, recycling, sewage works (OAM), water works (OAM).
Added mountain range support for gullies and saddles (passes betweem mountains).
Added support for additional types of bridge: cantilever, aqueduct, boardwalk, trestle.
Added on street parking.
Added new types of parking (for public, customer and privte): underground parking and covered parking.
Added hollow circle markers for off-road cycle routes, on road routes remain as solid circle markers.
Added support for OAM to show covered reservoirs, cuttings, tree rows, os_open_data crags, peninsulas.
Added support for OAM peak distances to introduce and name mountain peaks in order of importance/size.
Added support for LoMap v4 maps to represent "public rights of way" using proper OS map symbology for public footpaths/bridleways, byways open to all trafficm restricted byways, other routes.
Changed for OAM maps to pseudo-represent "public rights of way", i.e. green/pink dashes for public hiking routes, designated footpaths and bridleways (note OAM does not support PROW tags).
Changed default options for 25k to be feature rich, and 50k to be OS minimal features.
Changed "public rights of way" to use slightly large dashes to be more visible and closer in style to OS maps.
Changed buildings in 25k views to merge as you zoom out, avoids clutter of lots of small buildings.
Changed order of drawing of features that were hidden under water, e.g. sand banks, rocks, tidal mud, etc.
Changed beaches to be transparent so the coastline shows through as represents a high tide water mark.
Changed what is included in residential areas to be closer to OS maps.
Changed garden symbol to be limited to public gardens only.
Changed contours to be slightly lighter and more in line with OS maps.
Changed spacing of route markers (diamond and circles) to be spaced slightly further apart.
Changed sealed footpaths to be shown as solid pedestrian ways.
Changed tidal mud and inland marsh to render more like OS maps, mud is just brown with no symbols, marsh is just blue marsh symbol.
Changed mini-roundabouts to be slightly larger to be more visible.
Changed golf symbol to also include miniature golf courses.
Changed naming of commons to appear sooner and lower zoom levels.
Changed preserved railway symbol to also include funicular and narrow_gauge railways.
Changed embankments to be slightly shorter triangles, reduces self erasure when they overlap or are close together.
Changed priorities of various symbols to prioritise those that align with OS map conventions first.

v20231218
Removed residential roads from filled in residential areas at zoom level 12.
Removed unused categories and tidied up style menu definitions
Added colour icons to style menus to indicate options by colour groups, green=hiking, orange=cycling, purple=mtb, brown=urban, black=roads, white=non-OS.
Added option "Show symbols earlier" so you can have less symbol intrusion at Z15 and lower, useful in urban/city areas.
Added option "Building names earlier" so you can have more building namers appear earlier from Z16 onwards.
Added option "emphasise all sealed roads too" so you can selectively also highlight ALL roads that are sealed, or disable (if you prefer a less distracting urban view).
Added footpath names visible from Z16.
Changed "surface textures" options to also include all steps, footpaths and bridleways.
Changed option "road surface/grade textures" to "surface textures" to be shorter menu entry.
Changed option "emphasise road surface/grade textures" to "emphasise surface textures" to be shorter menu entry.
Changed size of covered reservoir symbol at Z13/Z14 to be smaller.
Changed unclassified roads to appear from Z12 (was Z13).
Changed smaller service roads to appear from Z13 (was Z12).
Changed 50k pylons to be smaller at high zoom levels.
Changed place name priorities to work better.
Fixed missing bridges casings at Z13/Z14.
Fixed symbol/pattern filenames to be have matching cases in both theme and filing system - enables theme to work correctly with OruxMaps.

From v20210216  onwards the theme now supports road surfaces and sealed/unsealed roads:


The theme ZIP files and PDF legends are too large to attached to this post (limit of 2MB) so, I am now releasing everything via a shared google drive folder:

    OS Map Theme Releases

Link to latest release:

    OS Map v20231218.zip

Links to the latest OS Map Legends:

    OS Map Day Legend
    OS Map Night Legend

The theme is now provided in a ZIP file form that can be simply copied into Locus Map's _theme folder, e.g.:

\<root>\Android\data\menion.android.locus.pro\files\Locus\mapsVector\_themes (i.e. for LM Classic)
\<root>\Android\data\menion.android.locus\files\Locus\mapsVector\_themes (i.e. for LM 4)

No need to unzip the theme file anymore.

If you have already started using the earlier OS Map theme version then you probably should delete it before installing this updated version as it uses the same theme folder called "OS Map" but now uses four different named theme files - to cover day/night themes for v3/v4 maps.

Note that the legends are now included in the theme and can now be viewed directly from the theme menu in LM 3.46+ via a long press of the theme icon, see attached screenshot.

From v20231218 onwards, the theme now includes support for public rights of way (currently only LoMap v4 maps). There is now an appendix in the PDF legends that explains how these are interpreted, which is mostly UK specific:

The following users thanked this post: Magellan
#17
In the following post I used a script to semi-automatically convert the Waymark-V2a LoMap theme to be compatible with the MF v4 map theme renderer, i.e. so it would "work" with v4 maps:

https://forum.locusmap.eu/index.php?topic=6948.msg59452#msg59452

I used the Waymark-V2a theme purely as a test of the script as it is quite a large theme file, and it "worked" with v4 maps, in so much that it is displayed something. However it was pointed out that it didn't display the hiking trails, cycle routes or waymark symbols.

I started to look at why and realised that the Waymark-V2a theme was developed purely for Locus Map maps and did not appear to support OAMaps. I have made some further tweaks to the converted version from the link above and got the cycleways, hiking routes and waymarks to display now. You can also select/deselect the hiking/cycle routes. However, I do not think it will be possible to deselect waymark symbols for specific OSMC colour routes. For now, the theme only switches on/off all waymark symbols. Also not finding a way to not show trails when waymark routes are selected - other than overdraw the trails, but the route labels still show... so I left it alone for now).

I've not packaged it up into a ZIP with all the resources yet, because it is really just an experimental theme at this stage which will require some more testing/feedback, especially considering the original is set up for LoMap tags and not OAMap tags. There will probably be many other missing items for this reason. Probably a Waymark-V2a user will spot them very quickly!

To try it you will need to have the Waymark-V2a theme already installed and also a v4 map that supports OSMC waymarks (the UK maps I use do not).

You just need to copy the attached Waymark-V4a.xml and Waymark-V4a.png files into the same directory as the original Waymark-V2a.xml theme file is stored (will depend on where you chose to install Locus Maps I suspect).  Will be something like:

/storage/6345-6342/Android/data/menion.android.locus.pro/files/Locus/mapsVector/_themes/Waymark-V2a/
/storage/emulated/0/Android/data/menion.android.locus.pro/files/Locus/mapsVector/_themes/Waymark-V2a/

I'm wondering if there is any point using the Waymark theme, now that Elevate 4 supports Waymarks...
The following users thanked this post: Magellan
#18
At the moment I'm converting my OS Map theme from v3 to v4. I have been finding the process very mechanical and repetitive, so much so that once I I done around 2,500 lines out of 10,000 lines by hand I decided to quick put together a script to do most of the changes programatically. 

Attached is a VBScipt that does most of the changes required to convert a v3 theme to v4.

I quickly discovered that  v4 render engine is very intolerant to syntax errors and if any are present it will refuse to display anything. This means manually removing parts of the generated v4 theme until it works and locating the syntax error. The following are some examples of errors I found in several themes:
   - stroke-width="1.2p"
   - <rule case="off_pl"
   - close="yes"  (should be closed="yes")

I have converted the following themes using the script, in some cases requiring some additional custom mods:
   - OS Map
   - Outdoor (because it is small, simple and already has a v4 theme to compare with)
   - Waymark2a

I would consider the output of the script as a starting point only and not a final theme. In some cases it is possible to tweak the theme using the script, see the Outdoor script for an example. In some cases there are differences that have to manually changed in the generated theme. Waymark2a is an example of this, seems the v4 rendering in LoMaps has a bug, the following puts green dashes on service roads as well as raceways:

<rule e="way" k="highway" v="service|raceway" zoom-min="14">
   <line stroke="#ffffff" stroke-width="0.81" />
   <rule e="way" k="highway" v="raceway" zoom-min="14">
      <line stroke="#a5cba5" stroke-width="0.54" scale="all" stroke-dasharray="1,1" stroke-linecap="butt" />
   </rule>
   :


so I had to manually separate service and raceway rules to fix this:

<!-- service raceway -->
<rule e="way" k="highway" v="service" zoom-min="14">
   <line stroke="#ffffff" stroke-width="0.81" />
   :
<rule e="way" k="highway" v="raceway" zoom-min="14">
   <line stroke="#ffffff" stroke-width="0.81" />
   <line stroke="#a5cba5" stroke-width="0.54" scale="all" stroke-dasharray="1,1" stroke-linecap="butt" />
   :


I'll add the converted Outdoor and Waymark example themes in the next few posts. I'm using the initial conversion of my OS Map theme as a starting point for a v4 OS Map theme. I'm about 50% complete so far, but am battling with lack of symbol and text scaling in v4...

Please note that this script is a quick hack, there are probably better ways using XML libraries to do this... It does no error checking and you'll probably need to modify it for best results. It is a visual basic script and should work on a Windows command line using the following command line syntax:

     cscript v3_to_v4.vbs <v3 rendertheme>.xml <v4 rendertheme>.xml

Where:

        v3_to_v4.vbs                 -- Name of this script
        <v3 rendertheme>.xml         -- Input file that is a v3 rendertheme file, e.g. VoluntaryV3.xml
        <v4 rendertheme>.xml         -- Output file to be created as a v4 rendertheme file, e.g. VoluntaryV4.xml


Just putting this out there in case it is useful to other theme writers. It isn't really suitable for most people to use, but anyone with a basic understanding of visual basic and renderthemes should be OK.
I would check the examples in the following posts for examples of how to use the custom coding section and supporting functions...

Karl.
The following users thanked this post: Magellan
#19
Having used UK Ordnance Survey (OS) maps all my life, when I started using Locus Map I was desperate for a map theme that looked similar. After using both Voluntary UK and OS Style themes for a while, I still hankered after something closer to the style of the original UK OS maps. So I decided to create my own theme that tries to emulate the Ordnance Survey 1:25k and 1:50k map styles as closely as is possible within the constraints of Locus Map and data provided by the vector maps. It should work with both LoMap and OAM maps. I must give credit to John Campbell for his Voluntary UK theme that I used as a starting point (v. 190101).

There are 6 maps styles provided in the theme:

  • Explorer 1:25k
  • Landranger 1:50k
  • Dynamic Scale
  • Night Mode 1:25k
  • Night Mode 1:50k
  • Night Mode Dynamic
Dynamic Scale automatically switches from 50k to 25k at zoom level 16.
Night Modes provide a darker colour scheme for night usage that preserve the OS colour, but muted a bit. I don't like the built in night mode as it inverts all the colours.

There are also several overlay options:

  • non-OS  symbols
  • non-OS road furniture
  • demanding paths
  • hiking routes, national
  • hiking routes, local
  • emphasise hiking routes
  • cycling routes, national
  • cycling routes, local
  • emphasise cycle routes
  • fill in residential areas
  • grow 50k buildings into town masses
  • emphasise land access
  • OS style road labels
  • level road labels
  • boxed road labels
I used google translate to define the translations, so let me know if there are more appropriate translations.

I also created PDF legends for the 25k and 50k themes to show what is supported/different using a similar style to the original OS legends with screenshots from Locus Map and the theme's own symbols etc.

Last attachment is a ZIP of the theme. (now with .nomedia files, thanks Henk van der Spek for pointing that out).

Install in the usual way of unzipping in Locus Map's _theme folder, e.g.:

\<root>\Android\data\menion.android.locus.pro\files\Locus\mapsVector\_themes

I've only tried this on my phone (Samsung Galaxy A3) and tablet (Samsung Galaxy Note 10.1 2014). It is quite a big theme file now (~10,000 lines)  because it contains so many different categories and overlay options. I am interested to know if it works OK for everyone. I have considered creating a "lite" 25k only option to see it is works faster or not...

I am putting this theme out there as I feel it might be of interest to others. It is provided as is.
I am not inclined to spend a lot of time working on it, but you are welcome to modify it for your own purposes.

Let me know if there some major problems with the theme.

Here is a comparison of the same map rendered with: Internal Theme, Voluntary UK, OS Style and my new 4 OS map styles (also attached as ThemePreviews_LORES.jpg but lower resolution):


USE SCROLL BAR TO VIEW THE REST >>>>

UPDATE 2020.04.27
I have fixed:
   - couple of  mistakes in the legends
   - added to the legends some additional overlay footer notes.
   - country borders to include admin_levels 2, 3 and 4 now.
   - rounded locks in rivers now square
   - some syntax errors I found during porting to v4 (which is now about 50% completed).

I've updated the attachments with new versions, hence their counters are reset.
The following users thanked this post: Magellan
#20
Quote from: jusc on September 28, 2019, 12:44:31
What is to do? Doesn´t the  features of the Locus V3 rendering engine work any longer?
Is there any description for Locus themes of all tags I can use?
Locus uses the standard mapsforge engine for maps V4 and higher. As the Locus extensions were never ported back to mapsforge, they can't be used.
I made a reference which tags are supported by which mapsforge version here:
https://www.openandromaps.org/en/oam-forums/topic/mapsforge-rendertheme-reference
The following users thanked this post: Magellan
#21
The latest version of the GPS Averaging app is now serious malware. Even when it's not running, it randomly puts up full screen ads. Even if it has never been run after a phone reboot, the ads still randomly pop up. I have Uninstalled.

Is there another averaging app that integrates with Locus Pro?
The following users thanked this post: Magellan
#22
Updated in the first post for Locus 3.38+ (new rendering engine).

Note if you have installed any of the interim versions of this theme, please uninstall and delete them by means of a long press in the Locus theme selector.
The following users thanked this post: Magellan
#23
I found version 3.0.2 at https://app.box.com/s/g06eujo3gwoxqil4bmmqyg4dgiupph5e
The following users thanked this post: Magellan
#24
Quote from: john_percy on April 28, 2019, 14:19:38
Is there a definitive guide to the usage of these tags anywhere?
The best thing is still this:
https://github.com/mapsforge/mapsforge/blob/master/docs/Rendertheme.md
That's a reason why I made the table, to have at least a complete overview. Of course one can add a lot to it, but it's a start.
The following users thanked this post: Magellan
#25
I made a reference which mapsforge version support which tags that can be found here:
https://www.openandromaps.org/oam-forums/topic/mapsforge-rendertheme-reference
The following users thanked this post: Magellan
#26
Quote from: Magellan on April 27, 2019, 05:04:34
Thanks for the hint about the problem tags in the theme for V4 on your site.
I made a reference which mapsforge version support which tags that can be found here:
https://www.openandromaps.org/oam-forums/topic/mapsforge-rendertheme-reference
The following users thanked this post: Magellan
#27
As a result of the changed way the new beta deals with scaling maps for devices of different resolution, I've put together new versions of my Mapsforge version 4 compatible themes. They are effectively add-ons to the Voluntary themes. At present they are solely for the beta version and will simply not appear in the list of available themes in the current release, hence I have named them Voluntary Mapsforge beta and Velocity beta.
Download, unzip and add to your Locus themes directory.
Please let me know if they work for you.
The following users thanked this post: Magellan
#28
@Petr
I do not understand yet how these layers affect Mapsforge, but thanks for the explanations.

@Gunnar
I had already found out that it is related to the forest, but still had no time to think of a workaround. Thank you for your workaround. I will take it over.

@All
The changes I will no longer in the HiLo theme but only in the follow-up theme "active RT", if interested can download this on Github.
https://github.com/FrankSchoeneck/active_RT
The following users thanked this post: Magellan
#29
To the Locus and OpenAndroMaps community,

after many try-and-error runs I was able to adapt my "outdoor" theme and create the new "outdoorV4" theme, which can be used with the new multi-language mapsforge V4 OpenAndroMaps. It is compatible only with these new maps!
In general, I have tried to make the theme identical to the existing "outdoor" theme. Due to problems with many tags used for the configuration of font sizes and priorities, many small changes had to be made. You will find more details (i. e. which tags had to be ommitted) an my website www.maiwolf.de/locus/ [in German].
Please take the theme as a draft. I am happy for any comments, suggestions and there will be constant improvements. Maybe, I will adapt in the future also my existing "desert" theme.

Download the newest version on www.maiwolf.de/locus/

Bernard
The following users thanked this post: Magellan
#30
Other features / Re: Update of map core (2019)
April 06, 2019, 12:04:11
Hi guys,
one month delay ... not too bad I believe.

So who is brave enough to try the new special Alpha version? :)

How to:
Download 3.37.2.4 Map-alpha: https://asamm.myqnapcloud.com/share.cgi?ssid=04Wcqtt
Download 3.37.2.6 Map-alpha: https://asamm.myqnapcloud.com/share.cgi?ssid=0H4qEQX
Download 3.37.2.7 Map-alpha: https://asamm.myqnapcloud.com/share.cgi?ssid=0qcpBbS

Version is based on 3.37.2 + latest fixes + months of work on new "map core".

What to test:
Best: use as you usually do with the regular version.

I mainly try to achieve:
- better support for MapsForge V4 maps
- the good old Map manager that looks exactly the same as in current public version (it use different map system on background)
- improved suggested maps in "Quick map switch"
- better display of raster maps on devices with higher DPI
- correct work of overlays
The following users thanked this post: Magellan