From 0a8db0635bba44553b8a27fc3b0293ca4c37b996 Mon Sep 17 00:00:00 2001 From: Jessica McInchak Date: Tue, 10 Oct 2023 20:14:38 +0100 Subject: [PATCH] fix: update `data.property.constraints.planning` and more based on feedback (#50) --- examples/data/ldcE.ts | 841 +----- examples/data/ldcP.ts | 5 +- examples/data/planningPermission.ts | 5 +- examples/data/priorApproval.ts | 77 +- ...dLawfulDevelopmentCertificateExisting.json | 842 +----- ...dLawfulDevelopmentCertificateProposed.json | 5 +- examples/validPlanningPermission.json | 5 +- examples/validPriorApproval.json | 73 +- schema/schema.json | 2389 ++++++++++++++++- types/enums/PlanningConstraints.ts | 7 +- types/schema/data/Property.ts | 44 +- types/schema/data/Proposal.ts | 16 +- 12 files changed, 2391 insertions(+), 1918 deletions(-) diff --git a/examples/data/ldcE.ts b/examples/data/ldcE.ts index ad4985c3..2c0ea60b 100644 --- a/examples/data/ldcE.ts +++ b/examples/data/ldcE.ts @@ -100,6 +100,7 @@ export const validLDCE: Schema = { x: 489320, y: 200872, title: 'GIPSY HOUSE, WHITEFIELD LANE, GREAT MISSENDEN', + singleLine: 'GIPSY HOUSE, WHITEFIELD LANE, GREAT MISSENDEN, HP16 0BP', source: 'Ordnance Survey', uprn: '100081174436', usrn: '07300709', @@ -173,9 +174,19 @@ export const validLDCE: Schema = { description: 'Article 4 Direction area', overlaps: true, entities: [ - 'Whole District excluding the Town of Chesham - Poultry production. - Bucks County Council Town and Country Planning Act 1947 Town and Country Planning General Development Order 1950. Re Whole District excluding the Town of Chesham. In relation to poultry production.', + { + name: 'Whole District excluding the Town of Chesham - Poultry production.', + description: + 'Bucks County Council Town and Country Planning Act 1947 Town and Country Planning General Development Order 1950. Re Whole District excluding the Town of Chesham. In relation to poultry production.', + source: 'https://www.planning.data.gov.uk/entity/7010002192', + }, ], }, + { + value: 'article4.caz', + description: 'Central Activities Zone (CAZ)', + overlaps: false, + }, { value: 'monument', description: 'Site of a Scheduled Monument', @@ -226,7 +237,7 @@ export const validLDCE: Schema = { value: 'designated.AONB', description: 'Area of Outstanding Natural Beauty (AONB)', overlaps: true, - entities: ['Chilterns'], + entities: [{name: 'Chilterns'}], }, { value: 'designated.nationalPark', @@ -238,837 +249,11 @@ export const validLDCE: Schema = { description: 'Conservation Area', overlaps: false, }, - { - value: 'article4.buckinghamshire.caz', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.os262', - description: 'Article 4 Direction area', - overlaps: false, - }, { value: 'designated.nationalPark.broads', description: 'National Park - Broads', overlaps: false, }, - { - value: 'article4.buckinghamshire.fulmer', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.os1178', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.os3100', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.os4729', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.os5200', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.os6961', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.os8050', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.os8349', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.ivylane', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.piggery', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.poultry', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.millfarm', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.os3313.a', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.os3313.b', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.pennroad', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.pennwood', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.bourneend', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.deanfield', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.ferrylane', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.fourwinds', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.lodgelane', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.manorfarm', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.northA404', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.northpark', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.rockylane', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.southA413', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.wigginton', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.DO10fulmer', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.bakerswood', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.botleyroad', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.churchlane', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.commonwood', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.greenacres', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.purtonlane', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.saunderton', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.sedgesfarm', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.valleyroad', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.widmerfarm', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.wiltonlane', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.wyburnwood', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.burtonslane', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.cheshamroad', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.collumgreen', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.georgegreen', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.gravellyway', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.hampdenroad', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.lakeendroad', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.rearuplands', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.turnerswood', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.wellcottage', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.winslowroad', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.amershamroad', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.boismoorroad', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.boundaryroad', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.bridgestreet', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.eastvaleroad', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.johnsonsfarm', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.officetoresi', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.ruralwycombe', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.stokenchurch', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.wooburngreen', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.asheridgeroad', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.ballingerroad', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.coneybankwood', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.ferrylaneagri', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.lodgelaneagri', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.ministrywharf', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.northlongpark', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.shepherdsfold', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.southkilnlane', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.southsidekiln', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.threeoaksfarm', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.twyfordgrange', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.beamondendfarm', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.chartridgelane', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.commonwoodagri', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.cryershillroad', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.dorneywoodroad', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.eastjasonshill', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.eastmarishlane', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.littlekingsash', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.parkspringwood', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.pednorhighroad', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.piddingtonroad', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.ruralaylesbury', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.sibleyscoppice', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.turvillevalley', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.wyburnwoodagri', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.blackthornelane', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.eastjordanslane', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.fulmerplacefarm', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.hollybushcorner', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.mansionlanewest', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.parslowshillock', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.southchartridge', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.southswanbottom', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.woodlandsmeadow', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.amershamroadeast', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.bangorsroadnorth', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.broadviewchesham', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.mansionlanesouth', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.northjordansfarm', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.northorbitalroad', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.northwelderslane', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.potterrowcaravan', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.robertswooddrive', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.westwexhamstreet', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.wycombeheathfarm', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.collegeplantation', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.eastlodgelaneagri', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.greenstreetfarm.a', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.greenstreetfarm.b', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.pednorroadcaravan', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.sheepcotedellroad', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.skimmersorchard.a', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.skimmersorchard.b', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.skimmersorchard.c', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.weststhubertslane', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.ballingerroadnorth', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.bovingdonheights.a', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.bovingdonheights.b', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.commonwoodpennroad', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.eastlatimervillage', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.lodgelaneenclosure', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.phillipshillfarm.a', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.phillipshillfarm.b', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.potterrowenclosure', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.southeastfinchlane', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.southpenfoldlane.a', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.southpenfoldlane.b', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.southsheepcoteroad', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.wyburnwoodforestry', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.bryantsbottomroad.a', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.bryantsbottomroad.b', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.commonwoodenclosure', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.greenstreetfarmagri', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.northsidesevenhills', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.pednorroadenclosure', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.bakerswoodbrokengate', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.eastlodgelanecaravan', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.southlittlemissenden', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.westledgelanecaravan', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.wholedistrictpoultry', - description: 'Article 4 Direction area', - overlaps: true, - entities: [], - }, - { - value: 'article4.buckinghamshire.chalklaneanhydehealth', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.commonwoodandpennroad', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.copperkinslanecaravan', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.junctionhughendenroad', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.nightingaleslanestrip', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.pednorroaddrydelllane', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.southpenfoldlaneOS262', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.eastamershamroadOS0006', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.eastamershamroadOS9269', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.lodgelanewestenclosure', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.northandsouthhollowway', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.chessfieldparkenclosure', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.cooperkinslaneenclosure', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.wycombeheathfarmcaravan', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.coppicesouthheathcaravan', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.pednorroadanddrydelllane', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.northballingerroadvaravan', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.potkilnlaneandlaytersgreen', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.wycombehealthfarmnortheast', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.buckinghamshire.wycombehealthfarmspurlands', - description: 'Article 4 Direction area', - overlaps: false, - }, { value: 'road.classified', description: 'Classified Road', diff --git a/examples/data/ldcP.ts b/examples/data/ldcP.ts index 3668b724..192a3077 100644 --- a/examples/data/ldcP.ts +++ b/examples/data/ldcP.ts @@ -61,6 +61,7 @@ export const validLDCP: Schema = { x: 493822, y: 191603, title: '7, BLYTON CLOSE, BEACONSFIELD', + singleLine: '7, BLYTON CLOSE, BEACONSFIELD, HP9 2LX', source: 'Ordnance Survey', uprn: '100080482163', usrn: '35200844', @@ -175,8 +176,8 @@ export const validLDCP: Schema = { overlaps: false, }, { - value: 'article4.buckinghamshire.caz', - description: 'Article 4 Direction area', + value: 'article4.caz', + description: 'Central Activities Zone (CAZ)', overlaps: false, }, { diff --git a/examples/data/planningPermission.ts b/examples/data/planningPermission.ts index b22c37cf..15a54a65 100644 --- a/examples/data/planningPermission.ts +++ b/examples/data/planningPermission.ts @@ -85,6 +85,7 @@ export const validPlanningPermission: Schema = { x: 530787, y: 175754, title: '40, STANSFIELD ROAD, LONDON', + singleLine: '40, STANSFIELD ROAD, LONDON, SW9 9RZ', source: 'Ordnance Survey', uprn: '100021892955', usrn: '21901294', @@ -183,8 +184,8 @@ export const validPlanningPermission: Schema = { overlaps: false, }, { - value: 'article4.lambeth.caz', - description: 'Article 4 Direction area', + value: 'article4.caz', + description: 'Central Activities Zone (CAZ)', overlaps: false, }, { diff --git a/examples/data/priorApproval.ts b/examples/data/priorApproval.ts index 16b98f96..244b32d5 100644 --- a/examples/data/priorApproval.ts +++ b/examples/data/priorApproval.ts @@ -65,6 +65,8 @@ export const validPriorApproval: Schema = { y: 180515, title: 'INTERNATIONAL SHAKESPEARE GLOBE CENTRE LTD, SHAKESPEARE GLOBE THEATRE, 21, NEW GLOBE WALK, LONDON', + singleLine: + 'INTERNATIONAL SHAKESPEARE GLOBE CENTRE LTD, SHAKESPEARE GLOBE THEATRE, 21, NEW GLOBE WALK, LONDON, SE1 9DT', source: 'Ordnance Survey', uprn: '200003377200', usrn: '22503078', @@ -115,11 +117,36 @@ export const validPriorApproval: Schema = { description: 'Article 4 Direction area', overlaps: true, entities: [ - 'Central Activities Zone - Change of use from offices to dwelling houses is restricted', - 'Central Activities Zone - Demolition of commercial buildings and construction of new dwellinghouses is restricted', - 'Bankside and Borough District Town Centre - Demolition of commercial buildings and construction of new dwellinghouses is restricted', - 'Central Activities Zone - Change of use from Class E to residential is restricted', - 'Bankside and Borough District Town Centre - Change of use from Class E to residential is restricted', + { + name: 'Central Activities Zone', + description: + 'Change of use from offices to dwelling houses is restricted', + source: 'https://www.planning.data.gov.uk/entity/7010000942', + }, + { + name: 'Central Activities Zone', + description: + 'Demolition of commercial buildings and construction of new dwellinghouses is restricted', + source: 'https://www.planning.data.gov.uk/entity/7010000944', + }, + { + name: 'Bankside and Borough District Town Centre', + description: + 'Demolition of commercial buildings and construction of new dwellinghouses is restricted', + source: 'https://www.planning.data.gov.uk/entity/7010001042', + }, + { + name: 'Central Activities Zone', + description: + 'Change of use from Class E to residential is restricted', + source: 'https://www.planning.data.gov.uk/entity/7010001055', + }, + { + name: 'Bankside and Borough District Town Centre', + description: + 'Change of use from Class E to residential is restricted', + source: 'https://www.planning.data.gov.uk/entity/7010001153', + }, ], }, { @@ -173,57 +200,21 @@ export const validPriorApproval: Schema = { overlaps: false, }, { - value: 'article4.southwark.MA', - description: 'Article 4 Direction area', + value: 'article4.caz', + description: 'Central Activities Zone (CAZ)', overlaps: true, entities: [], }, - { - value: 'article4.southwark.caz', - description: 'Article 4 Direction area', - overlaps: true, - entities: [''], - }, - { - value: 'article4.southwark.hmo', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'designated.nationalPark', - description: 'National Park', - overlaps: false, - }, - { - value: 'article4.southwark.sunray', - description: 'Article 4 Direction area', - overlaps: false, - }, - { - value: 'article4.southwark.railway', - description: 'Article 4 Direction area', - overlaps: false, - }, { value: 'designated.conservationArea', description: 'Conservation Area', overlaps: false, }, - { - value: 'article4.southwark.publichouse', - description: 'Article 4 Direction area', - overlaps: false, - }, { value: 'designated.nationalPark.broads', description: 'National Park - Broads', overlaps: false, }, - { - value: 'article4.southwark.southernrail', - description: 'Article 4 Direction area', - overlaps: false, - }, { value: 'road.classified', description: 'Classified Road', diff --git a/examples/validLawfulDevelopmentCertificateExisting.json b/examples/validLawfulDevelopmentCertificateExisting.json index 574d9522..a99baf8c 100644 --- a/examples/validLawfulDevelopmentCertificateExisting.json +++ b/examples/validLawfulDevelopmentCertificateExisting.json @@ -98,6 +98,7 @@ "x": 489320, "y": 200872, "title": "GIPSY HOUSE, WHITEFIELD LANE, GREAT MISSENDEN", + "singleLine": "GIPSY HOUSE, WHITEFIELD LANE, GREAT MISSENDEN, HP16 0BP", "source": "Ordnance Survey", "uprn": "100081174436", "usrn": "07300709", @@ -264,9 +265,18 @@ "description": "Article 4 Direction area", "overlaps": true, "entities": [ - "Whole District excluding the Town of Chesham - Poultry production. - Bucks County Council Town and Country Planning Act 1947 Town and Country Planning General Development Order 1950. Re Whole District excluding the Town of Chesham. In relation to poultry production." + { + "name": "Whole District excluding the Town of Chesham - Poultry production.", + "description": "Bucks County Council Town and Country Planning Act 1947 Town and Country Planning General Development Order 1950. Re Whole District excluding the Town of Chesham. In relation to poultry production.", + "source": "https://www.planning.data.gov.uk/entity/7010002192" + } ] }, + { + "value": "article4.caz", + "description": "Central Activities Zone (CAZ)", + "overlaps": false + }, { "value": "monument", "description": "Site of a Scheduled Monument", @@ -318,7 +328,9 @@ "description": "Area of Outstanding Natural Beauty (AONB)", "overlaps": true, "entities": [ - "Chilterns" + { + "name": "Chilterns" + } ] }, { @@ -331,837 +343,11 @@ "description": "Conservation Area", "overlaps": false }, - { - "value": "article4.buckinghamshire.caz", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.os262", - "description": "Article 4 Direction area", - "overlaps": false - }, { "value": "designated.nationalPark.broads", "description": "National Park - Broads", "overlaps": false }, - { - "value": "article4.buckinghamshire.fulmer", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.os1178", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.os3100", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.os4729", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.os5200", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.os6961", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.os8050", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.os8349", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.ivylane", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.piggery", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.poultry", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.millfarm", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.os3313.a", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.os3313.b", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.pennroad", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.pennwood", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.bourneend", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.deanfield", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.ferrylane", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.fourwinds", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.lodgelane", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.manorfarm", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.northA404", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.northpark", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.rockylane", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.southA413", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.wigginton", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.DO10fulmer", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.bakerswood", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.botleyroad", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.churchlane", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.commonwood", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.greenacres", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.purtonlane", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.saunderton", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.sedgesfarm", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.valleyroad", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.widmerfarm", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.wiltonlane", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.wyburnwood", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.burtonslane", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.cheshamroad", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.collumgreen", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.georgegreen", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.gravellyway", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.hampdenroad", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.lakeendroad", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.rearuplands", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.turnerswood", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.wellcottage", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.winslowroad", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.amershamroad", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.boismoorroad", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.boundaryroad", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.bridgestreet", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.eastvaleroad", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.johnsonsfarm", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.officetoresi", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.ruralwycombe", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.stokenchurch", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.wooburngreen", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.asheridgeroad", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.ballingerroad", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.coneybankwood", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.ferrylaneagri", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.lodgelaneagri", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.ministrywharf", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.northlongpark", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.shepherdsfold", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.southkilnlane", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.southsidekiln", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.threeoaksfarm", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.twyfordgrange", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.beamondendfarm", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.chartridgelane", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.commonwoodagri", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.cryershillroad", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.dorneywoodroad", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.eastjasonshill", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.eastmarishlane", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.littlekingsash", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.parkspringwood", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.pednorhighroad", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.piddingtonroad", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.ruralaylesbury", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.sibleyscoppice", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.turvillevalley", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.wyburnwoodagri", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.blackthornelane", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.eastjordanslane", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.fulmerplacefarm", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.hollybushcorner", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.mansionlanewest", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.parslowshillock", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.southchartridge", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.southswanbottom", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.woodlandsmeadow", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.amershamroadeast", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.bangorsroadnorth", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.broadviewchesham", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.mansionlanesouth", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.northjordansfarm", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.northorbitalroad", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.northwelderslane", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.potterrowcaravan", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.robertswooddrive", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.westwexhamstreet", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.wycombeheathfarm", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.collegeplantation", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.eastlodgelaneagri", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.greenstreetfarm.a", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.greenstreetfarm.b", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.pednorroadcaravan", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.sheepcotedellroad", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.skimmersorchard.a", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.skimmersorchard.b", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.skimmersorchard.c", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.weststhubertslane", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.ballingerroadnorth", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.bovingdonheights.a", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.bovingdonheights.b", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.commonwoodpennroad", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.eastlatimervillage", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.lodgelaneenclosure", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.phillipshillfarm.a", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.phillipshillfarm.b", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.potterrowenclosure", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.southeastfinchlane", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.southpenfoldlane.a", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.southpenfoldlane.b", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.southsheepcoteroad", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.wyburnwoodforestry", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.bryantsbottomroad.a", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.bryantsbottomroad.b", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.commonwoodenclosure", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.greenstreetfarmagri", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.northsidesevenhills", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.pednorroadenclosure", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.bakerswoodbrokengate", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.eastlodgelanecaravan", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.southlittlemissenden", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.westledgelanecaravan", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.wholedistrictpoultry", - "description": "Article 4 Direction area", - "overlaps": true, - "entities": [] - }, - { - "value": "article4.buckinghamshire.chalklaneanhydehealth", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.commonwoodandpennroad", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.copperkinslanecaravan", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.junctionhughendenroad", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.nightingaleslanestrip", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.pednorroaddrydelllane", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.southpenfoldlaneOS262", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.eastamershamroadOS0006", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.eastamershamroadOS9269", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.lodgelanewestenclosure", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.northandsouthhollowway", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.chessfieldparkenclosure", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.cooperkinslaneenclosure", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.wycombeheathfarmcaravan", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.coppicesouthheathcaravan", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.pednorroadanddrydelllane", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.northballingerroadvaravan", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.potkilnlaneandlaytersgreen", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.wycombehealthfarmnortheast", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.buckinghamshire.wycombehealthfarmspurlands", - "description": "Article 4 Direction area", - "overlaps": false - }, { "value": "road.classified", "description": "Classified Road", diff --git a/examples/validLawfulDevelopmentCertificateProposed.json b/examples/validLawfulDevelopmentCertificateProposed.json index 9bed2a00..da18556f 100644 --- a/examples/validLawfulDevelopmentCertificateProposed.json +++ b/examples/validLawfulDevelopmentCertificateProposed.json @@ -59,6 +59,7 @@ "x": 493822, "y": 191603, "title": "7, BLYTON CLOSE, BEACONSFIELD", + "singleLine": "7, BLYTON CLOSE, BEACONSFIELD, HP9 2LX", "source": "Ordnance Survey", "uprn": "100080482163", "usrn": "35200844", @@ -206,8 +207,8 @@ "overlaps": false }, { - "value": "article4.buckinghamshire.caz", - "description": "Article 4 Direction area", + "value": "article4.caz", + "description": "Central Activities Zone (CAZ)", "overlaps": false }, { diff --git a/examples/validPlanningPermission.json b/examples/validPlanningPermission.json index 5e08440f..a7b52660 100644 --- a/examples/validPlanningPermission.json +++ b/examples/validPlanningPermission.json @@ -83,6 +83,7 @@ "x": 530787, "y": 175754, "title": "40, STANSFIELD ROAD, LONDON", + "singleLine": "40, STANSFIELD ROAD, LONDON, SW9 9RZ", "source": "Ordnance Survey", "uprn": "100021892955", "usrn": "21901294", @@ -196,8 +197,8 @@ "overlaps": false }, { - "value": "article4.lambeth.caz", - "description": "Article 4 Direction area", + "value": "article4.caz", + "description": "Central Activities Zone (CAZ)", "overlaps": false }, { diff --git a/examples/validPriorApproval.json b/examples/validPriorApproval.json index d8de3097..1b78e572 100644 --- a/examples/validPriorApproval.json +++ b/examples/validPriorApproval.json @@ -61,6 +61,7 @@ "x": 532192, "y": 180515, "title": "INTERNATIONAL SHAKESPEARE GLOBE CENTRE LTD, SHAKESPEARE GLOBE THEATRE, 21, NEW GLOBE WALK, LONDON", + "singleLine": "INTERNATIONAL SHAKESPEARE GLOBE CENTRE LTD, SHAKESPEARE GLOBE THEATRE, 21, NEW GLOBE WALK, LONDON, SE1 9DT", "source": "Ordnance Survey", "uprn": "200003377200", "usrn": "22503078", @@ -135,11 +136,31 @@ "description": "Article 4 Direction area", "overlaps": true, "entities": [ - "Central Activities Zone - Change of use from offices to dwelling houses is restricted", - "Central Activities Zone - Demolition of commercial buildings and construction of new dwellinghouses is restricted", - "Bankside and Borough District Town Centre - Demolition of commercial buildings and construction of new dwellinghouses is restricted", - "Central Activities Zone - Change of use from Class E to residential is restricted", - "Bankside and Borough District Town Centre - Change of use from Class E to residential is restricted" + { + "name": "Central Activities Zone", + "description": "Change of use from offices to dwelling houses is restricted", + "source": "https://www.planning.data.gov.uk/entity/7010000942" + }, + { + "name": "Central Activities Zone", + "description": "Demolition of commercial buildings and construction of new dwellinghouses is restricted", + "source": "https://www.planning.data.gov.uk/entity/7010000944" + }, + { + "name": "Bankside and Borough District Town Centre", + "description": "Demolition of commercial buildings and construction of new dwellinghouses is restricted", + "source": "https://www.planning.data.gov.uk/entity/7010001042" + }, + { + "name": "Central Activities Zone", + "description": "Change of use from Class E to residential is restricted", + "source": "https://www.planning.data.gov.uk/entity/7010001055" + }, + { + "name": "Bankside and Borough District Town Centre", + "description": "Change of use from Class E to residential is restricted", + "source": "https://www.planning.data.gov.uk/entity/7010001153" + } ] }, { @@ -193,59 +214,21 @@ "overlaps": false }, { - "value": "article4.southwark.MA", - "description": "Article 4 Direction area", + "value": "article4.caz", + "description": "Central Activities Zone (CAZ)", "overlaps": true, "entities": [] }, - { - "value": "article4.southwark.caz", - "description": "Article 4 Direction area", - "overlaps": true, - "entities": [ - "" - ] - }, - { - "value": "article4.southwark.hmo", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "designated.nationalPark", - "description": "National Park", - "overlaps": false - }, - { - "value": "article4.southwark.sunray", - "description": "Article 4 Direction area", - "overlaps": false - }, - { - "value": "article4.southwark.railway", - "description": "Article 4 Direction area", - "overlaps": false - }, { "value": "designated.conservationArea", "description": "Conservation Area", "overlaps": false }, - { - "value": "article4.southwark.publichouse", - "description": "Article 4 Direction area", - "overlaps": false - }, { "value": "designated.nationalPark.broads", "description": "National Park - Broads", "overlaps": false }, - { - "value": "article4.southwark.southernrail", - "description": "Article 4 Direction area", - "overlaps": false - }, { "value": "road.classified", "description": "Classified Road", diff --git a/schema/schema.json b/schema/schema.json index 8d35502f..c347350f 100644 --- a/schema/schema.json +++ b/schema/schema.json @@ -1951,6 +1951,22 @@ ], "type": "object" }, + "count": { + "additionalProperties": false, + "properties": { + "existing": { + "type": "number" + }, + "proposed": { + "type": "number" + } + }, + "required": [ + "existing", + "proposed" + ], + "type": "object" + }, "disabled": { "additionalProperties": false, "properties": { @@ -2027,6 +2043,9 @@ "type": "object" } }, + "required": [ + "count" + ], "type": "object" }, "onStreet": { @@ -2057,6 +2076,22 @@ ], "type": "object" }, + "count": { + "additionalProperties": false, + "properties": { + "existing": { + "type": "number" + }, + "proposed": { + "type": "number" + } + }, + "required": [ + "existing", + "proposed" + ], + "type": "object" + }, "disabled": { "additionalProperties": false, "properties": { @@ -2133,6 +2168,9 @@ "type": "object" } }, + "required": [ + "count" + ], "type": "object" } }, @@ -2424,173 +2462,2226 @@ "schema": { "additionalProperties": false, "properties": { - "url": { - "$ref": "#/definitions/URL" + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "url" + ], + "type": "object" + }, + "service": { + "$id": "#DigitalPlanningMetadata", + "additionalProperties": false, + "description": "Details of the digital planning service which sent the application", + "properties": { + "flowId": { + "anyOf": [ + { + "$ref": "#/definitions/UUID" + }, + { + "type": "string" + } + ] + }, + "name": { + "type": "string" + }, + "owner": { + "type": "string" + }, + "publishedFlowId": { + "type": "number" + }, + "url": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "flowId", + "publishedFlowId", + "name", + "owner", + "url" + ], + "type": "object" + }, + "session": { + "additionalProperties": false, + "properties": { + "createdAt": { + "$ref": "#/definitions/DateTime" + }, + "id": { + "anyOf": [ + { + "$ref": "#/definitions/UUID" + }, + { + "type": "string" + } + ] + }, + "source": { + "const": "PlanX", + "default": "PlanX", + "type": "string" + }, + "submittedAt": { + "$ref": "#/definitions/DateTime" + } + }, + "required": [ + "source", + "id", + "createdAt" + ], + "type": "object" + } + }, + "required": [ + "service", + "session", + "schema" + ], + "type": "object" + }, + "OSAddress": { + "$id": "#OSAddress", + "additionalProperties": false, + "description": "Address information for sites with a known address sourced from Ordnance Survey AddressBase Premium", + "properties": { + "latitude": { + "type": "number" + }, + "longitude": { + "type": "number" + }, + "organisation": { + "type": "string" + }, + "pao": { + "type": "string" + }, + "postcode": { + "type": "string" + }, + "singleLine": { + "type": "string" + }, + "source": { + "const": "Ordnance Survey", + "type": "string" + }, + "street": { + "type": "string" + }, + "title": { + "type": "string" + }, + "town": { + "type": "string" + }, + "uprn": { + "type": "string" + }, + "usrn": { + "type": "string" + }, + "x": { + "type": "number" + }, + "y": { + "type": "number" + } + }, + "required": [ + "latitude", + "longitude", + "pao", + "postcode", + "singleLine", + "source", + "street", + "title", + "town", + "uprn", + "usrn", + "x", + "y" + ], + "type": "object" + }, + "PlanningConstraint": { + "$id": "#PlanningConstraint", + "anyOf": [ + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Article 4 Direction area", + "type": "string" + }, + "overlaps": { + "const": false, + "type": "boolean" + }, + "value": { + "const": "article4", + "type": "string" + } + }, + "required": [ + "description", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Central Activities Zone (CAZ)", + "type": "string" + }, + "overlaps": { + "const": false, + "type": "boolean" + }, + "value": { + "const": "article4.caz", + "type": "string" + } + }, + "required": [ + "description", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Designated land", + "type": "string" + }, + "overlaps": { + "const": false, + "type": "boolean" + }, + "value": { + "const": "designated", + "type": "string" + } + }, + "required": [ + "description", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Area of Outstanding Natural Beauty (AONB)", + "type": "string" + }, + "overlaps": { + "const": false, + "type": "boolean" + }, + "value": { + "const": "designated.AONB", + "type": "string" + } + }, + "required": [ + "description", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Conservation Area", + "type": "string" + }, + "overlaps": { + "const": false, + "type": "boolean" + }, + "value": { + "const": "designated.conservationArea", + "type": "string" + } + }, + "required": [ + "description", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "National Park", + "type": "string" + }, + "overlaps": { + "const": false, + "type": "boolean" + }, + "value": { + "const": "designated.nationalPark", + "type": "string" + } + }, + "required": [ + "description", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "National Park - Broads", + "type": "string" + }, + "overlaps": { + "const": false, + "type": "boolean" + }, + "value": { + "const": "designated.nationalPark.broads", + "type": "string" + } + }, + "required": [ + "description", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Special Protection Area (SPA)", + "type": "string" + }, + "overlaps": { + "const": false, + "type": "boolean" + }, + "value": { + "const": "designated.SPA", + "type": "string" + } + }, + "required": [ + "description", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "UNESCO World Heritage Site or buffer zone", + "type": "string" + }, + "overlaps": { + "const": false, + "type": "boolean" + }, + "value": { + "const": "designated.WHS", + "type": "string" + } + }, + "required": [ + "description", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Flood Risk Zone", + "type": "string" + }, + "overlaps": { + "const": false, + "type": "boolean" + }, + "value": { + "const": "flood", + "type": "string" + } + }, + "required": [ + "description", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Flood Risk Zone 1 - Low risk", + "type": "string" + }, + "overlaps": { + "const": false, + "type": "boolean" + }, + "value": { + "const": "flood.zone.1", + "type": "string" + } + }, + "required": [ + "description", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Flood Risk Zone 2 - Medium risk", + "type": "string" + }, + "overlaps": { + "const": false, + "type": "boolean" + }, + "value": { + "const": "flood.zone.2", + "type": "string" + } + }, + "required": [ + "description", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Flood Risk Zone 3 - High risk", + "type": "string" + }, + "overlaps": { + "const": false, + "type": "boolean" + }, + "value": { + "const": "flood.zone.3", + "type": "string" + } + }, + "required": [ + "description", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Listed Building", + "type": "string" + }, + "overlaps": { + "const": false, + "type": "boolean" + }, + "value": { + "const": "listed", + "type": "string" + } + }, + "required": [ + "description", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Locally Listed Building", + "type": "string" + }, + "overlaps": { + "const": false, + "type": "boolean" + }, + "value": { + "const": "locallyListed", + "type": "string" + } + }, + "required": [ + "description", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Site of a Scheduled Monument", + "type": "string" + }, + "overlaps": { + "const": false, + "type": "boolean" + }, + "value": { + "const": "monument", + "type": "string" + } + }, + "required": [ + "description", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Ancient Semi-Natural Woodland (ASNW)", + "type": "string" + }, + "overlaps": { + "const": false, + "type": "boolean" + }, + "value": { + "const": "nature.ASNW", + "type": "string" + } + }, + "required": [ + "description", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Special Area of Conservation (SAC)", + "type": "string" + }, + "overlaps": { + "const": false, + "type": "boolean" + }, + "value": { + "const": "nature.SAC", + "type": "string" + } + }, + "required": [ + "description", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Site of Special Scientific Interest (SSSI)", + "type": "string" + }, + "overlaps": { + "const": false, + "type": "boolean" + }, + "value": { + "const": "nature.SSSI", + "type": "string" + } + }, + "required": [ + "description", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Historic Park or Garden", + "type": "string" + }, + "overlaps": { + "const": false, + "type": "boolean" + }, + "value": { + "const": "registeredPark", + "type": "string" + } + }, + "required": [ + "description", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Classified Road", + "type": "string" + }, + "overlaps": { + "const": false, + "type": "boolean" + }, + "value": { + "const": "road.classified", + "type": "string" + } + }, + "required": [ + "description", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Tree Preservation Order (TPO) or zone", + "type": "string" + }, + "overlaps": { + "const": false, + "type": "boolean" + }, + "value": { + "const": "tpo", + "type": "string" + } + }, + "required": [ + "description", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Article 4 Direction area", + "type": "string" + }, + "entities": { + "anyOf": [ + { + "items": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "source": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array" + }, + { + "maxItems": 0, + "minItems": 0, + "type": "array" + } + ] + }, + "overlaps": { + "const": true, + "type": "boolean" + }, + "value": { + "const": "article4", + "type": "string" + } + }, + "required": [ + "description", + "entities", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Central Activities Zone (CAZ)", + "type": "string" + }, + "entities": { + "anyOf": [ + { + "items": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "source": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array" + }, + { + "maxItems": 0, + "minItems": 0, + "type": "array" + } + ] + }, + "overlaps": { + "const": true, + "type": "boolean" + }, + "value": { + "const": "article4.caz", + "type": "string" + } + }, + "required": [ + "description", + "entities", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Designated land", + "type": "string" + }, + "entities": { + "anyOf": [ + { + "items": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "source": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array" + }, + { + "maxItems": 0, + "minItems": 0, + "type": "array" + } + ] + }, + "overlaps": { + "const": true, + "type": "boolean" + }, + "value": { + "const": "designated", + "type": "string" + } + }, + "required": [ + "description", + "entities", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Area of Outstanding Natural Beauty (AONB)", + "type": "string" + }, + "entities": { + "anyOf": [ + { + "items": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "source": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array" + }, + { + "maxItems": 0, + "minItems": 0, + "type": "array" + } + ] + }, + "overlaps": { + "const": true, + "type": "boolean" + }, + "value": { + "const": "designated.AONB", + "type": "string" + } + }, + "required": [ + "description", + "entities", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Conservation Area", + "type": "string" + }, + "entities": { + "anyOf": [ + { + "items": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "source": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array" + }, + { + "maxItems": 0, + "minItems": 0, + "type": "array" + } + ] + }, + "overlaps": { + "const": true, + "type": "boolean" + }, + "value": { + "const": "designated.conservationArea", + "type": "string" + } + }, + "required": [ + "description", + "entities", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "National Park", + "type": "string" + }, + "entities": { + "anyOf": [ + { + "items": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "source": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array" + }, + { + "maxItems": 0, + "minItems": 0, + "type": "array" + } + ] + }, + "overlaps": { + "const": true, + "type": "boolean" + }, + "value": { + "const": "designated.nationalPark", + "type": "string" + } + }, + "required": [ + "description", + "entities", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "National Park - Broads", + "type": "string" + }, + "entities": { + "anyOf": [ + { + "items": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "source": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array" + }, + { + "maxItems": 0, + "minItems": 0, + "type": "array" + } + ] + }, + "overlaps": { + "const": true, + "type": "boolean" + }, + "value": { + "const": "designated.nationalPark.broads", + "type": "string" + } + }, + "required": [ + "description", + "entities", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Special Protection Area (SPA)", + "type": "string" + }, + "entities": { + "anyOf": [ + { + "items": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "source": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array" + }, + { + "maxItems": 0, + "minItems": 0, + "type": "array" + } + ] + }, + "overlaps": { + "const": true, + "type": "boolean" + }, + "value": { + "const": "designated.SPA", + "type": "string" + } + }, + "required": [ + "description", + "entities", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "UNESCO World Heritage Site or buffer zone", + "type": "string" + }, + "entities": { + "anyOf": [ + { + "items": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "source": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array" + }, + { + "maxItems": 0, + "minItems": 0, + "type": "array" + } + ] + }, + "overlaps": { + "const": true, + "type": "boolean" + }, + "value": { + "const": "designated.WHS", + "type": "string" + } + }, + "required": [ + "description", + "entities", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Flood Risk Zone", + "type": "string" + }, + "entities": { + "anyOf": [ + { + "items": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "source": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array" + }, + { + "maxItems": 0, + "minItems": 0, + "type": "array" + } + ] + }, + "overlaps": { + "const": true, + "type": "boolean" + }, + "value": { + "const": "flood", + "type": "string" + } + }, + "required": [ + "description", + "entities", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Flood Risk Zone 1 - Low risk", + "type": "string" + }, + "entities": { + "anyOf": [ + { + "items": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "source": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array" + }, + { + "maxItems": 0, + "minItems": 0, + "type": "array" + } + ] + }, + "overlaps": { + "const": true, + "type": "boolean" + }, + "value": { + "const": "flood.zone.1", + "type": "string" + } + }, + "required": [ + "description", + "entities", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Flood Risk Zone 2 - Medium risk", + "type": "string" + }, + "entities": { + "anyOf": [ + { + "items": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "source": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array" + }, + { + "maxItems": 0, + "minItems": 0, + "type": "array" + } + ] + }, + "overlaps": { + "const": true, + "type": "boolean" + }, + "value": { + "const": "flood.zone.2", + "type": "string" + } + }, + "required": [ + "description", + "entities", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Flood Risk Zone 3 - High risk", + "type": "string" + }, + "entities": { + "anyOf": [ + { + "items": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "source": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array" + }, + { + "maxItems": 0, + "minItems": 0, + "type": "array" + } + ] + }, + "overlaps": { + "const": true, + "type": "boolean" + }, + "value": { + "const": "flood.zone.3", + "type": "string" + } + }, + "required": [ + "description", + "entities", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Listed Building", + "type": "string" + }, + "entities": { + "anyOf": [ + { + "items": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "source": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array" + }, + { + "maxItems": 0, + "minItems": 0, + "type": "array" + } + ] + }, + "overlaps": { + "const": true, + "type": "boolean" + }, + "value": { + "const": "listed", + "type": "string" + } + }, + "required": [ + "description", + "entities", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Locally Listed Building", + "type": "string" + }, + "entities": { + "anyOf": [ + { + "items": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "source": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array" + }, + { + "maxItems": 0, + "minItems": 0, + "type": "array" + } + ] + }, + "overlaps": { + "const": true, + "type": "boolean" + }, + "value": { + "const": "locallyListed", + "type": "string" + } + }, + "required": [ + "description", + "entities", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Site of a Scheduled Monument", + "type": "string" + }, + "entities": { + "anyOf": [ + { + "items": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "source": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array" + }, + { + "maxItems": 0, + "minItems": 0, + "type": "array" + } + ] + }, + "overlaps": { + "const": true, + "type": "boolean" + }, + "value": { + "const": "monument", + "type": "string" + } + }, + "required": [ + "description", + "entities", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Ancient Semi-Natural Woodland (ASNW)", + "type": "string" + }, + "entities": { + "anyOf": [ + { + "items": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "source": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array" + }, + { + "maxItems": 0, + "minItems": 0, + "type": "array" + } + ] + }, + "overlaps": { + "const": true, + "type": "boolean" + }, + "value": { + "const": "nature.ASNW", + "type": "string" + } + }, + "required": [ + "description", + "entities", + "overlaps", + "value" + ], + "type": "object" + }, + { + "additionalProperties": false, + "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Special Area of Conservation (SAC)", + "type": "string" + }, + "entities": { + "anyOf": [ + { + "items": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "source": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array" + }, + { + "maxItems": 0, + "minItems": 0, + "type": "array" + } + ] + }, + "overlaps": { + "const": true, + "type": "boolean" + }, + "value": { + "const": "nature.SAC", + "type": "string" } }, "required": [ - "url" + "description", + "entities", + "overlaps", + "value" ], "type": "object" }, - "service": { - "$id": "#DigitalPlanningMetadata", + { "additionalProperties": false, - "description": "Details of the digital planning service which sent the application", "properties": { - "flowId": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, + "description": { + "const": "Site of Special Scientific Interest (SSSI)", + "type": "string" + }, + "entities": { "anyOf": [ { - "$ref": "#/definitions/UUID" + "items": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "source": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array" }, { - "type": "string" + "maxItems": 0, + "minItems": 0, + "type": "array" } ] }, - "name": { - "type": "string" + "overlaps": { + "const": true, + "type": "boolean" }, - "owner": { + "value": { + "const": "nature.SSSI", "type": "string" - }, - "publishedFlowId": { - "type": "number" - }, - "url": { - "$ref": "#/definitions/URL" } }, "required": [ - "flowId", - "publishedFlowId", - "name", - "owner", - "url" + "description", + "entities", + "overlaps", + "value" ], "type": "object" }, - "session": { + { "additionalProperties": false, "properties": { - "createdAt": { - "$ref": "#/definitions/DateTime" + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" }, - "id": { + "description": { + "const": "Historic Park or Garden", + "type": "string" + }, + "entities": { "anyOf": [ { - "$ref": "#/definitions/UUID" + "items": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "source": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array" }, { - "type": "string" + "maxItems": 0, + "minItems": 0, + "type": "array" } ] }, - "source": { - "const": "PlanX", - "default": "PlanX", - "type": "string" + "overlaps": { + "const": true, + "type": "boolean" }, - "submittedAt": { - "$ref": "#/definitions/DateTime" + "value": { + "const": "registeredPark", + "type": "string" } }, "required": [ - "source", - "id", - "createdAt" + "description", + "entities", + "overlaps", + "value" ], "type": "object" - } - }, - "required": [ - "service", - "session", - "schema" - ], - "type": "object" - }, - "OSAddress": { - "$id": "#OSAddress", - "additionalProperties": false, - "description": "Address information for sites with a known address sourced from Ordnance Survey AddressBase Premium", - "properties": { - "latitude": { - "type": "number" - }, - "longitude": { - "type": "number" - }, - "organisation": { - "type": "string" - }, - "pao": { - "type": "string" - }, - "postcode": { - "type": "string" - }, - "source": { - "const": "Ordnance Survey", - "type": "string" - }, - "street": { - "type": "string" - }, - "title": { - "type": "string" - }, - "town": { - "type": "string" - }, - "uprn": { - "type": "string" - }, - "usrn": { - "type": "string" - }, - "x": { - "type": "number" }, - "y": { - "type": "number" - } - }, - "required": [ - "latitude", - "longitude", - "pao", - "postcode", - "source", - "street", - "title", - "town", - "uprn", - "usrn", - "x", - "y" - ], - "type": "object" - }, - "PlanningConstraint": { - "$id": "#PlanningConstraint", - "anyOf": [ { "additionalProperties": false, "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, "description": { + "const": "Classified Road", "type": "string" }, + "entities": { + "anyOf": [ + { + "items": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "source": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array" + }, + { + "maxItems": 0, + "minItems": 0, + "type": "array" + } + ] + }, "overlaps": { - "const": false, + "const": true, "type": "boolean" }, "value": { + "const": "road.classified", "type": "string" } }, "required": [ "description", + "entities", "overlaps", "value" ], @@ -2599,20 +4690,56 @@ { "additionalProperties": false, "properties": { + "category": { + "enum": [ + "Ecology", + "Flooding", + "General policy", + "Heritage and conservation", + "Trees" + ], + "type": "string" + }, "description": { + "const": "Tree Preservation Order (TPO) or zone", "type": "string" }, "entities": { - "items": { - "type": "string" - }, - "type": "array" + "anyOf": [ + { + "items": { + "additionalProperties": false, + "properties": { + "description": { + "type": "string" + }, + "name": { + "type": "string" + }, + "source": { + "$ref": "#/definitions/URL" + } + }, + "required": [ + "name" + ], + "type": "object" + }, + "type": "array" + }, + { + "maxItems": 0, + "minItems": 0, + "type": "array" + } + ] }, "overlaps": { "const": true, "type": "boolean" }, "value": { + "const": "tpo", "type": "string" } }, @@ -13241,9 +15368,6 @@ "type": "string" } }, - "required": [ - "start" - ], "type": "object" }, "description": { @@ -13257,33 +15381,6 @@ "$ref": "#/definitions/ProjectType" }, "type": "array" - }, - "retro": { - "additionalProperties": false, - "properties": { - "date": { - "additionalProperties": false, - "properties": { - "completion": { - "format": "date-time", - "type": "string" - }, - "start": { - "format": "date-time", - "type": "string" - } - }, - "required": [ - "start", - "completion" - ], - "type": "object" - } - }, - "required": [ - "date" - ], - "type": "object" } }, "required": [ diff --git a/types/enums/PlanningConstraints.ts b/types/enums/PlanningConstraints.ts index 914d4da5..6f110ce6 100644 --- a/types/enums/PlanningConstraints.ts +++ b/types/enums/PlanningConstraints.ts @@ -1,6 +1,5 @@ /** - * Minimum set of values for `data.property.constraints.planning` - * actual values will also include council-specific variables like `article4.{councilName}.hmo` + * Values for `data.property.constraints.planning` */ export const PlanningConstraints = { article4: 'Article 4 Direction area', @@ -12,6 +11,10 @@ export const PlanningConstraints = { 'designated.nationalPark.broads': 'National Park - Broads', 'designated.SPA': 'Special Protection Area (SPA)', 'designated.WHS': 'UNESCO World Heritage Site or buffer zone', + flood: 'Flood Risk Zone', + 'flood.zone.1': 'Flood Risk Zone 1 - Low risk', + 'flood.zone.2': 'Flood Risk Zone 2 - Medium risk', + 'flood.zone.3': 'Flood Risk Zone 3 - High risk', listed: 'Listed Building', locallyListed: 'Locally Listed Building', monument: 'Site of a Scheduled Monument', diff --git a/types/schema/data/Property.ts b/types/schema/data/Property.ts index a746af21..8460631f 100644 --- a/types/schema/data/Property.ts +++ b/types/schema/data/Property.ts @@ -1,5 +1,6 @@ +import {PlanningConstraints} from '../../enums/PlanningConstraints'; import {PropertyTypes} from '../../enums/PropertyTypes'; -import {Area, GeoJSON} from '../../utils'; +import {Area, GeoJSON, URL} from '../../utils'; /** * @id #Property @@ -76,6 +77,7 @@ export interface OSAddress extends SiteAddress { town: string; postcode: string; organisation?: string; + singleLine: string; source: 'Ordnance Survey'; } @@ -96,20 +98,40 @@ type PropertyTypeMap = { */ export type PropertyType = PropertyTypeMap[keyof PropertyTypeMap]; -/** @todo in future value & description should check against PlanningConstraints enum, but also allow custom per-council variables ?? */ -interface BasePlanningConstraint { - value: string; - description: string; -} +type PlanningConstraintKeys = keyof typeof PlanningConstraints; -interface NonOverlappingPlanningConstraint extends BasePlanningConstraint { +type GenericPlanningConstraint = { + value: TKey; + description: (typeof PlanningConstraints)[TKey]; + category?: + | 'Ecology' + | 'Flooding' + | 'General policy' + | 'Heritage and conservation' + | 'Trees'; +}; + +type PlanningConstraintMap = { + [K in PlanningConstraintKeys]: GenericPlanningConstraint; +}; + +type BasePlanningConstraint = + PlanningConstraintMap[keyof PlanningConstraintMap]; + +type NonOverlappingPlanningConstraint = { overlaps: false; -} +} & BasePlanningConstraint; -interface OverlappingPlanningConstraint extends BasePlanningConstraint { +type OverlappingPlanningConstraint = { overlaps: true; - entities: string[]; -} + entities: + | { + name: string; + description?: string; + source?: URL; + }[] + | []; +} & BasePlanningConstraint; /** * @id #PlanningConstraint diff --git a/types/schema/data/Proposal.ts b/types/schema/data/Proposal.ts index d3464028..56ce85ef 100644 --- a/types/schema/data/Proposal.ts +++ b/types/schema/data/Proposal.ts @@ -14,15 +14,9 @@ export interface Proposal { area: Area; }; date?: { - start: Date; + start?: Date; completion?: Date; }; - retro?: { - date: { - start: Date; - completion: Date; - }; - }; details?: ProposalDetails; } @@ -55,12 +49,20 @@ export interface LondonDetails extends BaseDetails { proposed: number; }; onStreet?: { + count: { + existing: number; + proposed: number; + }; club?: VehicleParkingCount; disabled?: VehicleParkingCount; other?: VehicleParkingCount; residents?: VehicleParkingCount; }; offStreet?: { + count: { + existing: number; + proposed: number; + }; club?: VehicleParkingCount; disabled?: VehicleParkingCount; other?: VehicleParkingCount;