-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
chore:
PlanningDesignation
enum (#229)
- Loading branch information
1 parent
2829511
commit 26ec5ca
Showing
2 changed files
with
238 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
import {GeoJSON} from 'geojson'; | ||
import {UKResidentialUnitType} from '../enums/ResidentialUnitType'; | ||
import {UKTenureType} from '../enums/TenureType'; | ||
import {Area, URL} from '../../../shared/utils'; | ||
|
||
export type Materials = { | ||
boundary?: string; | ||
door?: string; | ||
lighting?: string; | ||
roof?: string; | ||
surface?: string; | ||
wall?: string; | ||
window?: string; | ||
other?: string; | ||
}; | ||
|
||
export type GeoBoundary = { | ||
site: GeoJSON; | ||
area: Area; | ||
}; | ||
|
||
export type Entity = { | ||
name: string; | ||
description?: string; | ||
source: PlanningDataSource | OSRoadsSource; | ||
}; | ||
|
||
type PlanningDataSource = { | ||
text: 'Planning Data'; | ||
url: URL; | ||
}; | ||
|
||
type OSRoadsSource = { | ||
text: 'Ordnance Survey MasterMap Highways'; | ||
}; | ||
|
||
export type ResidentialUnits = { | ||
total: number; | ||
residential: { | ||
type: UKResidentialUnitType; | ||
tenure: UKTenureType; | ||
bedrooms: number; | ||
identicalUnits: number; | ||
}[]; | ||
}; |
193 changes: 193 additions & 0 deletions
193
types/schemas/prototypeApplication/enums/PlanningDesignation.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,193 @@ | ||
import {Entity} from '../data/shared'; | ||
/** | ||
* @description Article 4 Direction area | ||
*/ | ||
type Article4 = 'article4'; | ||
|
||
/** | ||
* @description Central Activities Zone (CAZ) | ||
*/ | ||
type Article4CAZ = 'article4.caz'; | ||
|
||
/** | ||
* @description Brownfield site | ||
*/ | ||
type BrownfieldSite = 'brownfieldSite'; | ||
|
||
/** | ||
* @description Designated land | ||
*/ | ||
type Designated = 'designated'; | ||
|
||
/** | ||
* @description Area of Outstanding Natural Beauty (AONB) | ||
*/ | ||
type DesignatedAONB = 'designated.AONB'; | ||
|
||
/** | ||
* @description Conservation Area | ||
*/ | ||
type DesignatedConservationArea = 'designated.conservationArea'; | ||
|
||
/** | ||
* @description National Park | ||
*/ | ||
type DesignatedNationalPark = 'designated.nationalPark'; | ||
|
||
/** | ||
* @description National Park - Broads | ||
*/ | ||
type DesignatedNationalParkBroads = 'designated.nationalPark.broads'; | ||
|
||
/** | ||
* @description UNESCO World Heritage Site or buffer zone | ||
*/ | ||
type DesignatedWHS = 'designated.WHS'; | ||
|
||
/** | ||
* @description Flood Risk Zone | ||
*/ | ||
type Flood = 'flood'; | ||
|
||
/** | ||
* @description Flood Risk Zone 1 - Low risk | ||
*/ | ||
type FloodZone1 = 'flood.zone.1'; | ||
|
||
/** | ||
* @description Flood Risk Zone 2 - Medium risk | ||
*/ | ||
type FloodZone2 = 'flood.zone.2'; | ||
|
||
/** | ||
* @description Flood Risk Zone 3 - High risk | ||
*/ | ||
type FloodZone3 = 'flood.zone.3'; | ||
|
||
/** | ||
* @description Green Belt | ||
*/ | ||
type GreenBelt = 'greenBelt'; | ||
|
||
/** | ||
* @description Listed Building | ||
*/ | ||
type Listed = 'listed'; | ||
|
||
/** | ||
* @description Listed Building - Grade I | ||
*/ | ||
type ListedGradeI = 'listed.grade.I'; | ||
|
||
/** | ||
* @description Listed Building - Grade II | ||
*/ | ||
type ListedGradeII = 'listed.grade.II'; | ||
|
||
/** | ||
* @description Listed Building - Grade II* | ||
*/ | ||
type ListedGradeIIStar = 'listed.grade.II*'; | ||
|
||
/** | ||
* @description Locally Listed Building | ||
*/ | ||
type LocallyListed = 'locallyListed'; | ||
|
||
/** | ||
* @description Site of a Scheduled Monument | ||
*/ | ||
type Monument = 'monument'; | ||
|
||
/** | ||
* @description Ancient Semi-Natural Woodland (ASNW) | ||
*/ | ||
type NatureASNW = 'nature.ASNW'; | ||
|
||
/** | ||
* @description Ramsar site | ||
*/ | ||
type NatureRamsarSite = 'nature.ramsarSite'; | ||
|
||
/** | ||
* @description Special Area of Conservation (SAC) | ||
*/ | ||
type NatureSAC = 'nature.SAC'; | ||
|
||
/** | ||
* @description Special Protection Area (SPA) | ||
*/ | ||
type NatureSPA = 'nature.SPA'; | ||
|
||
/** | ||
* @description Site of Special Scientific Interest (SSSI) | ||
*/ | ||
type NatureSSSI = 'nature.SSSI'; | ||
|
||
/** | ||
* @description Historic Park or Garden | ||
*/ | ||
type RegisteredPark = 'registeredPark'; | ||
|
||
/** | ||
* @description Classified Road | ||
*/ | ||
type RoadClassified = 'road.classified'; | ||
|
||
/** | ||
* @description Tree Preservation Order (TPO) or zone | ||
*/ | ||
type TPO = 'tpo'; | ||
|
||
type BasePlanningDesignation = | ||
| Article4 | ||
| Article4CAZ | ||
| BrownfieldSite | ||
| Designated | ||
| DesignatedAONB | ||
| DesignatedConservationArea | ||
| DesignatedNationalPark | ||
| DesignatedNationalParkBroads | ||
| DesignatedWHS | ||
| Flood | ||
| FloodZone1 | ||
| FloodZone2 | ||
| FloodZone3 | ||
| GreenBelt | ||
| Listed | ||
| ListedGradeI | ||
| ListedGradeII | ||
| ListedGradeIIStar | ||
| LocallyListed | ||
| Monument | ||
| NatureASNW | ||
| NatureRamsarSite | ||
| NatureSAC | ||
| NatureSPA | ||
| NatureSSSI | ||
| RegisteredPark | ||
| RoadClassified | ||
| TPO; | ||
|
||
/** | ||
* @description A planning designation that does not intersect with the proposed site, per the DE-9IM spatial relationship definition of intersects | ||
*/ | ||
type NonIntersectingPlanningDesignation = { | ||
intersects: false; | ||
} & BasePlanningDesignation; | ||
|
||
/** | ||
* @description A planning designation that does intersect with the proposed site, per the DE-9IM spatial relationship definition of intersects | ||
*/ | ||
type IntersectingPlanningDesignation = { | ||
intersects: true; | ||
entities?: Entity[]; | ||
} & BasePlanningDesignation; | ||
|
||
/** | ||
* @id #PlanningDesignation | ||
* @description Planning designations that may intersect with the proposed site determined by spatial queries against Planning Data (planning.data.gov.uk) and Ordnance Survey | ||
*/ | ||
export type PlanningDesignation = | ||
| NonIntersectingPlanningDesignation | ||
| IntersectingPlanningDesignation; |