logo separator

[mkgmap-dev] Improved street search in index branch

From Steve Ratcliffe steve at parabola.me.uk on Sat Jan 22 11:37:37 GMT 2011

On 22/01/11 10:57, WanMil wrote:
> I compared the MDR5 code to the cpreview code.
> There is a unique flag for each city (0x800000). cpreview clears this
> flag if the previous region and city name are equal. The index branch
> checks for equality of map index and city name.
> I tried to change that but all I got was some new exceptions in MapSource.
> Steve: Did you also play with this flag?

Not much I just set it recently the way that I thought it should be (I 
think before the index branch it was always set).

I think that the map index is required both for consistency with other 
similar flags, and since the label offset is used rather than the actual 
string, there would be a chance of a false match if you didn't also 
check the offset was in the same map. (On the other hand the chance of 
the same name having the same offset in two different maps is also very 
low, so I think that removing the check for same map would, in practice, 
make very little difference).

The trouble is I don't know why the flag exists. Is it there so that if 
you are doing a binary search and end up at a matching name you know 
that this is not the first match if the flag is not set?  Or something 
completely different?  If you include region then surely there would be 
very few duplicate cities with the same name in the same region?

I'm not discouraged by the extra crashes when changing the flag, it 
rather indicates that it is more important than I thought.


More information about the mkgmap-dev mailing list