Perceel in bbox

Hello pdok developers;
I hope you doing well.
I can get information of a single parcel at a time using this link https://brk.basisregistraties.overheid.nl/api/v1/percelen?kadastraleGemeentecode=‘kadastralegemeentecode’&sectie='section of parcel '&perceelnummer=‘number of the parcel’
But how can i retrieve parcels per bbox(per visible area)? if that would be possible.
And what measurement would be the bbox values ,is it in latitude and longitude or xy coordinates.
I can implement this for the verblijfsobjecten and panden from bag per bbox with out any problem but i can not for the kadastraal perceel
I have searched and read some questions and answers about the kadastraal perceel in bbox in this forum but none of them could work for me.
Please I kindly request help from you about this. Thanks in advance.

What kind of service would you like to use to retrieve the percelen? WFS, WMS, Rest API?

And which BAG service are you already using to retrieve panden and verblijfsobjecten with a bbox?

I already used below code with bbox and I want to use the same way to kadasterale perceel.

//to get verblijfObjects  per visible screen(bbox)  at zoom level of 17
function getVeblijfsObjects(){
var typename='bag:verblijfsobject'
 var url='https://geodata.nationaalgeoregister.nl/bag/wfs/v1_1? 
 SERVICE=WFS&version=1.1.0&request=GetFeature&typeName='+typename+'&outputFormat=application/json&srsName=EPSG:4326&bbox='+lonlat1[1]+','+lonlat1[0]+','+lonlat2[1]+','+lonlat2[0]+',EPSG:4326'
    axios.get(url)
    .then(function(response){
      console.log(response.data)
   })
}
//to get panden per visible screen(bbox)  at zoom level of 17
function getPanden(){
var typename='bag:pand'
var url='https://geodata.nationaalgeoregister.nl/bag/wfs/v1_1?SERVICE=WFS&version=1.1.0&request=GetFeature&typeName='+typename+'&outputFormat=application/json&srsName=EPSG:4326&bbox='+lonlat1[1]+','+lonlat1[0]+','+lonlat2[1]+','+lonlat2[0]+',EPSG:4326'
    axios.get(url)
    .then(function(response){
      console.log(response.data)
    })
}

The above code is the code that I have used to get verblijfsobjecten and panden in bbox ,feel free to correct me if this is not the best way to implement such tasks.
I used javascript and framework openlayers for our website.

Hi @Gide,

This is a commonly asked question here: Zoekresultaten voor 'bbox' - Geoforum
I do have to admite, most topics will be in Dutch, but the ‘examples’ regarding code/requests are most of the time in the specific specification (like OGC for example)

So the request you want to generate with your code will be something like this
https://geodata.nationaalgeoregister.nl/kadastralekaart/wfs/v4_0?service=WFS&request=GetFeature&version=2.0.0&typename=perceel&srsname=EPSG:4326&bbox=52.090553,5.116027,52.092561,5.120377,EPSG:4326

So I pressume that you going to need to change at least:

  1. the URL: https://geodata.nationaalgeoregister.nl/kadastralekaart/wfs/v4_0?
  2. and the typename: perceel

Hi wouter.visscher
Thanks for the quick reply. I have tried based on your reply and I have got xml response but I used json data because I am developing a website which is javascript. So my script only understand json response(data format :application/json).
Here is my new url based your reply

var url='https://geodata.nationaalgeoregister.nl/kadastralekaart/wfs/v4_0?service=WFS&request=GetFeature&version=2.0.0&typename='+typename+'&OUTPUTFORMAT=application/json&srsname=EPSG:4326&bbox='+lonlat1[1]+','+lonlat1[0]+','+lonlat2[1]+','+lonlat2[0]
from the above url i have got 
{type: "FeatureCollection", name: "perceel", crs: {…}, features: Array(0)}
crs:
properties: {name: "urn:ogc:def:crs:OGC:1.3:CRS84"}
type: "name"
__proto__: Object
features: []
name: "perceel"
type: "FeatureCollection"
__proto__: Object

As you see above the features:[] is empty.
But if i get rid of the “OUTPUTFORMAT=application/json” from the url ;which is like below

var url='https://geodata.nationaalgeoregister.nl/kadastralekaart/wfs/v4_0?service=WFS&request=GetFeature&version=2.0.0&typename='+typename+'&srsname=EPSG:4326&bbox='+lonlat1[1]+','+lonlat1[0]+','+lonlat2[1]+','+lonlat2[0]

then i have got this below as response

 <?xml version='1.0' encoding="UTF-8" ?>
<wfs:FeatureCollection
   xmlns:kadastralekaartv4="http://kadastralekaartv4.geonovum.nl"
   xmlns:gml="http://www.opengis.net/gml/3.2"
   xmlns:wfs="http://www.opengis.net/wfs/2.0"
   xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
   xsi:schemaLocation="http://kadastralekaartv4.geonovum.nl https://geodata.nationaalgeoregister.nl/kadastralekaart/wfs/v4_0?SERVICE=WFS&amp;SERVICE=WFS&amp;VERSION=2.0.0&amp;REQUEST=DescribeFeatureType&amp;TYPENAME=perceel&amp;OUTPUTFORMAT=application%2Fgml%2Bxml%3B%20version%3D3.2 http://www.opengis.net/wfs/2.0 http://schemas.opengis.net/wfs/2.0/wfs.xsd http://www.opengis.net/gml/3.2 http://schemas.opengis.net/gml/3.2.1/gml.xsd"
   timeStamp="2020-08-01T13:17:57" numberMatched="unknown" numberReturned="0">
</wfs:FeatureCollection>

which means I don’t understand xml neither my script.

So my question is ,how can i get json response?

Adding the parameter outputformat=application/json in the request KVP sould be enough

https://geodata.nationaalgeoregister.nl/kadastralekaart/wfs/v4_0?service=WFS&request=GetFeature&version=2.0.0&typename=perceel&srsname=EPSG:4326&bbox=52.090553,5.116027,52.092561,5.120377,EPSG:4326&outputformat=application/json

But that the response is empty is possible, depending on the bbox that you are sending… (and other factors)

It would be helpful if you could post the request string that is actually send, instead of the (partial) code that is used for generating the request string.

Yes, It is working well now, I really appreciate your help guys. Thanks so much

2 likes