Documentation about some of the rest interfaces used in the geoadmin api

Some of the functions of the geoAPI use rest services. They can also be used in an independant way, give a valider refering URL.

Some of those REST services are described here

geocode

Geocoding can be done using the following URL:

 //apiv3.geoportail.lu/geocode/search

Parameters:

  • num: House number
  • street: Street name
  • locality: Locality
  • zip: Postcode
  • dc: random number (optional) to prevent caching
  • cb: callback function name. If specified return JSONP rahter than JSON
  • returnParcelInfo sends back the parcel number if set to true

Full example:

 //apiv3.geoportail.lu/geocode/search?num=54&street=Avenue%20Gaston%20Diderich&zip=&locality=Luxembourg&_dc=1386599465147&cb=stcCallback1001

Alternative:

  • queryString: formatted address in one string
  • dc random number
  • cb: callback function name
Example: 
//apiv3.geoportail.lu/geocode/search?queryString=54,%20avenue%20Gaston%20Diderich,1420%20%20Luxembourg

Return parameters

  • success: success true/false
  • count: Number of results found
  • results: List order by descending accuracy and ratio
    • parcel optional, according to request parameter returnParcelInfo true/false
      • key parcel id
      • label parcel label
    • ratio: ratio from 0-1. Expresses the certainty of the result, 1 being the maximum
    • name: Formatted string representing the addresse
    • easting: East Coordinate in LUREF Coords
    • northing: North Coordinate in LUREF Coords
    • address: Address String
    • geom : geojson Geometry Object with coordinates in LUREF X,Y
    • geomlonlat: geojson Geometry Object with coordinates in WGS84 Lat/Lon
    • matching street: Name of the street
    • accuracy: Codes from 0 - 8 expressing the level of geocoding(
      • 8. at house number level
      • 7. at point of interest level
      • 6. at street level
      • 5. at locality level
      • 1. at national level (Luxembourg)
    • AddressDetails: Address Details
      • zip: Postcode
      • Locality: locality
      • id_caclr_street: Street ID in national Address DB
      • street: street name
      • postnumber: hosuenumber
      • id_caclr_building: Building ID in national Address DB

Result:

{"count": 2, "results": [{"ratio": 1.0, "name": "54,Avenue Gaston Diderich 1420 Luxembourg", "easting": 75983.84375, "address": "54 Avenue Gaston Diderich,1420 Luxembourg", "geomlonlat": {"type": "Point", "coordinates": [6.11255434207935, 49.6106117587006]}, "geom": {"type": "Point", "coordinates": [75983.84375, 75110.6796875]}, "northing": 75110.6796875, "AddressDetails": {"zip": "1420", "locality": "Luxembourg", "id_caclr_street": "19", "street": "Avenue Gaston Diderich", "postnumber": "54", "id_caclr_building": "1088"}, "matching street": "Avenue Gaston Diderich", "accuracy": 8}, {"ratio": 1.0, "name": ",Avenue Gaston Diderich 1420 Luxembourg", "easting": 75643.185748922406, "address": " Avenue Gaston Diderich,1420 Luxembourg", "geomlonlat": {"type": "Point", "coordinates": [6.1078415667193298, 49.6100594816659]}, "geom": {"type": "Point", "coordinates": [75643.185748922406, 75049.512442753199]}, "northing": 75049.512442753199, "AddressDetails": {"zip": "1420", "locality": "Luxembourg", "id_caclr_street": "19", "street": "Avenue Gaston Diderich", "postnumber": "None", "id_caclr_building": ""}, "matching street": "Avenue Gaston Diderich", "accuracy": 6}], "success": true}

reverse geocode

Geocoding can be done using the following URL:

apiv3.geoportail.lu/geocode/reverse Parameters: * easting: East Coordinate in LUREF Coordinates * northing: North Coordinate in LUREF Coodinates * dc: random number (optional) to prevent caching * cb: callback function name. If specified return JSONP rahter than JSON Full example: apiv3.geoportail.lu/geocode/reverse?easting=80000&northing=80000

Alternative:

  • lat: latitude in WGS84 Coordinates
  • lon: longitude in WGS84 Coordinates
  • cb: callback function name
Example: 
//api.geoportail.lu/geocoder/reverseGeocode?lon=6.11249&lat=49.61055

Return parameters

  • success: success true/false
  • count: Number of results found
  • results: List order by ascending distance
    • distance: distance in m to the address
    • geom: geojson object with the coordinates of the point in LUREF coordinates
    • geomlonlat: geojson Geometry Object with coordinates in WGS84 Lat/Lon
    • name: formatted address string
    • easting: East Coordinate in LUREF coordinates
    • northing: North Coordinates in LUREF coordinates
    • address: formatted address string
    • AddressDetails: Address Details
      • zip: Postcode
      • Locality: locality
      • id_caclr_street: Street ID in national Address DB
      • street: street name
      • postnumber: hosuenumber
      • id_caclr_building: Building ID in national Address DB

Result:

{"count": 1, "results": [{"distance": 8.2954085109112103, "geom": {"type": "Point", "coordinates": [75983.84375, 75110.6796875]}, "name": "23,Avenue des Archiducs 1135 Luxembourg", "easting": 75983.84375, "address": "23 Avenue des Archiducs,1135 Luxembourg", "geomlonlat": {"type": "Point", "coordinates": [6.11255434207935, 49.6106117587006]}, "AddressDetails": {"zip": "1135", "locality": "Luxembourg", "id_caclr_street": "15", "street": "Avenue des Archiducs", "postnumber": "23", "id_caclr_building": "571"}, "matching street": "Avenue des Archiducs", "northing": 75110.6796875}], "success": true}
en/api/rest.txt · Last modified: 2018/07/06 11:24 by Jeff Konnen
CC Attribution-Share Alike 3.0 Unported
www.chimeric.de Valid CSS Driven by DokuWiki do yourself a favour and use a real browser - get firefox!! Recent changes RSS feed Valid XHTML 1.0