Geometry

We recommend that you run your own postgis service if you are planning on doing more that the basic GIS (geographic information system) activities. If you need guidance or an introduction into the world of GIS then please contact us. we are glad to help you. For smaller usages of GIS we have made a couple of endpoints available for use. These endpoints can be used in combination with Maps API and Date API.

Whats geometry

Any point, line of shape on the map is geometry. Our viewer works with tiles (images made up from geometries) or vectors (raw geometric information) No matter how the viewer is build up, it’s always based on geometries.

With our Data API you can use geometries to gather information about anything that is within the geometry. With the Maps API you can create vector layers using your own geometries or those you get from the Data API.

The geometry notation mostly used in our API’s is Extended Well-Known text (EWKT). Some endpoints support other formats like GeoJson. If they do it will be mentioned in the description of those endpoints. If your geometries are stored in another format you will need to convert it for use of most endpoints.

Area

POST /maps_api/v2/server/gis/area

With GIS it is possible to generate a very accurate surface area in m2. Use this endpoint to calculate the surface area of your own geometries or geometries from the Data API.

Example JSON requests:

POST /maps_api/v2/server/gis/area HTTP/1.1
Host: planviewer.nl
Accept: application/json
Content-Type: application/json

{
        "geometry": "POLYGON ((190259.106 444171.8126, 189849.186 443089.8926, 191293.986 442874.8526, 191475.426 443741.7326, 190259.106 444171.8126))"
}

Example response:

{
    "area":"1391872.20480001"
}

The example above gives us an area surface calculation to the 8th digit after the decimal.

Buffer

POST /maps_api/v2/server/gis/buffer

When using geometry in combination with Data API to gather information it is important that you get the correct information. For example when using a perceel geometry to get information about the perceel you won’t want this the surrounding percelen to be included. With GIS you can contract or expand a geometry. Is can be used to get a clean Data API result or it can be used to gather information in the surroundings of the geometry.

Use a positive number (float) to expand and a negative number (float) to contract the geometry

Example JSON requests:

POST /maps_api/v2/server/gis/buffer HTTP/1.1
Host: planviewer.nl
Accept: application/json
Content-Type: application/json

{
    "geometry": "POLYGON ((190259.106 444171.8126, 189849.186 443089.8926, 191293.986 442874.8526, 191475.426 443741.7326, 190259.106 444171.8126))",
    "buffer": -0.0000001
}

Example response:

{
    "geometry": "SRID=28992;POLYGON((190259.106 444171.8126,191475.426 443741.7326,191293.986 442874.8526,189849.186 443089.8926,190259.106 444171.8126))"
}

The newly returned geometry can be directly used in our Maps API and Data API.

intersection

POST /maps_api/v2/server/gis/intersection

Compares two geometries and returns the geometry of where they overlap.

Example JSON requests:

POST /maps_api/v2/server/gis/intersection HTTP/1.1
Host: planviewer.nl
Accept: application/json
Content-Type: application/json

{
    "geom1":"SRID=28992;POLYGON((120562.54 491547.24,120582.24 491572.46,120544.193 491602.177,120544.15 491602.21,120506.06 491631.97,120486.36 491606.75,120524.45 491577,120562.54 491547.24))",
    "geom2":"SRID=28992;POLYGON((120575.933 491564.609 0,120582.065 491572.51 0,120506.059 491631.877 0,120499.919 491623.984 0,120575.933 491564.609 0))"
    }

Example response:

{
    "geometry": "SRID=28992;POLYGON((120575.933 491564.609 0,120499.919 491623.984 0,120506.059 491631.877 0,120582.065 491572.51 0,120575.933 491564.609 0))"
}

The newly returned geometry can be directly used in our Maps API and Data API.