Code Monkey home page Code Monkey logo

dom's Introduction

DOM API

Endpoint

GET /addresses/{address}

Función

Este endpoint retorna el punto y poligonos de la dirección consultada

Parameters

address: dirección, comuna (String)

Respuestas

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"
        }
    }
}

Endpoint

GET /polygons

Función

Este endpoint retorna todos poligonos

Parameters

Respuestas

Status 200

Content-type application/json

{
    "response": {
        "type": "FeatureCollection",
        "features": [
            {
                ...
            }
        ]
    }
}

Endpoint

GET /polygons/zone/{zone}

Función

Este endpoint retorna todos poligonos de una zona consultada

Parameters

zone: zona (String)

Respuestas

Status 200

Content-type application/json

{
    "response": {
        "type": "FeatureCollection",
        "features": [
            {
                ...
            }
        ]
    }
}

Endpoint

GET /polygons/loc/{location}

Función

Este endpoint retorna un poligono de una zona consultada la longitud y latitud

Parameters

location: lon,lat (String)

Respuestas

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": [
                ...
            ]
        }
    }
}

Respuestas genericas

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"
}

dom's People

Contributors

alemelomeza avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.