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.

Back to contents

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
Back to contents

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

Back to contents

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.

Back to contents

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:

  1. 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
  2. Farmers requesting their own land data – these users are asked to agree to a tick-and-accept end user license
  3. 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:

  1. 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
  2. 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
  3. 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
Back to contents

Further Information

Please contact the RPA Geospatial Team mailbox if any further information is required.

Back to contents

Data Model

Land Parcels

NameTypeLengthDescription
SBIIntegerSingle Business Identifier, the customer’s unique ID
IDIntegerPrimary Key
SHEET_IDString6Location of parcel on 1km2 grid. Used in conjunction with PARCEL_ID to locate parcel
PARCEL_IDString4Location of parcel on 100m2 grid. Used in conjunction with SHEET_ID to locate parcel
VALID_FROMDate8Date on which the feature became valid
VALID_TODate8Date on which the feature ceased to be valid
LFA_CODEString2LFA Moorland status of the feature
CREATED_ONDate8Date on which the feature was created
AREA_HADoubleArea of the feature in hectares
SHAPE_AREADoubleArea of the geometry feature in square metres
SHAPE_PERIMETERDoublePerimeter of the geometry feature in metres
Back to contents

Land Covers

NameTypeLengthDescription
SBIIntegerSingle Business Identifier, the customer’s unique ID
IDIntegerPrimary Key
SHEET_IDString6Location of parcel on 1km2 grid. Used in conjunction with PARCEL_ID to locate parcel
PARCEL_IDString4Location of parcel on 100m2 grid. Used in conjunction with SHEET_ID to locate parcel
VALID_FROMDate8Date on which the feature became valid
VALID_TODate8Date on which the feature ceased to be valid
REFERENCE_PARCELS_IDIntegerForeign Key to Land Parcel’s ID value
LAND_COVER_CLASS_CODEString36Three digit code denoting land cover feature type using RPA’s data model
DESCRIPTIONString200Text description related to LAND_COVER_CLASS_CODE value
CREATED_ONDate8Date on which the feature was created
AREA_HADoubleArea of the feature in hectares
SHAPE_AREADoubleArea of the geometry feature in square metres
SHAPE_PERIMETERDoublePerimeter of the geometry feature in metres
Back to contents

Hedge Control

NameTypeLengthDescription
SBIIntegerSingle Business Identifier, the customer’s unique ID
IDIntegerPrimary Key
FEATURE_IDInteger
REF_PARCEL_IDIntegerForeign Key to Land Parcel’s ID value
REF_PARCEL_SHEET_IDString6Location of parcel on 1km2 grid. Used in conjunction with PARCEL_ID to locate parcel
REF_PARCEL_PARCEL_IDString4Location of parcel on 100m2 grid. Used in conjunction with SHEET_ID to locate parcel
ELIGIBLE_FOR_EFAString1Denotes whether the feature could have formed part of an EFA claim; this attribute is no longer in use
ADJACENT_PARCEL_IDString200Foreign Key to adjacent Land Parcel’s ID value
ADJACENT_PARCEL_SHEET_IDString6Location of adjacent parcel on 1km2 grid. Used in conjunction with PARCEL_ID to locate parcel
ADJACENT_PARCEL_PARCEL_IDString4Location of adjacent parcel on 100m2 grid. Used in conjunction with SHEET_ID to locate parcel
ADJACENT_ELIGIBLE_FOR_EFAString20Denotes whether the adjacent feature could have formed part of an EFA claim; this attribute is no longer in use
VALID_FROMDate8Date on which the feature became valid
VALID_TODate8Date on which the feature ceased to be valid
CREATED_ONDate8Date on which the feature was created
LENGTHDoubleLength of the feature in metres
SHAPE_LENGTHDoubleLength of the geometry feature in metres
Back to contents