GET /addresses/{address}
Este endpoint retorna el punto y poligonos de la dirección consultada
address: dirección, comuna (String)
Status 200
Content-type application/json
{
"response": {
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [
-70.739869,
-34.1657158
]
},
"properties": {
"display_name": "Calle del Estado, Población Urmeneta, Rancagua Sur, Rancagua, Provincia de Cachapoal, Región del Libertador General Bernardo O'Higgins, 2852046, Chile"
}
}
}
GET /polygons
Este endpoint retorna todos poligonos
Status 200
Content-type application/json
{
"response": {
"type": "FeatureCollection",
"features": [
{
...
}
]
}
}
GET /polygons/zone/{zone}
Este endpoint retorna todos poligonos de una zona consultada
zone: zona (String)
Status 200
Content-type application/json
{
"response": {
"type": "FeatureCollection",
"features": [
{
...
}
]
}
}
GET /polygons/loc/{location}
Este endpoint retorna un poligono de una zona consultada la longitud y latitud
location: lon,lat (String)
Status 200
Content-type application/json
{
"response": {
"_id": "5bf5dd47bf6c1f034a8699b7",
"type": "Feature",
"properties": {
"ZONA_PRC": "AV-PU",
"AREA": 3444,
"LENGHT": 706,
"DESCRIP": "AREA VERDE PUBLICA"
},
"geometry": {
"type": "MultiPolygon",
"coordinates": [
...
]
}
}
}
Status 500
Content-type application/json
{
"response": "error connecting to db"
}
{
"response": "error in db"
}
{
"response": "error connecting to geocodification service ..."
}
Status 404
Content-type application/json
{
"response": "address not found"
}