1

Topic: Web service API for NBN Atlas now available

The first version of the Web service API for the NBN Atlas is now available. Please find all the required information at the following link on the NBN Atlas

Please send any feedback or queries to Duncan Rowland

Thank you.

2 (edited by Jim Bacon 24-03-2017 15:48:00)

Re: Web service API for NBN Atlas now available

I have been looking at the WMS GetMap service with Duncan. For info, he is working on an additional service to substitute the old EasyMaps. Meanwhile, I have some interesting examples of using WMS GetMap.

1. A basic example

<!DOCTYPE html>
<html>
  <head>
    <link rel="stylesheet" href="https://openlayers.org/en/v4.0.1/css/ol.css" type="text/css">
    <script src="https://openlayers.org/en/v4.0.1/build/ol.js" type="text/javascript"></script>    
  </head>
  <body>
    <div id="map"></div>

    <script type="text/javascript">
      var layers = {};
      layers['nbn'] = new ol.layer.Tile({
        source: new ol.source.TileWMS({
          url: 'https://records-ws.nbnatlas.org/ogc/wms/reflect?q=species:"Martes martes"'
        }),
      });
  
      var map = new ol.Map({
        target: 'map',
        layers: [
          layers['nbn']
        ],
        view: new ol.View({
          center: ol.proj.fromLonLat([-4, 56]),
          zoom: 5
        })
      });      
    </script>

  </body>
</html>

This results in a map with zillions of dots that you can pan and zoom. See https://jsfiddle.net/JimBacon/o4jue0b4/.

Its pretty cluttered and not the kind of grid-based distribution map you might want. However, thanks to some currently undocumented options you can create a grid map.

2. A grid map example

<!DOCTYPE html>
<html>
  <head>
    <link rel="stylesheet" href="https://openlayers.org/en/v4.0.1/css/ol.css" type="text/css">
    <script src="https://openlayers.org/en/v4.0.1/build/ol.js" type="text/javascript"></script>    
  </head>
  <body>
    <div id="map"></div>

    <script type="text/javascript">
      var layers = {};
      layers['nbn'] = new ol.layer.Tile({
        source: new ol.source.TileWMS({
          url: 'https://records-ws.nbnatlas.org/ogc/wms/reflect?q=species:"Martes martes"',
          params: {
            VERSION: '1.1.1',
            ENV: "colourmode:osgrid;color:ffff00;opacity:0.5;gridlabels:true;gridres:singlegrid"
          }
        }),
      });
  
      var map = new ol.Map({
        target: 'map',
        layers: [
          layers['nbn']
        ],
        view: new ol.View({
          center: ol.proj.fromLonLat([-4, 56]),
          zoom: 5
        })
      });      
    </script>

  </body>
</html>

You'll notice that the north-south lines are not parallel and the east-west lines are not straight. This is because the Atlas does not use the Ordnance Survey projection. See https://jsfiddle.net/JimBacon/w5fvmL97/
The reason I have been using OpenLayers as my JavaScript mapping library is because it can do client-side reprojection.

3. A grid map in OSGB projection

<!DOCTYPE html>
<html>
  <head>
    <link rel="stylesheet" href="https://openlayers.org/en/v4.0.1/css/ol.css" type="text/css">
    <script src="https://openlayers.org/en/v4.0.1/build/ol.js" type="text/javascript"></script>    
    <script src="https://cdnjs.cloudflare.com/ajax/libs/proj4js/2.4.3/proj4.js" type="text/javascript"></script>    
  </head>
  <body>
    <div id="map"></div>

    <script type="text/javascript">
      proj4.defs('EPSG:27700', '+proj=tmerc +lat_0=49 +lon_0=-2 +k=0.9996012717 ' +
          '+x_0=400000 +y_0=-100000 +ellps=airy ' +
          '+towgs84=446.448,-125.157,542.06,0.15,0.247,0.842,-20.489 ' +
          '+units=m +no_defs');
      var proj27700 = ol.proj.get('EPSG:27700');
      var extent = [0, 0, 700000, 1300000];
      proj27700.setExtent(extent);
  
      var layers = {};
      layers['nbn'] = new ol.layer.Tile({
        source: new ol.source.TileWMS({
          url: 'https://records-ws.nbnatlas.org/ogc/wms/reflect?q=species:"Martes martes"',
          projection: 'EPSG:3857',
          params: {
            VERSION: '1.1.1',
            ENV: "colourmode:osgrid;color:ffff00;opacity:0.5;gridlabels:true;gridres:singlegrid"
          }
        }),
      });
  
      var map = new ol.Map({
        target: 'map',
        layers: [
          layers['nbn']
        ],
        view: new ol.View({
          projection: 'EPSG:27700',
          center: ol.extent.getCenter(extent),
          zoom: 1,
        })
      });      
    </script>

  </body>
