logo separator

[mkgmap-dev] [PATCH] cope with duplicate city names

From Steve Ratcliffe steve at parabola.demon.co.uk on Fri Jan 30 08:05:48 GMT 2009

Hi

> This patch goes on top of the very latest SVN revision (856) and it
> makes mkgmap cope with duplicate city names. It's often the case that
> small villages/hamlets have the same name - for example, I live in a
> hamlet called Chorlton and there's another Chorlton no more than 20
> miles away.
> 
> With this patch, the GPS will know about all of the cities with the
> same name rather than just getting one of them as was happening before.
>
> BTW - gpsmapedit seems to squash duplicates together so it only lists the
> duplicated city name once in its list of cities.

Thanks for the patch, just one thing though.

> -				sortedCities.put(p.getName(), null);
> +				sortedCities.put(p.getName() + "@" + p, p);

Really I'd just use a list here and sort it with Arrays.sort() and a
comparator or something similar.  It will make everything simpler.

..Steve



More information about the mkgmap-dev mailing list