fpv-airspace 0.4.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,36 @@
1
+ # NATS UK AIP ENR 5.1 UAS Flight Restrictions dataset
2
+
3
+ Status: **open question**. Redistribution terms have not been confirmed.
4
+
5
+ ## What the dataset is
6
+
7
+ The UAS Flight Restrictions digital dataset (AIXM 5.1 plus a KML for visual
8
+ validation) published by NATS AIS on behalf of the CAA at
9
+ <https://nats-uk.ead-it.com/cms-nats/opencms/en/Publications/digital-datasets/index.html>,
10
+ refreshed every AIRAC cycle (28 days).
11
+
12
+ ## What the pages say
13
+
14
+ The dataset pages carry "© Copyright NATS Limited" and no explicit reuse
15
+ licence. The UAS restriction zones page says the datasets were "created to
16
+ allow end users the ability to view the data in separate viewers or integrate
17
+ with other applications". No commercial-use or redistribution statement was
18
+ found on 2026-09-25.
19
+
20
+ ## How this project uses it
21
+
22
+ - Parsed into the data pack at build time and redistributed as GitHub Release
23
+ assets so that `npx` users need no NATS account or download of their own.
24
+ - Every response that uses the layer carries the attribution string
25
+ "Airspace restrictions: UK AIP ENR 5.1 UAS Flight Restrictions dataset
26
+ © NATS Limited. Reproduced for information only; the UK AIP is the
27
+ authoritative source."
28
+ - The build supports `--exclude nats` so a pack without the layer can be
29
+ published if redistribution is refused; the server would then fetch and parse
30
+ the dataset client-side on first run (parser lives in `pipeline/sources/nats`).
31
+
32
+ ## Correspondence log
33
+
34
+ | Date | Action |
35
+ |---|---|
36
+ | 2026-09-25 | Terms reviewed; none published. Enquiry to NATS AIS still to be sent. |
@@ -0,0 +1,10 @@
1
+ # Open Government Licence v3.0
2
+
3
+ Full text: <https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/>
4
+
5
+ You are free to copy, publish, distribute, transmit and adapt the Information,
6
+ and exploit it commercially and non-commercially, provided you acknowledge the
7
+ source by including the attribution statement specified by the Information
8
+ Provider(s) and, where possible, link to this licence. The attribution strings
9
+ for every OGL source in the pack are stored in the pack's `sources` table and
10
+ printed by `get_data_status`.
@@ -0,0 +1,10 @@
1
+ # ONS Countries (December 2024) Boundaries UK BUC
2
+
3
+ Office for National Statistics licensed under the Open Government Licence v3.
4
+ Contains OS data © Crown copyright and database right 2024.
5
+ Source: <https://geoportal.statistics.gov.uk/>.
6
+
7
+ Used only to decide whether a point is in England/Wales (rights-of-way data
8
+ available), Scotland or Northern Ireland.
9
+
10
+ The same licence covers the Local Authority Districts boundaries (BSC, super-generalised) used for the `admin_areas` table and council policy notes.
@@ -0,0 +1,7 @@
1
+ # Forestry England legal boundary
2
+
3
+ Forestry England Legal Boundary from the Forestry Commission open data portal (https://data-forestry.opendata.arcgis.com/).
4
+
5
+ Licence: Open Government Licence v3.0 with a mandatory acknowledgement, reproduced verbatim in the source attribution: "Contains, or is based on, information supplied by the Forestry Commission. © Crown copyright and database right [year] Ordnance Survey [100021242]".
6
+
7
+ Forestry England byelaws prohibit operating aircraft, including drones, on its land without a permit (https://www.forestryengland.uk/article/filming-photography-and-drones).
@@ -0,0 +1,5 @@
1
+ # Core Paths, Scotland
2
+
3
+ Core paths under the Land Reform (Scotland) Act 2003, aggregated from every Scottish local authority and National Park authority by the Improvement Service Spatial Hub (https://data.spatialhub.scot/dataset/core_paths-is).
4
+
5
+ Licence: Open Government Licence v3.0. Access to the WFS and downloads needs a free Spatial Hub account key, supplied to the build as `SPATIALHUB_AUTHKEY`; the account terms are accepted by the key holder. Attribution per council: "Core paths: <council> core path plan via the Improvement Service Spatial Hub, Open Government Licence v3. Contains OS data © Crown copyright and database right".
@@ -0,0 +1,11 @@
1
+ # National Trust Open Data: Land - Always Open / Limited Access
2
+
3
+ Source: <https://open-data-national-trust.hub.arcgis.com/> (ArcGIS Hub),
4
+ published under the Open Government Licence v3 (Always Open) and CC-BY
5
+ (Limited Access) per data.gov.uk. Captured at approximately 1:50,000; not an
6
+ ownership boundary.
7
+
8
+ The National Trust Byelaws (1965, made under the National Trust Act 1907)
9
+ prohibit operating an aircraft, including unmanned aircraft, over or from Trust
10
+ land without permission:
11
+ <https://www.nationaltrust.org.uk/who-we-are/about-us/flying-drones-at-our-places>.
@@ -0,0 +1,7 @@
1
+ # Natural England open data
2
+
3
+ CRoW Act 2000 Access Layer, Sites of Special Scientific Interest (England) and National Parks (England), from the Natural England Open Data Geoportal (https://naturalengland-defra.opendata.arcgis.com/).
4
+
5
+ Licence: Open Government Licence v3.0. Attribution: "Contains Natural England data © Natural England, and OS data © Crown copyright and database right", with the year of the data.
6
+
7
+ Used for: open access land (context for take-off, not permission), SSSI and National Park designations (advisory).
@@ -0,0 +1,5 @@
1
+ # Natural Resources Wales open data
2
+
3
+ Open Access (open country, registered common land), SSSI and National Park layers from DataMapWales (https://datamap.gov.wales/), served by GeoServer WFS.
4
+
5
+ Licence: Open Government Licence v3.0. Attribution: "Contains Natural Resources Wales information © Natural Resources Wales and database right. Contains OS data © Crown copyright and database right".
@@ -0,0 +1,9 @@
1
+ # Geocoding
2
+
3
+ - **Nominatim** (default): data © OpenStreetMap contributors, Open Database
4
+ Licence (ODbL). Usage policy: <https://operations.osmfoundation.org/policies/nominatim/>
5
+ (max 1 request/second, identifying User-Agent, results cached). The server
6
+ enforces the rate limit and caches results for 30 days.
7
+ - **OS Names API** (optional, `OS_NAMES_API_KEY`): OS OpenData under the Open
8
+ Government Licence v3. Contains OS data © Crown copyright and database right.
9
+ - **postcodes.io**: Open Government Licence v3; contains OS and ONS data.
@@ -0,0 +1,5 @@
1
+ # OpenStreetMap
2
+
3
+ Parking, laybys and ground hazards (railways, motorways and trunk roads, power lines and pylons, substations and generators, helipads, masts, military land, schools, nurseries, hospitals, fire and fuel stations, parks, cemeteries) come from the Geofabrik Great Britain extract of OpenStreetMap (https://download.geofabrik.de/europe/great-britain.html).
4
+
5
+ Licence: Open Database Licence (ODbL) 1.0. Attribution: "© OpenStreetMap contributors". Ground hazards are advisory and incomplete; they do not change the legal verdict.
@@ -0,0 +1,20 @@
1
+ # Public rights of way via rowmaps.com
2
+
3
+ Each council releases its rights-of-way GIS data under the Open Government
4
+ Licence v3 (a few older releases used OS OpenData terms). rowmaps.com converts
5
+ them to GeoJSON and states per file:
6
+
7
+ > The data in this GeoJSON file has been obtained under licence from the council
8
+ > of X. The Council's Definitive Map is the authoritative source of their rights
9
+ > of way. The details of the public rights of way network contained in the
10
+ > Council's data are for information only, and are an interpretation of the
11
+ > Definitive Map, not the Definitive Map itself ... The authority's data contains
12
+ > Ordnance Survey data © Crown copyright and database right <year>. ... Data is
13
+ > also provided by www.rowmaps.com © www.rowmaps.com copyright and database
14
+ > right <year>. This file is released with the Open Government Licence. The
15
+ > preceding attribution statements must be contained in any sub-licences.
16
+
17
+ The pack stores one attribution string per authority (`authorities.attribution`)
18
+ and `check_takeoff_site` prints the attribution of every authority whose paths
19
+ appear in a response. See <https://www.opennetzero.org/> and
20
+ <https://www.nationalarchives.gov.uk/doc/open-government-licence/version/3/>.
package/package.json ADDED
@@ -0,0 +1,114 @@
1
+ {
2
+ "name": "fpv-airspace",
3
+ "version": "0.4.0",
4
+ "description": "MCP server answering where a drone can legally take off and fly in the UK: NATS flight restriction zones, live NOTAMs, public rights of way and landowner rules",
5
+ "type": "module",
6
+ "bin": {
7
+ "fpv-airspace": "dist/index.js"
8
+ },
9
+ "main": "dist/index.js",
10
+ "files": [
11
+ "dist",
12
+ "licences",
13
+ "README.md"
14
+ ],
15
+ "engines": {
16
+ "node": ">=22.13.0"
17
+ },
18
+ "scripts": {
19
+ "build": "tsc -p tsconfig.json --noEmit && node scripts/bundle.mjs",
20
+ "dev": "tsx src/index.ts",
21
+ "prepare": "npm run build",
22
+ "lint": "eslint src pipeline scripts test",
23
+ "lint:fix": "eslint src pipeline scripts test --fix",
24
+ "test": "vitest run",
25
+ "test:coverage": "vitest run --coverage",
26
+ "typecheck": "tsc -p tsconfig.pipeline.json --noEmit",
27
+ "pack:build": "tsx scripts/build-pack.ts",
28
+ "pack:verify": "tsx scripts/verify-pack.ts",
29
+ "pack:fetch-nats": "tsx scripts/fetch-nats.ts",
30
+ "pack:fetch-rowmaps": "tsx scripts/fetch-rowmaps.ts",
31
+ "pack:fetch-nt": "tsx scripts/fetch-nt.ts",
32
+ "pack:fetch-countries": "tsx scripts/fetch-countries.ts",
33
+ "pack:manifest": "tsx scripts/make-manifest.ts",
34
+ "pack:check-upstream": "tsx scripts/check-upstream.ts",
35
+ "mcpb:pack": "npm run build && npx --yes @anthropic-ai/mcpb pack . build/fpv-airspace.mcpb",
36
+ "worker:dev": "wrangler dev",
37
+ "worker:deploy": "wrangler deploy",
38
+ "pack:export-d1": "tsx scripts/export-d1.ts",
39
+ "worker:setup": "scripts/cloudflare-setup.sh",
40
+ "worker:load": "scripts/d1-load.sh",
41
+ "pack:fetch-parking": "tsx scripts/fetch-parking.ts",
42
+ "pack:fetch-hazards": "tsx scripts/fetch-hazards.ts",
43
+ "pack:fetch-access": "tsx scripts/fetch-access.ts",
44
+ "pack:fetch-wales": "tsx scripts/fetch-wales.ts",
45
+ "pack:fetch-forestry": "tsx scripts/fetch-forestry.ts",
46
+ "pack:fetch-lad": "tsx scripts/fetch-lad.ts",
47
+ "pack:fetch-corepaths": "tsx scripts/fetch-corepaths.ts"
48
+ },
49
+ "repository": {
50
+ "type": "git",
51
+ "url": "git+https://github.com/noodlemctwoodle/fpv-airspace.git"
52
+ },
53
+ "keywords": [
54
+ "mcp",
55
+ "model-context-protocol",
56
+ "drone",
57
+ "uas",
58
+ "uk",
59
+ "airspace",
60
+ "notam",
61
+ "flight-restriction-zone",
62
+ "rights-of-way",
63
+ "claude"
64
+ ],
65
+ "author": "Toby Goulden",
66
+ "license": "MIT",
67
+ "devDependencies": {
68
+ "@mapbox/polyline": "^1.2.1",
69
+ "@modelcontextprotocol/sdk": "^1.30.1",
70
+ "@tmcw/togeojson": "^7.1.2",
71
+ "@turf/area": "^7.4.0",
72
+ "@turf/bbox": "^7.4.0",
73
+ "@turf/bbox-polygon": "^7.4.0",
74
+ "@turf/boolean-intersects": "^7.4.0",
75
+ "@turf/boolean-point-in-polygon": "^7.4.0",
76
+ "@turf/boolean-valid": "^7.4.0",
77
+ "@turf/centroid": "^7.4.0",
78
+ "@turf/circle": "^7.4.0",
79
+ "@turf/destination": "^7.4.0",
80
+ "@turf/difference": "^7.4.0",
81
+ "@turf/distance": "^7.4.0",
82
+ "@turf/helpers": "^7.4.0",
83
+ "@turf/intersect": "^7.4.0",
84
+ "@turf/length": "^7.4.0",
85
+ "@turf/line-intersect": "^7.4.0",
86
+ "@turf/line-slice": "^7.4.0",
87
+ "@turf/nearest-point-on-line": "^7.4.0",
88
+ "@turf/point-to-line-distance": "^7.4.0",
89
+ "@turf/rewind": "^7.4.0",
90
+ "@turf/simplify": "^7.4.0",
91
+ "@turf/union": "^7.4.0",
92
+ "@types/express": "^5.0.6",
93
+ "@types/geojson": "^7946.0.16",
94
+ "@types/mapbox__polyline": "^1.0.5",
95
+ "@types/node": "^26.6.2",
96
+ "@types/proj4": "^2.5.6",
97
+ "@typescript-eslint/eslint-plugin": "^8.70.1",
98
+ "@typescript-eslint/parser": "^8.70.1",
99
+ "@vitest/coverage-v8": "^5.0.2",
100
+ "@xmldom/xmldom": "^0.9.12",
101
+ "esbuild": "^0.28.2",
102
+ "eslint": "^10.11.0",
103
+ "express": "^5.2.1",
104
+ "fast-xml-parser": "^5.11.1",
105
+ "fflate": "^0.8.3",
106
+ "proj4": "^2.22.0",
107
+ "tsx": "^4.23.15",
108
+ "typescript": "^6.0.3",
109
+ "vitest": "^5.0.2",
110
+ "wrangler": "^4.141.0",
111
+ "yaml": "^2.9.1",
112
+ "zod": "^4.6.5"
113
+ }
114
+ }