</html>

Now the grid lines run vertically and horizontally. It's not a clean image but it's familiar. See https://jsfiddle.net/JimBacon/6hab6s2j/

Jim Bacon

3

Re: Web service API for NBN Atlas now available

Thanks Jim. The examples are useful for those of us who find the web service API baffling.

Christine

4

Re: Web service API for NBN Atlas now available

I have updated my examples above with an important change

I had provided the web service request a search parameter of

q=Martes martes

My understanding is still a bit loose but I think this will have searched all available fields for 'Martes' OR 'martes'

I have changed this to

q=species:"Martes martes"

This should now select only records which have a value of "Martes martes" in the species field.

The list of fields which can be searched is returned by the Occurrence Indexed Fields service, https://records-ws.nbnatlas.org/index/fields. Given that there are 486 items in this list with beauties like

  • abcdIdentificationQualifierInsertionPoint

  • australianHerbariumRegion

  • cl84

  • earliestEraOrLowestErathem

I think it would be very useful to have a well formatted web page listing the fields of relevance and a description of them.

Jim Bacon.

5

Re: Web service API for NBN Atlas now available

I was exploring the occurrence web services on Friday and thought I would document what I found. As Mandy said, the required information is at the link she provided in the original post but, excuse the loose analogy, that is a bit like giving me a Greek dictionary and saying that is the required information to speak Greek. It depends a bit on your existing linguistic skills as to just how easy that is.

The Occurrence Details service allows you to retrieve the details of any individual record in the database by calling it with the universally unique identifier (UUID) of the record you are interested in. For example, https://records-ws.nbnatlas.org/occurre … 1b32cf663a. The information returned is in JSON format which I have found easiest to read by copying and pasting in to JSON Editor Online. I can paste the response in to the left panel and use the format button in the panel header to beautify it. I can use the central arrow button to move it to the right panel where it is presented in a tree editor allowing me to expand and collapse sections.

The object returned has 5 top-level elements

object {5}
  processed {28}
  raw {28}
  userAssertions [0]
  consensus {28}
  systemAssertions {5}

We have not been provided with any information about this but I would infer that the raw object is the original data. I'm guessing this could have come with some assertions from the user but did not. I imagine the import of data in to the Atlas involved some processing resulting in a processed version of the record and some assertions from the system as a consequence of the processing. Just possibly there was a comparison between the processed and raw data resulting in a consensus object indicating the areas of agreement. This is speculation and the facts needs documenting.

For info, the data for this record can be found on the gateway from https://data.nbn.org.uk/api/taxonObservations/442905281

