Rural Payments Agency Land API
Introduction
This document details a web API for access to the Rural Payments Agency (RPA)’s Land Parcels, Land Covers and Hedge Control datasets, which have been made available for use by our customers, and companies working on their behalf, to use their spatial data held by RPA in the customer’s mapping and farming software.
Land Parcel polygons form the basis for agricultural and environmental subsidy claims, and Land Cover polygons identify the type of land which falls within each Land Parcel. This data is scheme agnostic, with each scheme using land covers in different ways to identify land which is eligible for subsidy. The Hedge Control data contains linear features, which fall within, or on the boundary of, Land Parcels.
API
The API is designed for use in farm or mapping software to display the land parcels, land cover and hedge control features belonging to an RPA customer.
There are three parameters which will determine which data are retrieved.
The first parameter is the layer identifier, a single string which is a layer's unique identifier, RPA:LandParcels (Land Parcels), RPA:LandCovers (Land Covers) or RPA:HedgeControl (Hedge Control). The base url should also contain the path to the relevant resource: /RPA/LandParcels/, /RPA/LandCovers/ or /RPA/HedgeControl/ accordingly.
- https://environment.data.gov.uk/data-services/RPA/LandParcels/wfs?version=2.0.0&request=GetFeature&typeNames=RPA:LandParcels&cql_filter=SBI=123456789&srsname=EPSG:27700&outputFormat=application/json
- https://environment.data.gov.uk/data-services/RPA/LandCovers/wfs?version=2.0.0&request=GetFeature&typeNames=RPA:LandCovers&cql_filter=SBI=123456789&srsname=EPSG:27700&outputFormat=application/json
- https://environment.data.gov.uk/data-services/RPA/HedgeControl/wfs?version=2.0.0&request=GetFeature&typeNames=RPA:HedgeControl&cql_filter=SBI=123456789&srsname=EPSG:27700&outputFormat=application/json
The second parameter is the Single Business Identifier (SBI), a 9-digit number which is an RPA customer’s unique identifier, in the example below the SBI is 123456789.
- https://environment.data.gov.uk/data-services/RPA/LandParcels/wfs?version=2.0.0&request=GetFeature&typeNames=RPA:LandParcels&cql_filter=SBI=123456789&srsname=EPSG:27700&outputFormat=application/json
- https://environment.data.gov.uk/data-services/RPA/LandCovers/wfs?version=2.0.0&request=GetFeature&typeNames=RPA:LandCovers&cql_filter=SBI=123456789&srsname=EPSG:27700&outputFormat=application/json
- https://environment.data.gov.uk/data-services/RPA/HedgeControl/wfs?version=2.0.0&request=GetFeature&typeNames=RPA:HedgeControl&cql_filter=SBI=123456789&srsname=EPSG:27700&outputFormat=application/json
The third parameter will decide the spatial reference in which the data will be displayed. If OSGB is required then it should not be necessary to include the srsname of EPSG:27700 because this is served by default. But if a different projection is required, it should be included in the URL.
- https://environment.data.gov.uk/data-services/RPA/LandParcels/wfs?version=2.0.0&request=GetFeature&typeNames=RPA:LandParcels&cql_filter=SBI=123456789&srsname=EPSG:27700&outputFormat=application/json
- https://environment.data.gov.uk/data-services/RPA/LandCovers/wfs?version=2.0.0&request=GetFeature&typeNames=RPA:LandCovers&cql_filter=SBI=123456789&srsname=EPSG:27700&outputFormat=application/json
- https://environment.data.gov.uk/data-services/RPA/HedgeControl/wfs?version=2.0.0&request=GetFeature&typeNames=RPA:HedgeControl&cql_filter=SBI=123456789&srsname=EPSG:27700&outputFormat=application/json
Pagination
The maximum number of features returned by each dataset is 100,000. Other parameters can be added to control the number of features returned.
Adding &count=5 to the URLs will limit the response to five features:
- https://environment.data.gov.uk/data-services/RPA/HedgeControl/wfs?version=2.0.0&request=GetFeature&typeNames=RPA:HedgeControl&cql_filter=SBI=123456789&srsname=EPSG:27700&outputFormat=application/json&count=5
Adding &startIndex=3 to the URLs will skip the first two features:
- https://environment.data.gov.uk/data-services/RPA/HedgeControl/wfs?version=2.0.0&request=GetFeature&typeNames=RPA:HedgeControl&cql_filter=SBI=123456789&srsname=EPSG:27700&outputFormat=application/json&startIndex=3
Please see the WFS reference page
Update Process
The three datasets are updated weekly. An updated version of the data in GeoPackage format is supplied by RPA. This is done on a Friday and the load will occur by the following Friday.
The time lag between extract and load may result in temporary visible differences between the land data visible in Data Services Platform and the Rural Payments Land Viewer.
Licensing
The RPA’s land datasets are considered to be derived from Ordnance Survey MasterMap data, so are subject to the licensing conditions below. Three types of user have been defined:
- Public Sector Geospatial Agreement users – PSGA members are covered by their existing agreements so can make use of RPA’s land datasets through their existing Defra Data Services Platform accounts
- Farmers requesting their own land data – these users are asked to agree to a tick-and-accept end user license
- Agents or agronomists acting on behalf of farmers – these users are asked to agree to the tick-and-accept end user license, but should also record their business contact details in case of any potential breaches of the license agreement
Click here to view the EULA (End User Licence Agreement).
Software vendors hoping to incorporate the REST endpoints into their own software should replicate the licensing conditions for user types 2 and 3. This may be done in three ways:
- By building the end user license text into their own software with a tick box to confirm user acceptance, and then recording Agent business contact details where necessary – making these details available to the Rural Payments Agency and/or Ordnance Survey if required
- Or by directing the users to the Defra Data Services Platform website to record their acceptance of the licensing conditions, and for Agents to record their business contact details
- Or by building the end user license text into their own software with a tick box to confirm user acceptance, but with Agent users being directed to the Defra Data Services Platform website to record their business contact details
Further Information
Please contact the RPA Geospatial Team mailbox if any further information is required.
Data Model
Land Parcels
Name | Type | Length | Description |
---|---|---|---|
SBI | Integer | Single Business Identifier, the customer’s unique ID | |
ID | Integer | Primary Key | |
SHEET_ID | String | 6 | Location of parcel on 1km2 grid. Used in conjunction with PARCEL_ID to locate parcel |
PARCEL_ID | String | 4 | Location of parcel on 100m2 grid. Used in conjunction with SHEET_ID to locate parcel |
VALID_FROM | Date | 8 | Date on which the feature became valid |
VALID_TO | Date | 8 | Date on which the feature ceased to be valid |
LFA_CODE | String | 2 | LFA Moorland status of the feature |
CREATED_ON | Date | 8 | Date on which the feature was created |
AREA_HA | Double | Area of the feature in hectares | |
SHAPE_AREA | Double | Area of the geometry feature in square metres | |
SHAPE_PERIMETER | Double | Perimeter of the geometry feature in metres |
Land Covers
Name | Type | Length | Description |
---|---|---|---|
SBI | Integer | Single Business Identifier, the customer’s unique ID | |
ID | Integer | Primary Key | |
SHEET_ID | String | 6 | Location of parcel on 1km2 grid. Used in conjunction with PARCEL_ID to locate parcel |
PARCEL_ID | String | 4 | Location of parcel on 100m2 grid. Used in conjunction with SHEET_ID to locate parcel |
VALID_FROM | Date | 8 | Date on which the feature became valid |
VALID_TO | Date | 8 | Date on which the feature ceased to be valid |
REFERENCE_PARCELS_ID | Integer | Foreign Key to Land Parcel’s ID value | |
LAND_COVER_CLASS_CODE | String | 36 | Three digit code denoting land cover feature type using RPA’s data model |
DESCRIPTION | String | 200 | Text description related to LAND_COVER_CLASS_CODE value |
CREATED_ON | Date | 8 | Date on which the feature was created |
AREA_HA | Double | Area of the feature in hectares | |
SHAPE_AREA | Double | Area of the geometry feature in square metres | |
SHAPE_PERIMETER | Double | Perimeter of the geometry feature in metres |
Hedge Control
Name | Type | Length | Description |
---|---|---|---|
SBI | Integer | Single Business Identifier, the customer’s unique ID | |
ID | Integer | Primary Key | |
FEATURE_ID | Integer | ||
REF_PARCEL_ID | Integer | Foreign Key to Land Parcel’s ID value | |
REF_PARCEL_SHEET_ID | String | 6 | Location of parcel on 1km2 grid. Used in conjunction with PARCEL_ID to locate parcel |
REF_PARCEL_PARCEL_ID | String | 4 | Location of parcel on 100m2 grid. Used in conjunction with SHEET_ID to locate parcel |
ELIGIBLE_FOR_EFA | String | 1 | Denotes whether the feature could have formed part of an EFA claim; this attribute is no longer in use |
ADJACENT_PARCEL_ID | String | 200 | Foreign Key to adjacent Land Parcel’s ID value |
ADJACENT_PARCEL_SHEET_ID | String | 6 | Location of adjacent parcel on 1km2 grid. Used in conjunction with PARCEL_ID to locate parcel |
ADJACENT_PARCEL_PARCEL_ID | String | 4 | Location of adjacent parcel on 100m2 grid. Used in conjunction with SHEET_ID to locate parcel |
ADJACENT_ELIGIBLE_FOR_EFA | String | 20 | Denotes whether the adjacent feature could have formed part of an EFA claim; this attribute is no longer in use |
VALID_FROM | Date | 8 | Date on which the feature became valid |
VALID_TO | Date | 8 | Date on which the feature ceased to be valid |
CREATED_ON | Date | 8 | Date on which the feature was created |
LENGTH | Double | Length of the feature in metres | |
SHAPE_LENGTH | Double | Length of the geometry feature in metres |