You are here: Wiki>Projects Web>GeodataRestApi (14 Aug 2016, niklastrzaska)Edit Attach

Geodata Rest API



About

The Geodata Rest API serves as a proxy for OGC Web- and Featureservices, which enables a REST-like interaction with the service. The goal is to provide an easy to use interface for accessing geodata.

Currently the GeoServer is supported.

Endpoints

Offered services

Method Path Content-Type Description
GET /services application/json Returns a list of offered services

Example request

GET /services HTTP/1.1
Host: localhost:8001
Accept: application/json

Example response

[
    {
        "id": "service1",
        "label": "name of the service",
        "description": "Returns sample data via a WM-Service",
        "href": "http://localhost:8001/services/service1"
    }
]

The returned values are defined in the file services/services.json

Service capabilities

Returns the capabilities to the specified service
Method Path Content-Type Description
GET services/:id application/json Returns a list of offered services

Example request

GET /services/service1 HTTP/1.1
Host: localhost:8001
Accept: application/json

Example response

{
    "id": "service1",
    "label": "name of the service",
    "description": "Returns sample data via a WM-Service",
    "capabilities": [
        "http://localhost:8001/services/service1/maps",
        "http://localhost:8001/services/service1/features"
    ]
}

Service maps

Returns an overview of the offered layers and their global extent.
Method Path Content-Type Description
GET services/:id/maps application/json Returns a list of offered services

Example request

GET /services/service1/maps HTTP/1.1
Host: localhost:8001
Accept: application/json

Example response

{
"layers": [
{
"layer1": "http://localhost:8001/services/service1/maps/layer1/render",
"layer2": "http://localhost:8001/services/service1/maps/layer2/render"
}
],
"crs": [
{
"TYPE_NAME": "WMS_1_3_0.BoundingBox",
"crs": "CRS:84",
"minx": 13.175925096825951,
"miny": 50.6931182592888,
"maxx": 14.428531545338213,
"maxy": 51.25344896064335
}
]
}

Global view

Service maps global rendering

Returns all layer in the default format, which is defined in services.json
Method Path Content-Type Description
GET services/:id/maps/render image/png Returns a list of offered services

Example request

GET /services/service1/maps/render HTTP/1.1
Host: localhost:8001
Accept: image/png

Example response

http://localhost:8001/services/service1/maps/render

Service maps layer rendering

Returns the specified layer in the default format, which is defined in services.json. Using a comma separated list of layers, multiple layers can be requested. The order of rendering is analogous to the order in the list of layers.
Method Path Content-Type Description
GET services/:id/maps/:layer1/render image/png Returns a list of offered services

Example request

GET /services/service1/maps/layer1/render HTTP/1.1
Host: localhost:8001
Accept: image/png

Example response

http://localhost:8001/services/service1/maps/COLABIS_REST_TEST:DEU_adm0/render

Example request

GET /services/service1/maps/layer1,layer2/render HTTP/1.1
Host: localhost:8001
Accept: image/png

Example response

http://localhost:8001/services/service1/maps/COLABIS_REST_TEST:DEU_adm0,COLABIS_REST_TEST:de009l_dresden/render

Queries

Queries are possible for the endpoints
  • services/:id/maps/render
  • services/:id/maps/:layer1/render
Parameter Example Supported values Description
minx minx=5.8662505149842445 numeric Puts the minimal x value
miny miny=47.27012252807623 numeric Puts the minimal y value
maxx maxx=15.041815757751444 numeric Puts the maximal x value
maxy maxy=55.05652618408206 numeric Puts the maximal y value
width width=500 Integer > 0 Number of pixel for the width
height height=500 Integer > 0 Number of pixel for the height
format format=image/png Depending on the service Puts the format of the answer
crs crs=EPSG:4326

EPSG:4326

EPSG:4269

EPSG:5243

EPSG:4839

EPSG:3068

May be restricted by the service.

Puts the crs for the answer
Topic revision: r5 - 14 Aug 2016, niklastrzaska
Legal Notice | Privacy Statement


This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Wiki? Send feedback