inspirepolygonsdownloader
v1.0.7
Published
Downloads and munges Land registry INSPIRE polygons so thay can be easily mapped and/or traversed.
Downloads
15
Maintainers
Readme
INSPIRE Polygons Downloader
Downloads and munges Land registry INSPIRE polygons so thay can be easily mapped and/or traversed.
Usage:
var downloader = require('inspirepolygonsdownloader')();
var options = {
areas: ["Blaby", "Uttlesford"],
fromDate: "2015-04-03",
geoJson: true
};
downloader.download(options).then(function(data) {
console.log(data);
});
Options:
areas
- Type:
array of strings
- Required:
Yes
The list of areas to download, should match the format of http://data.inspire.landregistry.gov.uk/{area}.zip
.
fromDate
- Type:
Date
- Required:
No
- Default:
null
To filter out the list of polygons according to the polygon's from date.
geoJson
- Type:
Date
- Required:
No
- Default:
False
Whether or not to return the output in geo json format or as a plain array of polygon data (see below for more detail).
Returns:
download()
returns a deferred. The deferred callback has one parameter, data
, depending on the geoJson
option this data is either geojson of polygons with the following additional properties:
- id - The Inspire Id.
- cadastralReference
- validFrom
If geoJson
is false data
is an array of objects, each object has the following members:
- id - The Inspire Id.
- geometry - An array of eastings and northings
- latLongs - An array of latitude/longitudes
- cadastralReference
- validFrom
Further information:
- Background about INSPIRE
- INSPIRE data - Conditions of use (can be found at the bottom of the page)
- OGL - Open Government Licence
- Movable Type - Convert between Latitude/Longitude & OS National Grid References - the key algorithm used to convert the GML to latatidue and longitude coordinates so it can be mapped.
Mapper:
github.com/robert-waggott/INSPIREPolygonsMapper is intended as a working example of how to use this package.