Configurable region/city mapping in address search?

It occurred to me that the definition of a region should probably depend on the area of the map that is being built. For a map that comprises most of Europe, a meaningful region could be the country. A map of a single country or closely related countries, such as the BeNeLux or the Baltic countries might use state or province for the regions. A map of a federal republic such as Germany or the USA could use the state for the region. A map of a single state might use city as the region and suburb or village (German: Ortsteil) as the city. Is the mapping of regions and cities configurable? How? I guess that one would get most flexibility with a location bounds file. Marko

not sure if this the answer you're looking for but: mkgmap:country=IND & mkgmap:region!=* & mkgmap:admin_level4=* { set mkgmap:region='${mkgmap:admin_level4}' } will give you the states as region (like rajasthan), whereas mkgmap:country=IND & mkgmap:region!=* & mkgmap:admin_level5=* { set mkgmap:region='${mkgmap:admin_level6}' } gives you districts (like udaipur) as region Am 14.01.2012 17:59, schrieb Marko Mäkelä:
It occurred to me that the definition of a region should probably depend on the area of the map that is being built.
For a map that comprises most of Europe, a meaningful region could be the country. A map of a single country or closely related countries, such as the BeNeLux or the Baltic countries might use state or province for the regions. A map of a federal republic such as Germany or the USA could use the state for the region. A map of a single state might use city as the region and suburb or village (German: Ortsteil) as the city.
Is the mapping of regions and cities configurable? How? I guess that one would get most flexibility with a location bounds file.
Marko _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

On Sat, Jan 14, 2012 at 06:20:35PM +0100, michael lohr wrote:
not sure if this the answer you're looking for but:
mkgmap:country=IND & mkgmap:region!=* & mkgmap:admin_level4=* { set mkgmap:region='${mkgmap:admin_level4}' }
will give you the states as region (like rajasthan), whereas
mkgmap:country=IND & mkgmap:region!=* & mkgmap:admin_level5=* { set mkgmap:region='${mkgmap:admin_level6}' }
gives you districts (like udaipur) as region
That could be it, thanks! I am not sure if the above only applies to boundary=administrative relations. For location-autofill=nearest (using place=* nodes only), I am guessing that region is hard-wired to the country. That is OK too, since the place=* is sort-of obsoleted by the boundary relations. Marko

For Luxemburg, because it is such a small country, I have adapted the default rules a bit: mkgmap:country=LUX & mkgmap:region!=* & mkgmap:admin_level6=* { set mkgmap:region='${mkgmap:admin_level6}' } I deleted the following rule, because level 6 is the highest (municipalties aka 'commune'): mkgmap:country=LUX & mkgmap:city!=* & mkgmap:admin_level8=* { set mkgmap:city='${mkgmap:admin_level8}' } This means that the locater will now use the nearest node to assign streets in smaller villages belonging to a municipality: Hualwee in Lieler,Commune Heinersheid, LUX With the default mkgmap rules there were no streets to be found in Lieler, only in Heinersheid. ---------- Marko wrote: I am not sure if the above only applies to boundary=administrative relations. For location-autofill=nearest (using place=* nodes only), I am guessing that region is hard-wired to the country. That is OK too, since the place=* is sort-of obsoleted by the boundary relations.
participants (3)
-
Marko Mäkelä
-
michael lohr
-
Minko