logo separator

[mkgmap-dev] [Patch v1] improve mdr7 index

From Gerd Petermann GPetermann_muenchen at hotmail.com on Wed Apr 5 17:13:49 BST 2017

Hi Felix,

the current patch adds the list of values to a HashSet and searches for exact matches only.
If we allow wildcards or regular expressions in general we need a lot more code to parse
a new option file and implement a sequential search for the given patterns.
I'd prefer to keep this simple for now, so please add each pattern. Or do you think that is not possible?

Gerd
________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Felix Hartmann <extremecarver at gmail.com>
Gesendet: Mittwoch, 5. April 2017 18:03:08
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] [Patch v1] improve mdr7 index

that looks more useful. I don't think reporting is needed - you can check if things are working in the map themselves - so it should be only in some kind of debug mode.

Could there be a wildcard like "?". I have thinks like M?? for M00 to M66. Of course I could add all combinations into  the file so I'm not sure if a wildcard like ? is a good idea. Maybe have ? not as wildcard but escaped "^?" as wildcard? Then I could simply have M^?^? as a rule in mdr-7-del instead of putting in all the possible combinations. I guess allowing ^* as wildcard would be a bit too strong though - and I guess should not be allowed?

On 5 April 2017 at 16:03, Gerd Petermann <GPetermann_muenchen at hotmail.com<mailto:GPetermann_muenchen at hotmail.com>> wrote:
Hi all,

attached is a patch which changes the meaning of --x-mdr7-excl and adds a 2nd option --x-mdr7-del.
A binary is here:
http://files.mkgmap.org.uk/download/345/mkgmap.jar

The new option --x-mdr7-del can be used to delete strings from road names before they are written to any index.
The option  --x-mdr7-excl is now only used for the partial names created by the --x-split-name-index option.
If you place them in an option file, you may use this:
x-mdr7-excl=Weg,Straße,Street,Road
x-mdr7-del=Service,Primary,Secondary,Tertiary,....

So, in x-mdr7-excl you list parts of real road names which should not be searchable. In x-mdr7-del you put words which were added by your style and should be removed from the name.
The removement of those strings is done from the end, it stops when a word is found that should not be deleted. This is what I described as 1a) here:
http://www.mkgmap.org.uk/pipermail/mkgmap-dev/2017q2/026584.html

You may now add blanks to improve readabilty, so
x-mdr7-excl=Weg, Straße, Street, Road
works like above. I am not sure if there is a case where we want to be able to exclude multiple words.

@Arndt:
In your current config file you use "Via Ferrata" and some other combinations with blanks like "unpav CyW". This will no longer work with this patch. Maybe you can change
your style to add "Via-Ferrata" instead the other combinations are simply no longer needed.

Do we need some kind of reporting for these options?
Maybe some stats like
mdr7-excl option Weg matched 11231 times
mdr7-excl option Straße matched 2321 times
...

Gerd

_______________________________________________
mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk<mailto:mkgmap-dev at lists.mkgmap.org.uk>
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev



--
Felix Hartman - Openmtbmap.org & VeloMap.org
Schusterbergweg 32/8
6020 Innsbruck
Austria - Österreich


More information about the mkgmap-dev mailing list