Let's dive a bit deeper in to the returned data and look at the location information contained within it as an example. Expanding the raw object's location element I see

  raw {28}
    location {6} {
      decimalLatitude : 57.63
      decimalLongitude : -1.94
      gridReference : NK0360
      marine : false
      terrestrial : false
      coordinatePrecision : 1km

I think it likely that this record would have been provided as a 1km grid square and the latitude and longitude have been calculated from the centroid of the square to the nearest 2 decimal places.

Expanding the processed element I see

  processed {28}
    location {8}
      decimalLatitude : 57.63
      decimalLongitude : -1.94
      stateProvince : Scotland
      coordinateUncertaintyInMeters : 1000
      marine : false
      terrestrial : false
      geodeticDatum : EPSG:4326
      country : United Kingdom

This is has dispensed with the grid square and now only has the rather low precision latitude and longitude and an uncertainty in metres. If I were giving uncertainty on a point I would provide it as a radius. We don't have any documentation to tell us if that is the case here but, if so, our record has gone from a square of area 1km^2 to a circle of area 3.14km^2. Therefore, if you are accessing this data, you may wish to ensure you refer to the raw data rather than the processed data. The raw data also contains elsewhere the rather charming comment "Marten accessing garage through cat flap over period of 4 months and killed pet rabbit." which is not in the processed object.

I don't know what to make of them but there are also some system assertions to do with the location of the record. There is a failed assertion, precisionRangeMismatch, with the comment "Unable to parse the coordinate precision", and a warning, geodeticDatumAssumedWgs84, with the comment "Geodetic datum assumed to be WGS84 (EPSG:4326)".

I hope this is of some use to other users but I think it is perhaps more use as feedback to the NBN on how much more information I would need to use the service confidently.

Jim Bacon.

6 (edited by Jim Bacon 27-03-2017 15:39:26)

Re: Web service API for NBN Atlas now available

Another service I was trying on Friday was the Occurrence Search. My previous post depended upon extracting details of an occurrence based on its UUID and the search was the means by which I found the UUID of the record I was interested in. My quest was to find out how many Pine Marten records were in the 100km grid square NK.

You can limit a search in a number of ways.

  • The q and fq parameters allow you to filter by occurrence field values. (The list of available fields is returned by the Occurrence Indexed Fields service.)

  • The lat, lon and radius parameters allow you to filter records to those in a circular area.

  • The wkt parameter allows you to filter records to those in an area of any shape.

You can also group results using parameters to do with facets, control sorting and control paging.

One way to phrase my search is as follows

https://records-ws.nbnatlas.org/occurrences/search?q=species:"Martes martes"&fq=grid_ref_100000:NK 

This filters first on the species and then on a useful field I came across. The response includes a totalRecords value of 1.

Another ways is

https://records-ws.nbnatlas.org/occurrences/search?q=species:"Martes martes"&wkt=POLYGON ((-2.001633 57.090994, -0.351892 57.080162, -0.310874 57.978027, -2.001680 57.989239, -2.001633 57.090994)) 

This filters on the species and then on the boundary of the grid square. The boundary is defined by the longitude and latitude of the four corners in sequence ending with the same corner that was started with. I used an online coordinate converter to go from grid reference to longitude and latitude.

An alternative using facets is

https://records-ws.nbnatlas.org/occurrences/search?q=species:"Martes martes"&facets=grid_ref_100000&fsort=index&flimit=50

This returns all occurrences of Pine Marten plus a count of the number of records in each facet, i.e. in each 100km square where there is a non-zero result. Thankfully and obviously, though undocumented, there is a default pageSize of 10 limiting the number of occurrences returned. Less obviously there is an undocumented facet limit of 30. For a while I thought I had found a problem with missing results. As soon as I added flimit=50 to the parameters the missing values appeared.

Jim Bacon.

7 (edited by Jim Bacon 28-03-2017 16:20:28)

Re: Web service API for NBN Atlas now available

Today I am looking at the Geospatial services. My mission was to see if I could obtain the well known text (WKT) description of the 100km grid square NK. I needed that in my previous post and I calculated it laboriously point by point.

First I called the List of Geospatial Fields service. That returned a lot of information which I can't explain but included a description for the field and a field id (FID) which was all I needed. Summarised below (in alphabetical order) for your benefit.

+------------------------------------------------------------------+--------+
| DESCRIPTION                                                      | FID    |
+------------------------------------------------------------------+--------+
| 1:250,000  National Soil Map of Scotland                         | cl24   |
+------------------------------------------------------------------+--------+
| Ancient woodland inventory                                       | cl23   |
+------------------------------------------------------------------+--------+
| Ancient woodland inventory (Scotland)                            | cl29   |
+------------------------------------------------------------------+--------+
| Areas Of Outstanding Beauty (England)                            | cl50   |
+------------------------------------------------------------------+--------+
| Areas Of Outstanding Beauty (Wales)                              | cl51   |
+------------------------------------------------------------------+--------+
| Conservation Areas (Scotland)                                    | cl47   |
+------------------------------------------------------------------+--------+
| Countries with sea areas                                         | cl28   |
+------------------------------------------------------------------+--------+
| Country Parks                                                    | cl8    |
+------------------------------------------------------------------+--------+
| Environmentally Sensitive Areas (Scotland)                       | cl35   |
+------------------------------------------------------------------+--------+
| EUNIS Land cover                                                 | cl1000 |
+------------------------------------------------------------------+--------+
| EUNIS Land cover (contextual)                                    | cl1001 |
+------------------------------------------------------------------+--------+
| Geomorphology of the Cairngorm Mountains                         | cl26   |
+------------------------------------------------------------------+--------+
| Habitat Map of Scotland (HabMoS)                                 | cl66   |
+------------------------------------------------------------------+--------+
| Heritage Coasts (England)                                        | cl52   |
+------------------------------------------------------------------+--------+
| Heritage Coasts (Wales)                                          | cl53   |
+------------------------------------------------------------------+--------+
| Landscape Character Assessment (Scotland)                        | cl33   |
+------------------------------------------------------------------+--------+
| Landscape Character Assessment: Loch Lomond and the Trossachs NP | cl25   |
+------------------------------------------------------------------+--------+
| Local Environmental Records Centre Boundaries of the UK          | cl84   |
+------------------------------------------------------------------+--------+
| Local Nature Reserve                                             | cl10   |
+------------------------------------------------------------------+--------+
| Local Nature Reserves (England)                                  | cl49   |
+------------------------------------------------------------------+--------+
| Marine Conservation Zones (England)                              | cl62   |
+------------------------------------------------------------------+--------+
| Marine Conservation Zones (Wales)                                | cl63   |
+------------------------------------------------------------------+--------+
| National Character Areas (England)                               | cl71   |
+------------------------------------------------------------------+--------+
| National Nature Reserves                                         | cl11   |
+------------------------------------------------------------------+--------+
| National Nature Reserves (England)                               | cl67   |
+------------------------------------------------------------------+--------+
| National Nature Reserves (Wales)                                 | cl68   |
+------------------------------------------------------------------+--------+
| National Parks                                                   | cl3    |
+------------------------------------------------------------------+--------+
| National Parks                                                   | cl5    |
+------------------------------------------------------------------+--------+
| National Parks (England)                                         | cl69   |
+------------------------------------------------------------------+--------+
| National Parks (Scotland)                                        | cl39   |
+------------------------------------------------------------------+--------+
| National Parks (Wales)                                           | cl70   |
+------------------------------------------------------------------+--------+
| National Scenic Areas (Scotland)                                 | cl36   |
+------------------------------------------------------------------+--------+
| National Vegetation Classification (Scotland)                    | cl65   |
+------------------------------------------------------------------+--------+
| Natural Heritage Futures Zones (Scotland)                        | cl64   |
+------------------------------------------------------------------+--------+
| Nature Conservation Marine Protected Areas (Scotland)            | cl72   |
+------------------------------------------------------------------+--------+
| Nitrate Vulnerable Zones (Scotland)                              | cl37   |
+------------------------------------------------------------------+--------+
| Ordnance Survey Gazetteer                                        | cl17   |
+------------------------------------------------------------------+--------+
| Ordnance Survey National Grids - 100km                           | cl20   |
+------------------------------------------------------------------+--------+
| Ordnance Survey National Grids - 50km                            | cl21   |
+------------------------------------------------------------------+--------+
| Ordnance Survey National Grids - 10km                            | cl18   |
+------------------------------------------------------------------+--------+
| Ordnance Survey National Grids - 1km                             | cl19   |
+------------------------------------------------------------------+--------+
| Priority Habitat Inventory (North)                               | cl76   |
+------------------------------------------------------------------+--------+
| Priority Habitat Inventory (South)                               | cl74   |
+------------------------------------------------------------------+--------+
| RAMSAR (Wetlands of International Importance) (England)          | cl60   |
+------------------------------------------------------------------+--------+
| RAMSAR sites                                                     | cl4    |
+------------------------------------------------------------------+--------+
| RSPB nature reserve boundaries (UK)                              | cl73   |
+------------------------------------------------------------------+--------+
| Scottish Wildlife Trust reserve boundaries                       | cl27   |
+------------------------------------------------------------------+--------+
| Site of Special Scientific Interest                              | cl6    |
+------------------------------------------------------------------+--------+
| Sites of Special Scientific Interest (England)                   | cl54   |
+------------------------------------------------------------------+--------+
| Sites of Special Scientific Interest (Wales)                     | cl55   |
+------------------------------------------------------------------+--------+
| Special Area of Conservation                                     | cl9    |
+------------------------------------------------------------------+--------+
| Special areas of conservation (England)                          | cl57   |
+------------------------------------------------------------------+--------+
| Special areas of conservation (Wales)                            | cl56   |
+------------------------------------------------------------------+--------+
| Special protection area                                          | cl7    |
+------------------------------------------------------------------+--------+
| Special protection areas (England)                               | cl59   |
+------------------------------------------------------------------+--------+
| Special protection areas (Wales)                                 | cl58   |
+------------------------------------------------------------------+--------+
| UK provinces                                                     | cl2    |
+------------------------------------------------------------------+--------+
| Watsonian Vice Counties                                          | cl14   |
+------------------------------------------------------------------+--------+
| Watsonian Vice Counties - 12 mile                                | cl16   |
+------------------------------------------------------------------+--------+
| Watsonian Vice Counties - 3 mile                                 | cl15   |
+------------------------------------------------------------------+--------+
| Wetlands of International Importance (Ramsar)                    | cl13   |
+------------------------------------------------------------------+--------+
| World base layer                                                 | cl1    |
+------------------------------------------------------------------+--------+
| World Heritage Sites                                             | cl12   |
+------------------------------------------------------------------+--------+

I was pleased to find a field for Ordnance Survey National Grids - 100km with FID of cl20 (charlie lima two zero). I could feed this index in to the Details of a Specific Geospatial Field service. This returned a list of 100km squares, each having a number of recognisable and useful pieces of information such as a WMS url, a centroid and a bounding box. It was the description and primary id (PID) which I was interested in, as listed below.

+-------------+---------+
| DESCRIPTION | PID     |
+-------------+---------+
| HP          | 6565738 |
+-------------+---------+
| HT          | 6565693 |
+-------------+---------+
| HU          | 6565728 |
+-------------+---------+
| HW          | 6565715 |
+-------------+---------+
| HX          | 6565687 |
+-------------+---------+
| HY          | 6565707 |
+-------------+---------+
| HZ          | 6565739 |
+-------------+---------+
| NA          | 6565724 |
+-------------+---------+
| NB          | 6565696 |
+-------------+---------+
| NC          | 6565694 |
+-------------+---------+
| ND          | 6565726 |
+-------------+---------+
| NF          | 6565740 |
+-------------+---------+
| NG          | 6565688 |
+-------------+---------+
| NH          | 6565733 |
+-------------+---------+
| NJ          | 6565741 |
+-------------+---------+
| NK          | 6565706 |
+-------------+---------+
| NL          | 6565698 |
+-------------+---------+
| NM          | 6565692 |
+-------------+---------+
| NN          | 6565722 |
+-------------+---------+
| NO          | 6565723 |
+-------------+---------+
| NR          | 6565717 |
+-------------+---------+
| NS          | 6565699 |
+-------------+---------+
| NT          | 6565716 |
+-------------+---------+
| NU          | 6565695 |
+-------------+---------+
| NW          | 6565731 |
+-------------+---------+
| NX          | 6565689 |
+-------------+---------+
| NY          | 6565737 |
+-------------+---------+
| NZ          | 6565711 |
+-------------+---------+
| OV          | 6565690 |
+-------------+---------+
| SC          | 6565735 |
+-------------+---------+
| SD          | 6565732 |
+-------------+---------+
| SE          | 6565729 |
+-------------+---------+
| SH          | 6565734 |
+-------------+---------+
| SJ          | 6565697 |
+-------------+---------+
| SK          | 6565720 |
+-------------+---------+
| SM          | 6565708 |
+-------------+---------+
| SN          | 6565718 |
+-------------+---------+
| SO          | 6565705 |
+-------------+---------+
| SP          | 6565725 |
+-------------+---------+
| SR          | 6565742 |
+-------------+---------+
| SS          | 6565730 |
+-------------+---------+
| ST          | 6565704 |
+-------------+---------+
| SU          | 6565709 |
+-------------+---------+
| SV          | 6565721 |
+-------------+---------+
| SW          | 6565700 |
+-------------+---------+
| SX          | 6565713 |
+-------------+---------+
| SY          | 6565703 |
+-------------+---------+
| SZ          | 6565736 |
+-------------+---------+
| TA          | 6565710 |
+-------------+---------+
| TF          | 6565691 |
+-------------+---------+
| TG          | 6565701 |
+-------------+---------+
| TL          | 6565727 |
+-------------+---------+
| TM          | 6565702 |
+-------------+---------+
| TQ          | 6565712 |
+-------------+---------+
| TR          | 6565714 |
+-------------+---------+
| TV          | 6565719 |
+-------------+---------+

The PID for the grid square NK is 6565706 and that can be passed to the Download a Shape Object as WKT service, https://layers.nbnatlas.org/ws/shape/geojson/6565706.

The response is

MULTIPOLYGON(((-2.00167974960392 57.9892376307703,-0.310874261787894 57.9780258431122,-0.351891571161531 57.0801607383439,-2.00163263915494 57.0909931654184,-2.00167974960392 57.9892376307703)))

Rounding to 6 decimal places for comparison with my previous post I get

MULTIPOLYGON(((-2.001680 57.989238, -0.310874 57.978026, -0.351892 57.080161, -2.001633 57.090993, -2.001680 57.989238)))

Apart from listing the points in clockwise from top left rather than anti-clockwise from bottom left, this agrees with my calculation except in the last decimal place.

There are other services for returning items in KML, GeoJSON and ESRI shape file as well as being able to get them via WMS. In this manner you could similarly get hold of things like the boundary of a vice county or a national park.

Jim Bacon.

PS. Thanks to the online Tables Generator for formatting tables.

8

Re: Web service API for NBN Atlas now available

An easy challenge today. How can I lookup a record on the Atlas from an NBN Gateway observationID?

A look through the list of Occurrence Indexed Fields revealed a field called  occurrence_id. This turns out to be the same as the old observationID.

Thus doing a search, e.g. https://records-ws.nbnatlas.org/occurre … :225694397 returns a record which contains the Atlas uuid of 0fd1c74c-3e08-4d0e-9556-860b33bc823a

I can then compare the Atlas occurrence with the Gateway taxonObservation

Jim Bacon

9

Re: Web service API for NBN Atlas now available

It looks really exciting but querying maps using the species name is making my hair curl! Can we maybe change to examples that use the TVK? If we encourage users to use binomials then it will lead to a lot of confusion with regard to homonyms and "sensu" names. :) 

