Export to GitHub

openaddresses - RESTService.wiki


Introduction

Describe the REST services associated to the addresses. These services are provided by the MapFish development framework used in OpenAddresses.

Model Fields

  • HOUSENUMBER: House number
  • CREATED_BY: Creator
  • HOUSENAME: House name
  • STREET: Street
  • POSTCODE: Postal code
  • REGION: Region
  • CITY: City
  • COUNTRY: country code ('CH','FR','AT' etc..)
  • QUALITY: ('Digitized','Donated','GPS','Linear interpolation')

Services description

Based on MapFish documentation

KVP parameters

  • no_geom=true: so that the returned feature has no geometry ("geometry": null)
  • attrs={field1}[,{field2},...]: to restrict the list of properties returned in the feature
  • limit={num}: limit the number of features to num features
  • offset={num}: skip num features
  • order_by={field}: order the features using field
  • dir=DESC|ASC: determine the ordering direction (applies only if order_by is specified)
  • lon={x}: the x coordinate of the center of the search region, this coord's projection system can be specified with the epsg parameter
  • lat={y}: the y coordinate of the center of the search region, this coord's projection system can be specified with the epsg parameter
  • tolerance={num}: the tolerance around the center of the search region, expressed in the units of the lon/lat coords' projection system
  • box={xmin,ymin,xmax,ymax}: a list of coordinates representing a bounding box, the coords' projection system can be specified with the epsg parameter
  • epsg={num}: the EPSG code of the lon, lat or box values
  • queryable={field1}[,{field2},...]}: the names of the feature fields that can be queried
  • {field}{query_op}={value}: specify a filter expression, field must be in the list of fields specified by queryable, supported query_op's are:
    • eq: equal to
    • ne: not equal to
    • lt: lower than
    • le: lower than or equal to
    • gt: greater than
    • ge: greater than or equal to
    • like
    • ilike
  • query={query term}: string to search for Use a full text search. To be used with attrs key.
  • callback={callback name}: name of callback function
  • id={id}: the id of the address
  • city={city}: the city of the address
  • osmid={osmid}: the osmid of the address
  • quality={quality}: the quality of the address. Possible values here.
  • housenumber={housenumer}: the house number of the address
  • region={region}: the region of the address
  • created_by={created_by}: the creator of the address
  • street={street}: the street of the address
  • postcode={postcode}: the postal code of the address
  • country={country}: the country of the address Possible values here.
  • housename={housename}: the house name of the address
Response
  • Output formats:
    • Per default: GeoJSON data are sent back.
    • CSV
    • ZIP containing a CSV file
Hints
  • Use street or street,city,housnumber as attrs. Database is optimized for these fields.
  • Try to always add a spatial filter for maximum performance

GeoCoding Service

Examples

Reverse GeoCoding Service

Examples MapFish Reverse GeoCoding Service

Count

Examples

Download

The MapFish protocoll and its KVP can be used to create the query. CSV or ZIP containing a csv file can be downloaded.

Examples