1

Re: GridMap BoundingBox

Hi

I'm struggling to use BoundingBox in a GridMap query.  Can someone help?

Thanks
Mark

Exception thrown by GridMapQuery.processGeographicalFitler().  Shape not defined in <GeographicalFilter> node.

Request
POST /ws/webservice HTTP/1.0
Host: www.nbnws.net
User-Agent: NuSOAP/0.9.5 (1.123)
Content-Type: text/xml; charset=ISO-8859-1
SOAPAction: "http://webservices.searchnbn.net/service/GetGridMap"
Content-Length: 1305

<?xml version="1.0" encoding="ISO-8859-1"?><SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/" xmlns:nbnq="http://webservices.searchnbn.net/query"><SOAP-ENV:Body><GridMapRequest
xmlns="http://webservices.searchnbn.net/query"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<TaxonVersionKey>NHMSYS0000309499</TaxonVersionKey>
<Resolution>_2km</Resolution>
<GridMapSettings>
  <Width>500</Width>
  <Height>500</Height>
  <Grid>Grid_10km</Grid>
  <Background>OSMap</Background>
  <Region>GB</Region>
  <GeographicalFilter>
   <BoundingBox
    srs="EPSG_27700"
    maxx="520700.0"
    maxy="281300.0"
    minx="519700.0"
    miny="279800.0" />
  </GeographicalFilter>
</GridMapSettings>
<Classification>
  <Band border="#FF0000" fill="#FF0000" from="1900" to="1970" />
  <Band border="#00FF00" fill="#00FF00" from="1971" to="1995" />
  <Band border="#0000FF" fill="#0000FF" from="1996" to="2006" />
</Classification>
<DatasetList>
  <DatasetKey>GA000144</DatasetKey>
</DatasetList>
</GridMapRequest></SOAP-ENV:Body></SOAP-ENV:Envelope>

2

Re: GridMap BoundingBox

Hi

I have used ASP.NET and Visual Basic for calling web services which I have found very easy. It takes care of building the Soap request to such an extent that it took me a while to capture an example. Here is a request that works for me. Hope it helps you. Jim

<?xml version="1.0" encoding="utf-8"?>
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
  <soap:Body>
    <GridMapRequest xmlns="http://webservices.searchnbn.net/query">
      <TaxonVersionKey>NHMSYS0000875109</TaxonVersionKey>
      <Resolution>_10km</Resolution>
      <GridMapSettings>
        <Background>ViceCounty</Background>
        <GeographicalFilter>
          <BoundingBox minx="110000" miny="525000" maxx="420000" maxy="980000" xmlns="http://webservices.searchnbn.net/data" />
        </GeographicalFilter>
      </GridMapSettings>
    </GridMapRequest>
  </soap:Body>
</soap:Envelope>

3

Re: GridMap BoundingBox

That's great Jim.  Thanks very much.

One step forward at least...!

Mark

4

Re: GridMap BoundingBox

Hi Mark,

don't know if you know about this great tool, we use it to test web service calls and much more - we use the free open source version: http://www.soapui.org/

I've spotted your problem.  The schema (http://webservices.searchnbn.net/data) for the BoundingBox definition is missing from your Envelope.  The working request is below.  I've added a reference to the missing schema in the Envelope.  And added its namespace to the BoundingBox tag: '<data:BoundingBox srs=...'.  I hope this helps.

Cheers, Jon

Here's the working request:

<?xml version="1.0" encoding="iso-8859-1"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
xmlns:nbnq="http://webservices.searchnbn.net/query"
xmlns:data="http://webservices.searchnbn.net/data">
  <SOAP-ENV:Body>
    <GridMapRequest xmlns="http://webservices.searchnbn.net/query" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
      <TaxonVersionKey>NHMSYS0000309499</TaxonVersionKey>
      <Resolution>_2km</Resolution>
      <GridMapSettings>
        <Width>500</Width>
        <Height>500</Height>
        <Grid>Grid_10km</Grid>
        <Background>OSMap</Background>
        <Region>GB</Region>
        <GeographicalFilter>
          <data:BoundingBox srs="EPSG_27700" maxx="520700.0" maxy="281300.0" minx="519700.0" miny="279800.0" />
        </GeographicalFilter>
      </GridMapSettings>
      <Classification>
        <Band border="#FF0000" fill="#FF0000" from="1900"
        to="1970" />
        <Band border="#00FF00" fill="#00FF00" from="1971"
        to="1995" />
        <Band border="#0000FF" fill="#0000FF" from="1996"
        to="2006" />
      </Classification>
      <DatasetList>
        <DatasetKey>GA000144</DatasetKey>
      </DatasetList>
    </GridMapRequest>
  </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

5 (edited by cubes 02-12-2010 19:36:09)

Re: GridMap BoundingBox

Super.  Thanks very much.

All sorted now on
http://eastscotland-butterflies.org.uk/ … times.html