logo separator

[mkgmap-dev] Problem with global index POI search

From Gerd Petermann gpetermann_muenchen at hotmail.com on Sun Nov 14 17:15:19 GMT 2021

Hi Ticker,

the number of records in Mdr12 depends on the constant 10240 which is just a value. 1000 and 1000000 also work.
The problem probably only occurs if you use one of the later entries as search argument, e.g. scuo. In this case MapSource ignores entries in Mdr10 before the given number. So, the number is important if given, but MapSource also works fine when this line in MdrFile is commented
mdr12.setIndex(mdr11.getIndex());

Gerd

________________________________________
Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag von Ticker Berkin <rwb-mkgmap at jagit.co.uk>
Gesendet: Sonntag, 14. November 2021 18:04
An: Development list for mkgmap
Betreff: Re: [mkgmap-dev] Problem with global index POI search

Hi Gerd

I notice that Mdr8, which is commented as having the same relationship
to Mdr7 as Mdr12 does to Mdr11, is commented out.

On my test area with 2 tiles and ~40k POI, Mdr12 has 4 records.

Ticker

On Sun, 2021-11-14 at 16:21 +0000, Gerd Petermann wrote:
> Hi all,
>
> I think I finally found what's wrong. MapSource doesn't like the
> Mdr12 index which contains a few pointers with the first 4 characters
> of a POI name. The funny thing is that MapSource works well when this
> section isn't written at all. Maybe it is slower but I found no
> difference. The attached patch changes only the content of the
> section. The code now works similar to that in PrefixIndex class so
> that strings are compared with the collator that is set to compare
> only primary strength.
>
> Gerd
>
> ________________________________________
> Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag
> von Gerd Petermann <gpetermann_muenchen at hotmail.com>
> Gesendet: Sonntag, 14. November 2021 11:33
> An: Development list for mkgmap
> Betreff: Re: [mkgmap-dev] Problem with global index POI search
>
> Hi all,
>
> my findings so far:
> I can also reproduce the problem with the default style for a
> complete map of Italy (geofabrik extract from 2021-06-23) using
> options
> java -jar mkgmap.jar  --preserve-element-order --bounds=bounds.zip  -
> -max-jobs --code-page=1252 --lower-case --add-pois-to-areas -c
> template.args
> Will try to find a much smaller set of files...
>
> The uppercase.patch helps also in this case, so it is probably a good
> approach. Index size doesn't change with this patch, uppercase2.patch
> increases it.
> Have to analyse memory peak usage, though.
> @Ticker: I also tried various alternatives with
> Collator.setStrength() and similar but nothing fixed the search. I
> guess we really need a very small set of tiles with only a few
> strings to fully understand what's wrong.
>
> Gerd
>
> ________________________________________
> Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag
> von Gerd Petermann <gpetermann_muenchen at hotmail.com>
> Gesendet: Samstag, 13. November 2021 11:16
> An: Development list for mkgmap
> Betreff: Re: [mkgmap-dev] Problem with global index POI search
>
> Hi,
>
> this problem is possibly related to --lower-case.
> Both attached mini-patches seem to fix the problem (but may introduce
> others).
> No idea yet if this is the right way to tackle this problem.
>
> Gerd
>
>
> ________________________________________
> Von: mkgmap-dev <mkgmap-dev-bounces at lists.mkgmap.org.uk> im Auftrag
> von Gerd Petermann <GPetermann_muenchen at hotmail.com>
> Gesendet: Samstag, 13. November 2021 09:49
> An: mkgmap-dev at lists.mkgmap.org.uk
> Betreff: [mkgmap-dev] Problem with global index POI search
>
> Hi devs,
>
> Enrico has contacted me in a PM about a rendering problem with his
> maps and while analysing that I found an obvious bug searching for
> e.g.
> "Scuola Dell Infanzia Fondazione Pietro Caprettini" as name of the
> POI without filling any further fiels in MapSource.
> When I start to type that name MapSource updates the list of
> candidates.
> For scuo it shows the full name "Scuola Dell Infanzia Fondazione
> Pietro Caprettini" but when I select that entry with the mouse the
> search returns "no items found"
> When I type scuol the name "Scuola Dell Infanzia Fondazione Pietro
> Caprettini" disappears from the candidates list as well as all other
> names starting with "Scuola dell".
> My understanding is that we probably create wrong Mdr11 entries, but
> MdrCheck doesn't complain.
>
> The tiles are at https://files.mkgmap.org.uk/detail/536
> The command to reproduce the problem:
> java -jar mkgmap.jar --code-page=1252 --index --gmapi  66923003.img
> 66923005.img 66923006.img
>
> The tiles were created with the --lower-case option and a rather
> special style which sometimes adds leading / trailing blanks to
> names. It also produces lots of equally named POI.
>
> Gerd
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


_______________________________________________
mkgmap-dev mailing list
mkgmap-dev at lists.mkgmap.org.uk
https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


More information about the mkgmap-dev mailing list