Hi,

Taking Felix openmtbmap de(29.01.2010) and searching e.g. for the street "Am Hof" in Mapsource, i got some results, two of them in Köln..
First found as        "Am Hof, Koeln, DEU"
Second as             "Am Hof, Koeln, Koln, DEU.
None of them could be found by entering Koln or Koeln in the citys field of adresssearch because KOELN is not in the city index and Koln in the address is only the county part in one of the streets. So in both cases addresssearch included city information can't work. The city itself only could be found ( map is compiled without -latin1 as Felix told) only by entering "Koln". On the GPS(60csx) entering "Am Hof" won't find the street directly. I have to scroll down the whole list, which itself is really messed up.
Entering the city doesn't work at all.

Where does that "KOELN" is coming from in the example?. Why is there no COUNTY information for one street.?

_*Where does that "KOELN" is coming from?*_
I have downloaded the osm-data which covers these particular Also, although i'm not a skilled java coder, i had a look in the locator stuff(locator.java., locatorconfig.java, locatorconfig.xml)
I played around with a the data by setting the location-autofill parameter

1: location-autofill=0
One founded like "Am Hof, Koeln, DEU"
Second as             "Am Hof, Junkersdorf, Koln, DEU
In this case simply the content of the name tag from the citypoi "Junkersdorf", which is close to the street is taken for the city-part of the adress.
2: location-autofill=2 gaves me the same result as in Felix map.
One  founded like "Am Hof, Koeln, DEU"
Second as             "Am Hof, Koeln, Koln, DEU
3: location-autofill=1 gaves me also the same result as in Felix map.

location-autofill=2 or location-autofill=1 is analyzing the is_in tag of that citypoi "Junkersdorf" where "Köln" is found. This leads to the citypoi "Köln". And there the "openGeoDB:sort_name" seems to be taken in absence of tag addr:city as value for the city-part of the streets address. In this case the value of openGeoDB:sort_name is "KOELN". And so the cityname in cityindex is "Koln" (without -latin1) but the city in the street address is "KOELN" and will never match.

_*Why is there no COUNTY information for one street*?_

The easiest would be if there is always correct adress information at the object . So there would be no imperative trying to gather necessary information for the address search on another way like with the location-autofill. But thats not the situation.
The COUNTY part is coming out of is_in tag.

cityPoi "Köln"
<tag k='is_in' v='Regierungsbezirk Köln,Nordrhein-Westfalen,Bundesrepublik Deutschland,Europe' />

Locatorconfig.xml
regionOffset="3"

code snippet out of  LOCATOR.JAVA:
        if(p.getIsIn() != null)
        {  String[] cityList = p.getIsIn().split(",");
            //System.out.println(p.getIsIn());
// is_in content is not well defined so we try our best to get some info out of it // Format 1 popular in Germany: "County,State,Country,Continent"
            if(cityList.length > 1 &&
isContinent(cityList[cityList.length-1])) // Is last a continent ?
            {   // The one before contient should be the country
p.setCountry(fixCountryString(cityList[cityList.length-2].trim()));
                // aks the config which info to use for region info
                int offset = locConfig.getRegionOffset(p.getCountry()) + 1;
                if(cityList.length > offset)
p.setRegion(cityList[cityList.length-(offset+1)].trim());

As far as i understood and tested, i never will get here any usable result for county if i have only 4 field parts in is_in tag and
regionOffset="3" in Locatorconfig.xml.
Of cource you actually really not know how many field parts you will found in is_in tag, sometimes there are 5 parts and the code will work in a way as the example partially shows(citypoi "Junkersdorf has 5 field parts in his is_in tag). Nevertheless imo the code doesn't work as i would expect it from the given example in code // Format 1 popular in Germany: "County,State,Country,Continent". I think either you reduce regionOffset inLocatorconfig.xml or change the code. But maybe, because i have a really small understanding of JAVA i'm totally wrong.

cheers
Gert

_______________________________________________
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Reply via email to