Geozoekdiensten: what's here?
As promised in Where is our heritage located?, here's more detail on our Geozoekdiensten ("geo search services"). Today this is a single webservice built to answer exactly one question: what's located in this area? You send it a geometry, and it answers with the heritage that lies wholly or partly within it, as a simple JSON structure with an id, a uri, a type and the full geometrie for each object.
An example is worth a thousand words. Say we want all heritage within a hundred metres of a point in Flanders:
$ curl -X GET --header 'Accept: application/json' 'https://geo.onroerenderfgoed.be/zoekdiensten/afbakeningen?categorie=aanduidingsobjecten&geometrie=%7B%22type%22%3A%20%22Point%22%2C%20%22coordinates%22%3A%20%5B4.7676665601685%2C50.985228897907%5D%7D&buffer=100'
That returns a list of results, each a JSON object with the attributes id, uri, categorie, type, naam and geometrie. naam is a short description. The id uniquely identifies the object within its source dataset; the uri is guaranteed unique across all datasets — a global identifier that's really just a link to more information. Request https://inventaris.onroerenderfgoed.be/erfgoedobjecten/134454 in a browser, for instance, and you land on a page about that object in the Inventaris Onroerend Erfgoed. Prefer the raw JSON? Send an Accept: application/json header:
$ curl -L -X GET --header 'Accept: application/json' 'https://id.erfgoed.net/erfgoedobjecten/134454'
In this example we've found a heritage object from the scientific inventory of gardens and parks — you can tell from the type attribute, an object with a uri and a label. That uri points to a term in a thesaurus of inventaristypes or aanduidingstypes; follow it for more detail, such as the fact this inventory is sometimes internally called ile_park.
The geometry itself comes back as GeoJSON, and since it can get large and isn't always needed, you can tell the service to leave it out:
$ curl -X GET https://geo.onroerenderfgoed.be/zoekdiensten/afbakeningen?&buffer=100&geef_geometrie=0
By default the service searches across all kinds of objects, but you can filter with the categorie parameter:
- Erfgoedobjecten ("heritage objects"): the content-focused objects that make up our heritage — the
scientific inventories. - Aanduidingsobjecten ("designation objects"): the legal anchoring of heritage objects, both
protectedandlisted(which you can tell from the type's URI), includingheritage landscapesandUnesco coreandbuffer zones. - Plannen ("plans"): currently just
management plans, to be extended later withheritage master plans.
To see only designated objects, for example:
$ curl -X GET https://geo.onroerenderfgoed.be/zoekdiensten/afbakeningen?&buffer=100&geef_geometrie=0&categorie=aanduidingsobjecten
For simple questions like "give me all heritage around a point," the above works fine. You're not limited to points either — (multi-)polygons and lines work too, though embedding a full GeoJSON geometry in the URL gets unwieldy fast. That's why the service also supports a POST request, letting you put the query in the request body instead.
The service is freely accessible and reuse is encouraged. For a quick overview of what it can do, we recommend the live API docs at https://geo.onroerenderfgoed.be/zoekdiensten/api_doc.
We hope this fairly simple webservice proves as useful to you as it is to us. Comments, questions or further needs are always welcome at ict@onroerenderfgoed.be.