Skip to content

Latest commit

 

History

History
274 lines (243 loc) · 8.37 KB

json-features.adoc

File metadata and controls

274 lines (243 loc) · 8.37 KB

Resource: Features

Version: 1.0.1

Overview

The features in an OGC Collection.

This resource supports spatial filtering with the bbox parameter, temporal filtering with the datetime parameter.

To avoid overloading clients and servers, both clients and servers can limit the maximum number of features in a representation of the resource. In this case, paging is supported to provide access to all the features in the collection that match the specified filter conditions.

Maturity: Mature

Pre-defined properties

Table 1. Properties
Property Type Description

links

[ Link ]

REQUIRED. Links to other resources. See Link relation types for typical link relations of this resource type.

features

[ Feature ]

REQUIRED. The features in the collection.

timeStamp

string

The RFC 3339 time stamp when the resource representation was generated.

numberMatched

integer

RECOMMENDED. If a property numberMatched is included in the response, the value is the number of features in the feature collections that match the filter parameters like bbox, datetime, etc. Servers can omit this information, if the information about the number of matching features is not known or difficult to compute.

numberReturned

integer

RECOMMENDED. If a property numberReturned is included in the response, the value is the number of features in the response document. Servers can omit this information, if the information about the number of features is not known or difficult to compute.

The following link relation types are commonly used in links from a Features resource:

Table 2. Outgoing link relation types
Link relation type Description

self

REQUIRED. Link to the resource in the current representation.

alternate

REQUIRED. Link to the resource in every other media type supported by the server.

next

CONDITIONAL. If the response is a page of a paged response and there is another page, a link will reference that next page.

prev

If the response is a page of a paged response and there is a previous page, a link may reference that previous page.

first

If the response is a page of a paged response, a link may reference the first page.

last

If the response is a page of a paged response, a link may reference the last page.

license

RECOMMENDED. Refers to the license associated with the data.

describedby

Refers to a resource providing information about the data, for example, a schema for the feature collection or a separate metadata resource.

The following link relation types are commonly used in links to a Features resource:

Table 3. Incoming link relation types
Link relation type Description

items

This link relation type will not be registered with IANA. In the future, it may be superseded by the search link relation type.

search

From any resource that wants to link to a resource that supports searching the features, e.g. from a OGC Collection resource.

This link relation type is expected to supersede the use of the items link relation type.

Representation: GeoJSON

The GeoJSON representation is the currently recommended representation that all APIs should support, where GeoJSON can be used for the data.

In addition to the pre-defined properties listed above, each GeoJSON feature collection includes a JSON member with the key type and the value "FeatureCollection".

Example

First page of the airport features from OS Open Zoomstack
{
   "type":"FeatureCollection",
   "links":[
      {
         "href":"https://demo.ldproxy.net/zoomstack/collections/airports/items?f=json",
         "rel":"self",
         "type":"application/geo+json",
         "title":"This document"
      },
      {
         "href":"https://demo.ldproxy.net/zoomstack/collections/airports/items?f=html",
         "rel":"alternate",
         "type":"text/html",
         "title":"This document as HTML"
      },
      {
         "href":"https://demo.ldproxy.net/zoomstack/collections/airports/items?f=json&offset=10",
         "rel":"next",
         "type":"application/geo+json",
         "title":"Next page"
      }
   ],
   "numberReturned":10,
   "timeStamp":"2021-07-07T12:38:27Z",
   "features":[
      {
         "type":"Feature",
         "id":1,
         "geometry":{
            "type":"Point",
            "coordinates":[
               -1.6930015,
               60.3216821
            ]
         },
         "properties":{
            "name":"Papa Stour Airstrip"
         }
      },
      {
         "type":"Feature",
         "id":2,
         "geometry":{
            "type":"Point",
            "coordinates":[
               -1.2922268,
               59.8782666
            ]
         },
         "properties":{
            "name":"Sumburgh Airport"
         }
      },
      {
         "type":"Feature",
         "id":3,
         "geometry":{
            "type":"Point",
            "coordinates":[
               -1.2439112,
               60.1917461
            ]
         },
         "properties":{
            "name":"Tingwall Airport"
         }
      },
      {
         "type":"Feature",
         "id":4,
         "geometry":{
            "type":"Point",
            "coordinates":[
               -2.8997054,
               58.9579609
            ]
         },
         "properties":{
            "name":"Kirkwall Airport"
         }
      },
      {
         "type":"Feature",
         "id":5,
         "geometry":{
            "type":"Point",
            "coordinates":[
               -6.3295079,
               58.2139012
            ]
         },
         "properties":{
            "name":"Port-Adhair Steòrnabhaigh/Stornoway Airport"
         }
      },
      {
         "type":"Feature",
         "id":6,
         "geometry":{
            "type":"Point",
            "coordinates":[
               -3.094033,
               58.4583627
            ]
         },
         "properties":{
            "name":"Wick John O'Groats Airport"
         }
      },
      {
         "type":"Feature",
         "id":7,
         "geometry":{
            "type":"Point",
            "coordinates":[
               -7.3604149,
               57.4838089
            ]
         },
         "properties":{
            "name":"Benbecula Airport"
         }
      },
      {
         "type":"Feature",
         "id":8,
         "geometry":{
            "type":"Point",
            "coordinates":[
               -7.4485984,
               57.0255697
            ]
         },
         "properties":{
            "name":"Barra Airport"
         }
      },
      {
         "type":"Feature",
         "id":9,
         "geometry":{
            "type":"Point",
            "coordinates":[
               -4.0493516,
               57.5431467
            ]
         },
         "properties":{
            "name":"Inverness Airport"
         }
      },
      {
         "type":"Feature",
         "id":10,
         "geometry":{
            "type":"Point",
            "coordinates":[
               -2.2001789,
               57.2023588
            ]
         },
         "properties":{
            "name":"Aberdeen International Airport"
         }
      }
   ]
}

Media type

application/geo+json

Representation: HTML

Providing an HTML representation is recommended so that the resource can be displayed in a web browser and indexed by search engines.

The HTML representation should include all information that is part of the JSON representation.

Media type

text/html