geocoders / geocodejson-spec

DRAFT An attempt to have standard geojson responses from geocoders.
37 stars 10 forks source link

Capabilities request spec. #12

Open kiselev-dv opened 9 years ago

kiselev-dv commented 9 years ago

We need a way to return a meta data about geocoder, such as:

Capabilities

For instance, do geocoder have:

"capabilities": {
     "inverse_geocode": {
          // Required
          "endpoint": "mygeocoder.org/inverse/meta"
     },
     "live_search": {
          "endpoint": "mygeocoder.org/live/meta",
          // Minimal length of query, optional.   
          "minimal_length": 2
     }
}

Languages

For instnce, my geocoder have been optimized for russian language. It may be used for any other language, but with ru queries it gains some advantages.

Maybe something like preffered locale in http will fit our needs.

Coverage

For which territories our geocoder is suitable

"coverage": [{ 
        "name":"Russia",
        "internal_id":"12345",
        "country":"ru",
        "geometry": {
              "type": "polygon",
              "last_update": "timestamp",
              "coordinates": [....]
        }
    }, {
       //some other territory    
    }
]
yohanboniface commented 9 years ago

Excellent! I think that is something the Pelias amigos are working on too. @dianashk does that match your work on standardizing the API itself?

kiselev-dv commented 9 years ago

I've forgotten to add that mygeocoder.org/inverse/meta.{json|xml} in that case points to detailed specification of API, with parameters and other API specific info.