Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add Brownfields, Green Belt areas, and Ramsar sites to constraints check #2710

Merged
merged 5 commits into from
Jan 30, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 67 additions & 46 deletions api.planx.uk/modules/gis/service/local_authorities/metadata/base.ts
Original file line number Diff line number Diff line change
Expand Up @@ -27,25 +27,18 @@ const baseSchema: PlanningConstraintsBaseSchema = {
"digital-land-datasets": ["central-activities-zone"],
category: "General policy",
},
listed: {
brownfieldSite: {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've alphabetised the active datasets while here - apologies it makes for a noisy diff!

active: true,
neg: "is not, or is not within, a Listed Building",
pos: "is, or is within, a Listed Building",
"digital-land-datasets": ["listed-building", "listed-building-outline"], // HE publishes points, LPAs publish polygons
category: "Heritage and conservation",
},
locallyListed: {
active: true,
neg: "is not, or is not within, a Locally Listed Building",
pos: "is, or is within, a Locally Listed Building",
"digital-land-datasets": ["locally-listed-building"],
category: "Heritage and conservation",
neg: "is not on Brownfield land",
pos: "is on Brownfield land",
"digital-land-datasets": ["brownfield-land", "brownfield-site"],
category: "General policy",
},
registeredPark: {
"designated.AONB": {
active: true,
neg: "is not in a Historic Park or Garden",
pos: "is in a Historic Park or Garden",
"digital-land-datasets": ["park-and-garden"],
neg: "is not in an Area of Outstanding Natural Beauty",
pos: "is in an Area of Outstanding Natural Beauty",
"digital-land-datasets": ["area-of-outstanding-natural-beauty"],
category: "Heritage and conservation",
},
"designated.conservationArea": {
Expand All @@ -55,11 +48,11 @@ const baseSchema: PlanningConstraintsBaseSchema = {
"digital-land-datasets": ["conservation-area"],
category: "Heritage and conservation",
},
"designated.AONB": {
"designated.greenBelt": {
active: true,
neg: "is not in an Area of Outstanding Natural Beauty",
pos: "is in an Area of Outstanding Natural Beauty",
"digital-land-datasets": ["area-of-outstanding-natural-beauty"],
neg: "is not in a Green Belt",
pos: "is in a Green Belt",
"digital-land-datasets": ["green-belt"],
category: "Heritage and conservation",
},
"designated.nationalPark": {
Expand All @@ -77,6 +70,13 @@ const baseSchema: PlanningConstraintsBaseSchema = {
"digital-land-entities": [520007], // https://www.planning.data.gov.uk/entity/520007
category: "Heritage and conservation",
},
"designated.SPA": {
active: true,
neg: "is not in a Special Protection Area (SPA)",
pos: "is in a Special Protection Area (SPA)",
"digital-land-datasets": ["special-protection-area"],
category: "Heritage and conservation",
},
"designated.WHS": {
active: true,
neg: "is not an UNESCO World Heritage Site",
Expand All @@ -87,11 +87,25 @@ const baseSchema: PlanningConstraintsBaseSchema = {
],
category: "Heritage and conservation",
},
"designated.SPA": {
flood: {
active: true,
neg: "is not in a Special Protection Area (SPA)",
pos: "is in a Special Protection Area (SPA)",
"digital-land-datasets": ["special-protection-area"],
neg: "is not in a Flood Risk Zone",
pos: "is in a Flood Risk Zone",
"digital-land-datasets": ["flood-risk-zone"],
category: "Flooding",
},
listed: {
active: true,
neg: "is not, or is not within, a Listed Building",
pos: "is, or is within, a Listed Building",
"digital-land-datasets": ["listed-building", "listed-building-outline"], // HE publishes points, LPAs publish polygons
category: "Heritage and conservation",
},
locallyListed: {
active: true,
neg: "is not, or is not within, a Locally Listed Building",
pos: "is, or is within, a Locally Listed Building",
"digital-land-datasets": ["locally-listed-building"],
category: "Heritage and conservation",
},
monument: {
Expand All @@ -101,22 +115,18 @@ const baseSchema: PlanningConstraintsBaseSchema = {
"digital-land-datasets": ["scheduled-monument"],
category: "Heritage and conservation",
},
tpo: {
"nature.ASNW": {
active: true,
neg: "is not in a Tree Preservation Order (TPO) Zone",
pos: "is in a Tree Preservation Order (TPO) Zone",
"digital-land-datasets": [
"tree",
"tree-preservation-order",
"tree-preservation-zone",
], // "tree" is points, "-zone" is polygons
category: "Trees",
neg: "is not in an Ancient Semi-Natural Woodland (ASNW)",
pos: "is in an Ancient Semi-Natural Woodland (ASNW)",
"digital-land-datasets": ["ancient-woodland"],
category: "Ecology",
},
"nature.SSSI": {
"nature.ramsarSite": {
active: true,
neg: "is not a Site of Special Scientific Interest (SSSI)",
pos: "is a Site of Special Scientific Interest (SSSI)",
"digital-land-datasets": ["site-of-special-scientific-interest"],
neg: "is not in a Ramsar Site",
pos: "is in a Ramsar Site",
"digital-land-datasets": ["ramsar"],
category: "Ecology",
},
"nature.SAC": {
Expand All @@ -126,19 +136,30 @@ const baseSchema: PlanningConstraintsBaseSchema = {
"digital-land-datasets": ["special-area-of-conservation"],
category: "Ecology",
},
"nature.ASNW": {
"nature.SSSI": {
active: true,
neg: "is not in an Ancient Semi-Natural Woodland (ASNW)",
pos: "is in an Ancient Semi-Natural Woodland (ASNW)",
"digital-land-datasets": ["ancient-woodland"],
neg: "is not a Site of Special Scientific Interest (SSSI)",
pos: "is a Site of Special Scientific Interest (SSSI)",
"digital-land-datasets": ["site-of-special-scientific-interest"],
category: "Ecology",
},
flood: {
registeredPark: {
active: true,
neg: "is not in a Flood Risk Zone",
pos: "is in a Flood Risk Zone",
"digital-land-datasets": ["flood-risk-zone"],
category: "Flooding",
neg: "is not in a Historic Park or Garden",
pos: "is in a Historic Park or Garden",
"digital-land-datasets": ["park-and-garden"],
category: "Heritage and conservation",
},
tpo: {
active: true,
neg: "is not in a Tree Preservation Order (TPO) Zone",
pos: "is in a Tree Preservation Order (TPO) Zone",
"digital-land-datasets": [
"tree",
"tree-preservation-order",
"tree-preservation-zone",
], // "tree" is points, "-zone" is polygons
category: "Trees",
},
"defence.explosives": {
active: false,
Expand Down
2 changes: 1 addition & 1 deletion api.planx.uk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"private": true,
"dependencies": {
"@airbrake/node": "^2.1.8",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#02c3999",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#aa93cbf",
"@types/isomorphic-fetch": "^0.0.36",
"adm-zip": "^0.5.10",
"aws-sdk": "^2.1467.0",
Expand Down
8 changes: 4 additions & 4 deletions api.planx.uk/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion e2e/tests/api-driven/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
},
"dependencies": {
"@cucumber/cucumber": "^9.3.0",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#02c3999",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#aa93cbf",
"axios": "^1.6.0",
"dotenv": "^16.3.1",
"dotenv-expand": "^10.0.0",
Expand Down
8 changes: 4 additions & 4 deletions e2e/tests/api-driven/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion e2e/tests/ui-driven/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"postinstall": "./install-dependencies.sh"
},
"dependencies": {
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#02c3999",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#aa93cbf",
"axios": "^1.6.2",
"dotenv": "^16.3.1",
"eslint": "^8.56.0",
Expand Down
8 changes: 4 additions & 4 deletions e2e/tests/ui-driven/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion editor.planx.uk/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"@mui/styles": "^5.15.2",
"@mui/utils": "^5.15.2",
"@opensystemslab/map": "^0.8.0",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#02c3999",
"@opensystemslab/planx-core": "git+https://github.com/theopensystemslab/planx-core#aa93cbf",
"@tiptap/core": "^2.0.3",
"@tiptap/extension-bold": "^2.0.3",
"@tiptap/extension-bubble-menu": "^2.1.13",
Expand Down
14 changes: 7 additions & 7 deletions editor.planx.uk/pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading