Hi,
I am having difficulties with the results from reverse georeferencing using OpenStreetMap as a service for locations in France.
There is NO error per se, but an important element of the administrative structure is missing.
This is the administrative level: Department ( Departments of France - Wikipedia ).
In the query response from OpenStreetMap, the information is present in ‘county’, but in the procedure: procedure TTMSFNCGeocodingOpenStreetMapGeocoding.Parse(ARequest: TTMSFNCGeocodingRequest; ARequestResult: string);
This element is ‘eaten’ by “region”
if di.Region = “” then
di.Region := TTMSFNCUtils.GetJSONProp(oc, “county”);
Is there a way to include this “county” in the TMS output? By adding a field in TTMSFNCGeocodingItem? I know/guess that this could be problematic for other countries...
Here are the query results for the location of TmsSoftware and the French municipality on the other side of the border (with the level in question in bold):
{
"place_id": 92916277,
"licence": "Data © OpenStreetMap contributors, ODbL 1.0. Copyright and License | OpenStreetMap ",
"osm_type": "way",
"osm_id": 848865523,
"lat": "50.8172244",
"lon": "3.1798048",
"category": "building",
"type": "yes",
"place_rank": 30,
"importance": 0.00005667124437319,
"addresstype": "building",
"name": "",
"display_name": "180_1, Roeselarestraat, Wevelgem, Courtrai, Flandre-Occidentale, 8560, Belgique",
"address": {
"house_number": "180_1",
"road": "Roeselarestraat",
"city_district": "Wevelgem",
"village": "Wevelgem",
"county": "Courtrai",
"state": "Flandre-Occidentale",
"ISO3166-2-lvl6": "BE-VWV",
"postcode": "8560",
"country": "Belgique",
"country_code": "be"
},
"boundingbox": [
"50.8170506",
"50.8174101",
"3.1791714",
"3.1800376"
]
}
{
"place_id": 92809188,
"licence": "Data © OpenStreetMap contributors, ODbL 1.0. Copyright and License | OpenStreetMap ",
"osm_type": "node",
"osm_id": 8533058911,
"lat": "50.7822743",
"lon": "3.1260730",
"category": "place",
"type": "house",
"place_rank": 30,
"importance": 0.000065510795757946,
"addresstype": "place",
"name": "",
"display_name": "101, Rue de Lille, Halluin, Lille, Nord, Hauts-de-France, France métropolitaine,
59250, France",
"address": {
"house_number": "101",
"road": "Rue de Lille",
"town": "Halluin",
"municipality": "Lille",
"county": "Nord",
"ISO3166-2-lvl6": "FR-59",
"state": "Hauts-de-France",
"ISO3166-2-lvl4": "FR-HDF",
"region": "France métropolitaine",
"postcode": "59250",
"country": "France",
"country_code": "fr"
},
"boundingbox": [
"50.7822243",
"50.7823243",
"3.1260230",
"3.1261230"
]
}
Thanks in advance