Bonjour

Le géoréférencement inverse, c'est ma marotte !

Si l'on fait une recherche inverse aux coordonnées suivantes 46.34984882866581 6.167367409381621, par exemple avec https://wnat.fr/ajax_JQUERY_Georefer...tionOfInterest
(On peut ajouter le paramètre DEBUG=OUI pour voir la réponse IGN), la réponse retourne une localisation à 2,5km dans "Divonne-les-bains" alors que les coordonnées de recherche sont en Suisse (certes à 500m de la frontières et de "Divonne") !

Y a-t-il une solution, un paramètre pour avoir une réponse "null" si les coordonnées ne sont pas en France ?

La réponse JSON de mon WS :

Code JSON : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
{
   "GeoReferencement":{
      "Lieudit_clic":{
         "Origine":"IGN",
         "C_Pays":"FR",
         "C_Departement":"01",
         "C_Commune":"Divonne-les-Bains",
         "C_INSEE":"143",
         "C_Nature":"Commune",
         "C_LAT":"46.358161",
         "C_LONG":"6.136041",
         "C_TERRITOIRE":"FXX",
         "C_ExtendedGeocodeMatchCode":"City",
         "C_distance":"2575.75",
         "L_Nature":null,
         "L_Municipality":"",
         "L_StreetNumber":"",
         "L_Street":"",
         "L_LAT":"46.358161",
         "L_LONG":"6.136041",
         "L_ExtendedGeocodeMatchCode":"Toponym",
         "L_distance":"2575.75"
      },
      "Lieudit_plus_proche":null,
      "Adresse_plus_proche":null
   }
}

La réponse XML du WS IGN :

Code XML : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
<XLS version="1.2" xmlns="http://www.opengis.net/xls"
  xmlns:gml="http://www.opengis.net/gml"
  xmlns:xls="http://www.opengis.net/xls"
  xmlns:xlsext="http://www.opengis.net/xlsext"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://wxs.ign.fr/schemas/olsAll.xsd">
  <ResponseHeader/>
  <Response requestID="abc" version="1.2">
    <ReverseGeocodeResponse>
      <ReverseGeocodedLocation>
        <gml:Point>
          <gml:pos>46.358161 6.136041</gml:pos>
        </gml:Point>
        <Address countryCode="PositionOfInterest">
          <StreetAddress/>
          <Place type="Municipality">divonne-les-bains</Place>
          <Place type="Departement">01</Place>
          <Place type="Bbox">6.052754;46.332982;6.170061;46.417911</Place>
          <Place type="Importance">3</Place>
          <Place type="Commune">Divonne-les-Bains</Place>
          <Place type="INSEE">01143</Place>
          <Place type="Nature">Commune</Place>
          <Place type="Territoire">FXX</Place>
          <PostalCode>01220</PostalCode>
        </Address>
        <xlsext:ExtendedGeocodeMatchCode>City</xlsext:ExtendedGeocodeMatchCode>
        <SearchCentreDistance value="0.00"/>
      </ReverseGeocodedLocation>
      <ReverseGeocodedLocation>
        <gml:Point>
          <gml:pos>45.760786 4.844245</gml:pos>
        </gml:Point>
        <Address countryCode="PositionOfInterest">
          <StreetAddress/>
          <Place type="Municipality">Auvergne-Rhone-Alpes</Place>
          <Place type="Bbox">2.062914;44.115380;7.185887;46.804031</Place>
          <Place type="Importance">1</Place>
          <Place type="Prefecture">Lyon</Place>
          <Place type="INSEE">84</Place>
          <Place type="Nature">Région</Place>
          <Place type="Territoire">FXX</Place>
          <PostalCode>84</PostalCode>
        </Address>
        <xlsext:ExtendedGeocodeMatchCode>Région</xlsext:ExtendedGeocodeMatchCode>
        <SearchCentreDistance value="0.00"/>
      </ReverseGeocodedLocation>
      <ReverseGeocodedLocation>
        <gml:Point>
          <gml:pos>46.202336 5.222010</gml:pos>
        </gml:Point>
        <Address countryCode="PositionOfInterest">
          <StreetAddress/>
          <Place type="Municipality">Ain</Place>
          <Place type="Departement">01</Place>
          <Place type="Bbox">4.728221;45.610826;6.170352;46.519872</Place>
          <Place type="Importance">2</Place>
          <Place type="Prefecture">Bourg-En-Bresse</Place>
          <Place type="INSEE">01</Place>
          <Place type="Nature">Département</Place>
          <Place type="Territoire">FXX</Place>
          <PostalCode>01</PostalCode>
        </Address>
        <xlsext:ExtendedGeocodeMatchCode>Département</xlsext:ExtendedGeocodeMatchCode>
        <SearchCentreDistance value="0.00"/>
      </ReverseGeocodedLocation>
    </ReverseGeocodeResponse>
  </Response>
</XLS>