
Hi Gerd Mdr25 is effectively sorting by country, city, region. However it only detects changes in city or region. This would only be a problem if there were adjacent equal city®ion but in different countries - this is very unlikely. An additional test for this would clarify; maybe starting off as a warning or assertion. My reading of the code is that Mdr25 will be smaller than Mdr5 when the same city/region/country occurs in more than one map. The change c.getMdrCountry().getName() to c.getCountryName() is clearer and should give identical results. There are number of places in mdr where collator.compare() should be considered instead of .name.equals(). I think this should be done as a separate batch once r4809 has settled down. Ticker On Fri, 2021-10-22 at 08:53 +0000, Gerd Petermann wrote:
Hi Ticker,
attached are two slightly different patches for Mdr25 which I think make the code more plausible. v2 would be my choice. I've not yet tried to find out (again) how the sort works regarding strength.
In my maps I see that Mdr25 contains fewer records than Mdr5 (e.g. 7609 of 8275 or 1146 of 1850), but I have no clue yet how to find out which recrods from Mdr5 are skipped, means, what exactly has to be compared.
Gerd _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk https://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev