3

I need to get some data from via a WFS connection but due to the sheer size of the data, it takes for ever to load into Qgis or MapInfo.

MapInfo has a feature which allows you to restrict the wfs request to 'current mapper' and only get the data the are visible in the current window.

I know, that I am supposed to be able to define the Bounding box withing the WFS-url, but I can't get that working.

Is there anyone out there that knows how to do that?

I hope I made myself clear :)

  • First: which MapInfo version you are using ? Second: which WFS version ? MapInfo support WFS 1.1.0 from v11.5.2 – sys49152 Feb 5 '14 at 9:40
2

For WFS requests with BBOX you need minimum MapInfo v11.5.2 and your WFS service needs to be v1.1.0

  1. Open new mapper window and zoom in area of interest (this would be approx. bbox coordinates)
  2. Open Web Service/Open WFS...
  3. Choose your server
  4. Now you're in Open WFS Table window. Choose a table.
  5. Click on Row Filter... in Data Filters section of that window
  6. Now you're in Row Picker window. Choose your column that represent geometry objects (SP_GEOMETRY for example). After that you will get a list of operators and choose ogc:BBOX. Value will be CURRENT_MAPPER which is what we want , OK ? If you have selected some polygon feature in a first step, you will also have SELECTION as a value (then BBOX is calculated from selected polygon).

enter image description here

After this all you need is to do few OK's and that is it.

Also please note that WFS service could be limited (for example: maximum number of features returned is 500).

  • Should work with WFS 1.0 as well – Peter Horsbøll Møller Feb 5 '14 at 13:42
  • I know of this option in MapInfo and use it frequently, but I want to use Qgis and as far as I know, this option doesn't exist in Qgis. Am I not able to define the bounding box within the wfs-url? – Daníel Örn Feb 6 '14 at 11:29
  • Sorry, it sounded that you know that is possible in MapInfo but you dont know how to do it. – sys49152 Feb 6 '14 at 12:02
1

There is a very nice discussion which helped me on this issue (WFS and Bounding Box).

Defining bounding box within Add WFS Layer dialog of QGIS?

I quote from the other thread:

I started downloading the WFS content via the Add WFS Layer dialog and canceled the action. QGIS will add the layer anyway, with zero objects. In the properties menu for this layer I copied the getFeature address line, added the above mentioned &BBOX=.... extension, and went back to the Add WFS Layer menu. There I created a new WFS source and pasted the extended GetFeature command instead of the GetProperties address, hit the Add button and ... done.

Basically what he has done is do the usual:

  • add WFS service layer
  • cancel it on the run
  • look to the properties of the newly created layer
  • copy in the metadata TAB "Source of this layer" that huge link

In my case it looks like this:

GOVERMENTAL SITE HERE.tr/arcgis/services/TKG_KADASTRO/MapServer/WFSServer?VERSION=1.0.0&TYPENAME=TKG_KADASTRO:Parseller&SRSNAME=EPSG:3857&BBOX=3577366.30409,4712018.4004,3583224.9361,4707386.70703&SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=TKG_KADASTRO:Adalar&SRSNAME=EPSG:3857  

Add a bounding box extension to the end of the link like:

&BBOX=3577366.30409,4712018.4004,3583224.9361,4707386.70703

Hint: You can get the bounding box coordinates directly from Raster>Extraction>Clipper but be sure to add the commas in between.

In the end Add a NEW WFS layer with the bounding box extension and address combined.

GOVERMENTAL SITE NAME HERE.tr/arcgis/services/TKG_KADASTRO/MapServer/WFSServer?SERVICE=WFS&VERSION=1.0.0&REQUEST=GetFeature&TYPENAME=TKG_KADASTRO:Parseller&SRSNAME=EPSG:3857&BBOX=3577366.30409,4712018.4004,3583224.9361,4707386.70703

You should be just getting that portion of the map. I find it helpful to save it to a different shapefile afterwards.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.