How to use WMS in InfraWorks

August 5, 2015 at 9:04 pm Leave a comment

Now that you know how to grab or download an image from a WMS server, and how to create a World File for it, the next step is to create an XML file which can be used as a Raster in InfraWorks.

This XML file will be used as a connection to retrieve an image from a WMS server. As soon as it completes the download of the image from the WMS server it will store this in the InfraWorks (SQLite) model. Now every time you reconfigure this Raster feature in InfraWorks it will reconnect to the WMS server using this XML file.

The XML file is built of a format known as GDAL WMS. The complete format is explained over here. We are going to use the same parameters as we have used in our example in our post How to grab aerial image maps from WMS server.

To read the URL easier and to compare it with the GDAL WMS format the parameters are shown below in several rules.

http://geodata1.nationaalgeoregister.nl/luchtfoto/wms?
version=1.1.1
&request=GetMap
&layers=luchtfoto
&SRS=EPSG%3A28992
&BBOX=208670.623,375465.3687,209670.623,375965.3687
&FORMAT=image%2Fjpeg
&WIDTH=2000
&HEIGHT=1000
&STYLES=

Note that the BBOX coordinates are setup from LowerLeftXY to UpperRightXY.
The above URL translated into a GDAL WMS XML format looks like this:

<GDAL_WMS>
<Service name=”WMS”>
<Version>1.1.1</Version>
<ServerUrl>http://geodata1.nationaalgeoregister.nl/luchtfoto/wms?</ServerUrl>
<SRS>EPSG:28992</SRS>
<ImageFormat>image/png</ImageFormat>
<Layers>luchtfoto</Layers>
<Styles></Styles>
</Service> 
<DataWindow>
<UpperLeftX>
208670.623</UpperLeftX>
<UpperLeftY>375965.3687</UpperLeftY>
<LowerRightX>209670.623</LowerRightX>
<LowerRightY>375465.3687</LowerRightY>
<SizeX>2000</SizeX>
<SizeY>1
000</SizeY>
</DataWindow>
<Projection>EPSG:28992</Projection>
<BandsCount>3</BandsCount>
</GDAL_WMS>

Note that the DataWindow coordinates are setup from UpperLeftXY to LowerRightXY. A common mistake is when the BBOX coordinates are used as the DataWindow coordinates, which will surely result in an error when configuring the XML in InfraWorks. 

Click here to download the wms.xml file.

Now use this XML file as a Raster feature in Infraworks and configure it. The aerial image map will be retrieved from the WMS server right into InfraWorks.

GDAL WMS XML

   Happy Web Map Service! 🙂

Entry filed under: Aerial Images. Tags: , , , .

How to create a World File Managing a customized Style Library in InfraWorks

Leave a comment

Trackback this post  |  Subscribe to the comments via RSS Feed


Recent Posts