I have been using the SOAP interface so I now need to work out how to change my site, but I haven't got time to devote to it right now. Is there a breakdown of all the arguments that can be passed to "q" and "fq"?

Chris Raper, Manager of the UK Species Inventory, Angela Marmont Centre for UK Biodiversity,
Natural History Museum, Cromwell Road, London, SW7 5BD.  (tel: 020 7942 5894)
also Tachinid Recording Scheme (http://tachinidae.org.uk/)

10

Re: Web service API for NBN Atlas now available

Hi Chris,

Using a TVK instead of a name should be no problem

The Occurrence Indexed Fields service returns a list of arguments that can be passed as arguments to the Occurrence Search.
The Species Indexed Fields service returns a list of arguments that can be passed as arguments to the Species Search.

These are bare, unexplained lists which should be better documented. It is also worth noting that argument names may differ between the two for similar things. I have also found that the q parameter does not currently work as advertised for the Species Search although the fq parameter does.

Jim Bacon.

11

Re: Web service API for NBN Atlas now available

Thanks Jim. Yes, while the reference page is good for the hardcore programmers, I think we're going to need some nice worked examples to let the recording schemes modify their sites quickly and get their maps back online. I did mine as a WordPress plugin but that was years ago so I'm going to have to relearn how to do it all, which is going to be a big pain in the bum. It would have been so much better if the web-services at least were kept online while we all converted over.

Chris Raper, Manager of the UK Species Inventory, Angela Marmont Centre for UK Biodiversity,
Natural History Museum, Cromwell Road, London, SW7 5BD.  (tel: 020 7942 5894)
also Tachinid Recording Scheme (http://tachinidae.org.uk/)

12

Re: Web service API for NBN Atlas now available

Duncan has a new map service ready which is nearly a drop-in replacement for the old EasyMap service. I recommend you hang on till you have seen it. It is waiting on me to test it (hopefully today) but I am allowing myself to be diverted to the more fundamental questions about the accuracy of the data that will be displayed.

Jim Bacon

13

Re: Web service API for NBN Atlas now available

Nice work - thanks Jim    :)

Chris Raper, Manager of the UK Species Inventory, Angela Marmont Centre for UK Biodiversity,
Natural History Museum, Cromwell Road, London, SW7 5BD.  (tel: 020 7942 5894)
also Tachinid Recording Scheme (http://tachinidae.org.uk/)

14

Re: Web service API for NBN Atlas now available

Good to see this, i've some hefty adaptions to start looking into for our reporting software! Second Chris on 'a period of time to switch' we've effectively had to drop use of NBN sourced data for the foreseeable future.

Natural History & Biodiversity Data Enthusiast

15

Re: Web service API for NBN Atlas now available

A beta version of the EasyMaps service for the Atlas is now available for testing at https://easymap.nbnatlas.org/. I'll put that in a new topic as well to give it prominence.

Regarding the old gateway services, those servers are still running and I think they could be accessed by IP address for a little while longer if you could persuade the NBN to be more selective in the redirect rule they have in place. I don't suppose they will do that as they obviously have made a policy decision about not maintaining the two systems in parallel.

Jim Bacon

16

Re: Web service API for NBN Atlas now available

I appreciate the stance. Realistically it all comes down to resources involved in maintaining two separate systems. On the positive side as and when i do get the chance to re-develop i hope to publish the code so it might make a useful sample. Technology moves fast, so must we i guess!

Natural History & Biodiversity Data Enthusiast

17

Re: Web service API for NBN Atlas now available

I will be updating our Drupal module that produces maps shortly. That will be freely available on GitHub.

Jim Bacon

18

Re: Web service API for NBN Atlas now available

A basic question from a beginner, how do you reference more than one parameter in the same query
e.g. q=license:OGL  AND q=coordinate_uncertainty:1000?

Simply using '&' does not work.

Nik Bruce

19

Re: Web service API for NBN Atlas now available

NikB, you can do multiple filters, e.g.
q=*:*&fq=license:OGL&fq=coordinate_uncertainty:1000

I'm not in the office to check the above works verbatim, but that's the gist.
-D.
p.s. You might find the "query primer" (linked from the api docs) helpful.
https://docs.google.com/a/nbn.org.uk/do … S6x82xnfu4