Data Api ======== Our Data Api can work as a stand-alone api but works seamlessly with our Maps Api service as a visual interface. The Data Api is made up of 3 distinct types of call. 1. Geocoding Geocoding is the process of converting addresses (like "Utrechsestraat 61 6811 LW Arnhem") into geographic coordinates (like X,Y coordinates in Amersfoort / RD / Rijksdriehoekscoördinaten ), which you can use to place markers on a map or find information in our Api. 2. Data Collection The majority of the data is available in "Data Collection" calls. Using one identifier to retrieve the associated data 3. Specialized calls Endpoints specifically build te deliver valuable data. Basic Information Calls ----------------------- This data is used to unlock the full potential of the Data Api. Using readily available information like an address. There are 2 basic calls: /maps_api/v2/server/data/getgeometrybyaddress /maps_api/v2/server/data/getgeometrybyperceel Get geometry of an address -------------------------- .. http:post:: /maps_api/v2/server/data/getgeometrybyaddress Get geometry of an address postcode and huisnummer are required **Example request:** .. sourcecode:: http POST /maps_api/v2/server/data/getgeometrybyaddress HTTP/1.1 Host: planviewer.nl Accept: application/json Content-Type: application/json { "postcode" : "6811LW", "huisnummer" : 61 } **Example response:** .. sourcecode:: json { "geometry" : "SRID=28992;POINT(190011.062 444053.666)" } Get geometry of a perceel -------------------------- .. http:post:: /maps_api/v2/server/data/getgeometrybyperceel Get geometry of a perceel **Example request:** .. sourcecode:: http POST /maps_api/v2/server/data/getgeometrybyperceel HTTP/1.1 Host: planviewer.nl Accept: application/json Content-Type: application/json { "kadastrale_gemeente" : "ARNHEM", "sectie" : "P", "perceelnummer" : "530" } **Example response:** .. sourcecode:: json { "geometry" : "SRID=28992;POLYGON((190007.342 444029.188,190026.359 444019.629,190031.504 444034.069,190035.439 444046.094,190030.937 444047.715,190017.2 444052.877,190017.091 444052.926,190007.635 444029.962,190007.342 444029.188))" } Data Collection calls --------------------- Planviewer has unlocked it's data vaults with the Data Api. A huge amount of data is now accessible but more data will become available in the future. In order to use the Data Collection calls you should first take a look at the available calls. An overview of all available calls can be found on our `Data collection List `_ page. The data api relies on gathering the information by identifier. The identifier is a string, an integer, a ewkt geometry of a -- seperated string of string values. Within the list the identifier method is listed. * string * integer * geom * combined Within the description it is stated what the identifier should contain. The combined identifier is used when multiple fields need to be combined to return a useful result. For example an address consist of multiple parts such as zipcode, house number and an optional house letter. When asked to provide an combined identifier there should be a description stating how the identifier should be formated. For this example it would look something like this: 6811LW,61, .. note:: note that this string ends in ,. For this address there is no house letter. As the data-api tries to answer complex questions and relies heavily on identifying data being fetched in order to do additional data api fetches. We understand that finding your way through all the possibilities in a efficient way can be challenging. Planviewer is there to offer support when you need it. Error messages -------------- Several errors can be gotten when using the fetch api calls. in order to help you solve the issues the errors are described with the most common solutions for the issues. * Constructed query encountered an issue There is an issue with resolving the data based on given identifier. This error either means that the identifier used does not matched the requirements or there is some configuration issue with the endpoint. If the issue persist then please contact Planviewer for support * Identifier parameters do not equal required paramaters Most likely caused by a combined identifier. Either the given combined identifier consist of too few or too many variables seperated by a comma (,). if one of the variables has a comma (,) try encoding is to solve the issue. * No valid query could be formed Generally this error will occur when an empty identifier is given List ---- .. http:get:: /maps_api/v2/server/data/list Get a list of available Data Collection calls and the identifier needed to access the data **Example request:** .. sourcecode:: http GET /maps_api/v2/server/data/list HTTP/1.1 Host: planviewer.nl Accept: application/json **Example response:** .. sourcecode:: json [ { "endpoint": "gemeentebyid", "identifier method": "id", "description": "gemeentecode op basis van ID" }, { "endpoint": "pandidbygeometry", "identifier method": "geom", "description": "verkrijg het 'pandId' op basis van geometry.\r\nKan meerdere resultaten geven" } { ... } ] Data Collection --------------- Every "Data Collection" call is structured the same, making is very easy to implement and use in combination with the list. All you need to use a Data Collection call is: 1. The endpoint 2. The identifier .. note:: It is possible to gain a specific identifier for a Data Collection call from another call. Using the calls to daisy-chain the data to create increasing complex queries. Example Data Collection call ------------------ .. http:POST:: /maps_api/v2/server/data/fetch/getperceelgeometrybygeometry Get our identifier to get access to all the building information. **Example request:** .. sourcecode:: http POST /maps_api/v2/server/data/fetch/getperceelgeometrybygeometry HTTP/1.1 Host: planviewer.nl Accept: application/json Content-Type: application/json { "identifier":"POINT (192890 438931)" } **Example response:** .. sourcecode:: json [ { "geometry": "SRID=28992;POLYGON((192885.105 438916.692,192891.099 438926.675,192903.23 438946.449,192896.466 438953.593,192891.333 438946.903,192883.136 438936.473,192881.52 438934.369,192875.74 438926.908,192873.612 438924.04,192879.578 438920.125,192885.105 438916.692))", "disappeared": "2020-02-26", "vervallen": null } ] Specialized calls ----------------- Some data is not available through the Data Collection calls and have specialized endpoints. This data is mostly generated from highly computed processes. .. http:post:: /maps_api/v2/server/data/pointcloud/building/elevation Get the elevation of a building based on an address. **Example request:** .. sourcecode:: http POST /maps_api/v2/server/data/pointcloud/building/elevation HTTP/1.1 Host: planviewer.nl Accept: application/json Content-Type: application/json { "postcode" : "6811LW", "huisnummer" : 61 } **Example response:** .. sourcecode:: json { "elevation": 24.528224999999999 } .. note:: if the address contains a huisnummertoevoeging and/or a huisletter you can add them to the request .. http:post:: /maps_api/v2/server/data/pointcloud/building/volume Get the volume of a building based on an address. **Example request:** .. sourcecode:: http POST /maps_api/v2/server/data/pointcloud/building/volume HTTP/1.1 Host: planviewer.nl Accept: application/json Content-Type: application/json { "postcode" : "6811LW", "huisnummer" : 61 } **Example response:** .. sourcecode:: json { "volume": 2720.140625 } .. note:: if the address contains a huisnummertoevoeging and/or a huisletter you can add them to the request .. http:post:: /maps_api/v2/server/data/pointcloud/building/surface Get the surface of a building based on an address. **Example request:** .. sourcecode:: http POST /maps_api/v2/server/data/pointcloud/building/surface HTTP/1.1 Host: planviewer.nl Accept: application/json Content-Type: application/json { "postcode" : "6811LW", "huisnummer" : 61 } **Example response:** .. sourcecode:: json { "surface": 157.710938 } .. note:: if the address contains a huisnummertoevoeging and/or a huisletter you can add them to the request .. http:post:: /maps_api/v2/server/data/pointcloud/building/highestpoint Get the highest point of a building based on an address. **Example request:** .. sourcecode:: http POST /maps_api/v2/server/data/pointcloud/building/highestpoint HTTP/1.1 Host: planviewer.nl Accept: application/json Content-Type: application/json { "postcode" : "6811LW", "huisnummer" : 61 } **Example response:** .. sourcecode:: json { "highestpoint": 19.046275999999999 } .. note:: if the address contains a huisnummertoevoeging and/or a huisletter you can add them to the request