Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
jessicamcinchak committed Nov 27, 2024
1 parent a054a3b commit 3eecd10
Show file tree
Hide file tree
Showing 17 changed files with 165 additions and 271 deletions.
42 changes: 22 additions & 20 deletions schemas/application.json
Original file line number Diff line number Diff line change
Expand Up @@ -7919,9 +7919,8 @@
"type": "object"
},
"OSAddress": {
"$id": "#OSAddress",
"additionalProperties": false,
"description": "Address information for sites with a known address sourced from Ordnance Survey AddressBase Premium",
"description": "Address information for sites with a known address sourced from Ordnance Survey AddressBase Premium LPI source",
"properties": {
"latitude": {
"description": "Latitude coordinate in EPSG:4326 (WGS84)",
Expand Down Expand Up @@ -7968,6 +7967,7 @@
"type": "string"
},
"title": {
"description": "Single line address description",
"type": "string"
},
"town": {
Expand Down Expand Up @@ -8007,6 +8007,7 @@
"x",
"y"
],
"title": "#OSAddress",
"type": "object"
},
"OpenSpaceDesignation": {
Expand Down Expand Up @@ -24017,7 +24018,6 @@
"type": "object"
},
"ProposedAddress": {
"$id": "#ProposedAddress",
"additionalProperties": false,
"description": "Address information for sites without a known Unique Property Reference Number (UPRN)",
"properties": {
Expand All @@ -24034,6 +24034,7 @@
"type": "string"
},
"title": {
"description": "Single line address description",
"type": "string"
},
"x": {
Expand All @@ -24053,6 +24054,7 @@
"x",
"y"
],
"title": "#ProposedAddress",
"type": "object"
},
"ProtectedSpaceDesignation": {
Expand Down Expand Up @@ -24246,6 +24248,22 @@
},
"type": "object"
},
"Region": {
"description": "The region in England that contains this address sourced from planning.data.gov.uk/dataset/region, where London is a proxy for the Greater London Authority (GLA) area",
"enum": [
"North East",
"North West",
"Yorkshire and The Humber",
"East Midlands",
"West Midlands",
"East of England",
"London",
"South East",
"South West"
],
"title": "#Region",
"type": "string"
},
"RequestedFiles": {
"$id": "#RequestedFiles",
"additionalProperties": false,
Expand Down Expand Up @@ -25068,7 +25086,7 @@
"type": "object"
},
"region": {
"$ref": "#/definitions/UKRegion"
"$ref": "#/definitions/Region"
},
"trees": {
"additionalProperties": false,
Expand Down Expand Up @@ -25127,22 +25145,6 @@
],
"type": "object"
},
"UKRegion": {
"$id": "#UKRegion",
"description": "The UK region that contains this address sourced from planning.data.gov.uk/dataset/region, where London is a proxy for the Greater London Authority (GLA) area",
"enum": [
"North East",
"North West",
"Yorkshire and The Humber",
"East Midlands",
"West Midlands",
"East of England",
"London",
"South East",
"South West"
],
"type": "string"
},
"UKResidentialUnitType": {
"$id": "#UKResidentialUnitType",
"anyOf": [
Expand Down
27 changes: 8 additions & 19 deletions schemas/prototypeApplication.json
Original file line number Diff line number Diff line change
Expand Up @@ -989,7 +989,7 @@
"type": "object"
},
"boundary": {
"$ref": "#/definitions/GeoBoundaryPrototype",
"$ref": "#/definitions/GeoBoundary",
"description": "Location plan boundary proposed by the user, commonly referred to as the red line boundary"
},
"date": {
Expand Down Expand Up @@ -1902,22 +1902,6 @@
],
"type": "object"
},
"GeoBoundaryPrototype": {
"additionalProperties": false,
"properties": {
"area": {
"$ref": "#/definitions/Area"
},
"site": {
"$ref": "#/definitions/GeoJSON"
}
},
"required": [
"site",
"area"
],
"type": "object"
},
"GeoJSON": {
"anyOf": [
{
Expand Down Expand Up @@ -3154,7 +3138,7 @@
"type": "object"
},
"boundary": {
"$ref": "#/definitions/GeoBoundaryPrototype",
"$ref": "#/definitions/GeoBoundary",
"description": "Location plan boundary proposed by the user, commonly referred to as the red line boundary"
},
"charging": {
Expand Down Expand Up @@ -4464,7 +4448,7 @@
},
"OSAddress": {
"additionalProperties": false,
"description": "Address information for sites with a known address sourced from Ordnance Survey AddressBase Premium (LPI)",
"description": "Address information for sites with a known address sourced from Ordnance Survey AddressBase Premium LPI source",
"properties": {
"latitude": {
"description": "Latitude coordinate in EPSG:4326 (WGS84)",
Expand Down Expand Up @@ -4511,6 +4495,7 @@
"type": "string"
},
"title": {
"description": "Single line address description",
"type": "string"
},
"town": {
Expand Down Expand Up @@ -4550,6 +4535,7 @@
"x",
"y"
],
"title": "#OSAddress",
"type": "object"
},
"OpenSpaceDesignation": {
Expand Down Expand Up @@ -10197,6 +10183,7 @@
"type": "string"
},
"title": {
"description": "Single line address description",
"type": "string"
},
"x": {
Expand All @@ -10216,6 +10203,7 @@
"x",
"y"
],
"title": "#ProposedAddress",
"type": "object"
},
"ProtectedSpaceDesignation": {
Expand Down Expand Up @@ -10939,6 +10927,7 @@
"South East",
"South West"
],
"title": "#Region",
"type": "string"
},
"ResidentialUnits": {
Expand Down
2 changes: 1 addition & 1 deletion types/schemas/application/data/Files.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import {GeoBoundary} from './shared';
import {GeoBoundary} from './../../../shared/Boundaries';

/**
* @id #FilesAsData
Expand Down
102 changes: 8 additions & 94 deletions types/schemas/application/data/Property.ts
Original file line number Diff line number Diff line change
@@ -1,36 +1,25 @@
import {OSAddress, ProposedAddress} from '../../../shared/Addresses';
import {GeoBoundary} from './../../../shared/Boundaries';
import {Materials} from '../../../shared/Materials';
import {Region} from '../../../shared/Regions';
import {Date, URL} from '../../../shared/utils';
import {PlanningDesignation} from '../enums/PlanningConstraints';
import {PropertyType} from '../enums/PropertyTypes';
import {Date, URL} from '../../../shared/utils';
import {Entity, GeoBoundary, Materials, ResidentialUnits} from './shared';
import {Entity, ResidentialUnits} from './shared';

/**
* @id #Property
* @description Information about the site where the works will happen
*/
export type Property = UKProperty | LondonProperty;

/**
* @id #UKRegion
* @description The UK region that contains this address sourced from planning.data.gov.uk/dataset/region, where London is a proxy for the Greater London Authority (GLA) area
*/
export type UKRegion =
| 'North East'
| 'North West'
| 'Yorkshire and The Humber'
| 'East Midlands'
| 'West Midlands'
| 'East of England'
| 'London'
| 'South East'
| 'South West';

/**
* @id #UKProperty
* @description Property details for sites anywhere in the UK
*/
export interface UKProperty {
address: ProposedAddress | OSAddress;
region: UKRegion;
region: Region;
/**
* @description Current and historic UK Local Authority Districts that contain this address sourced from planning.data.gov.uk/dataset/local-authority-district
*/
Expand Down Expand Up @@ -91,7 +80,7 @@ export interface UKProperty {
* @description Property details for sites within the Greater London Authority (GLA) area
*/
export interface LondonProperty extends UKProperty {
region: Extract<UKRegion, 'London'>;
region: Extract<Region, 'London'>;
titleNumber?: {
known: 'Yes' | 'No';
number?: string;
Expand Down Expand Up @@ -138,81 +127,6 @@ export interface LondonProperty extends UKProperty {

type ExistingCount = {count: number};

/**
* @id #SiteAddress
* @description Address information available for any site, whether existing or proposed
*/
export interface SiteAddress {
title: string;
/**
* @description Easting coordinate in British National Grid (OSGB36)
*/
x: number;
/**
* @description Northing coordinate in British National Grid (OSGB36)
*/
y: number;
/**
* @description Latitude coordinate in EPSG:4326 (WGS84)
*/
latitude: number;
/**
* @description Longitude coordinate in EPSG:4326 (WGS84)
*/
longitude: number;
}

/**
* @id #ProposedAddress
* @description Address information for sites without a known Unique Property Reference Number (UPRN)
*/
export interface ProposedAddress extends SiteAddress {
source: 'Proposed by applicant';
}

/**
* @id #OSAddress
* @description Address information for sites with a known address sourced from Ordnance Survey AddressBase Premium
*/
export interface OSAddress extends SiteAddress {
/**
* @title Unique Property Reference Number
* @maxLength 12
*/
uprn: string;
/**
* @title Unique Street Reference Number
* @maxLength 8
*/
usrn: string;
/**
* @title Primary Addressable Object start range and/or building description
* @description Combined `PAO_START_NUMBER`, `PAO_START_SUFFIX`, `PAO_TEXT` OS LPI properties
*/
pao: string;
/**
* @title Primary Addressable Object (PAO) end range
* @description Combined `PAO_END_NUMBER`, `PAO_END_SUFFIX` OS LPI properties
*/
paoEnd?: string;
/**
* @title Secondary Addressable Object (SAO) start range and/or building description
* @description Combined `SAO_START_NUMBER`, `SAO_START_SUFFIX`, `SAO_TEXT` OS LPI properties
*/
sao?: string;
/**
* @title Secondary Addressable Object (SAO) end range
* @description Combined `SAO_END_NUMBER`, `SAO_END_SUFFIX` OS LPI properties
*/
saoEnd?: string;
street: string;
town: string;
postcode: string;
organisation?: string;
singleLine: string;
source: 'Ordnance Survey';
}

type BasePlanningConstraint = {
value: string;
description: string;
Expand Down
4 changes: 3 additions & 1 deletion types/schemas/application/data/Proposal.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import {GeoBoundary} from './../../../shared/Boundaries';
import {Materials} from '../../../shared/Materials';
import {BuildingRegulation} from '../enums/BuildingRegulations';
import {DevelopmentType} from '../enums/DevelopmentTypes';
import {GLAHousingProvider} from '../enums/HousingProviders';
Expand All @@ -7,7 +9,7 @@ import {ProtectedSpaceDesignation} from '../enums/ProtectedSpaces';
import {GLAResidentialUnitType} from '../enums/ResidentialUnitTypes';
import {GLATenureType} from '../enums/TenureTypes';
import {Area, Date} from '../../../shared/utils';
import {GeoBoundary, Materials, ResidentialUnits} from './shared';
import {ResidentialUnits} from './shared';

/**
* @id #Proposal
Expand Down
19 changes: 1 addition & 18 deletions types/schemas/application/data/shared.ts
Original file line number Diff line number Diff line change
@@ -1,23 +1,6 @@
import {GeoJSON} from 'geojson';
import {URL} from '../../../shared/utils';
import {UKResidentialUnitType} from '../enums/ResidentialUnitTypes';
import {UKTenureType} from '../enums/TenureTypes';
import {Area, URL} from '../../../shared/utils';

export type Materials = {
boundary?: string;
door?: string;
lighting?: string;
roof?: string;
surface?: string;
wall?: string;
window?: string;
other?: string;
};

export type GeoBoundary = {
site: GeoJSON;
area: Area;
};

export type Entity = {
name: string;
Expand Down
13 changes: 5 additions & 8 deletions types/schemas/preApplication/data/Property.ts
Original file line number Diff line number Diff line change
@@ -1,16 +1,13 @@
import {
OSAddress,
ProposedAddress,
UKRegion,
} from '../../application/data/Property';
import {GeoBoundary} from '../../application/data/shared';
import {OSAddress, ProposedAddress} from '../../../shared/Addresses';
import {GeoBoundary} from './../../../shared/Boundaries';
import {Region} from '../../../shared/Regions';
import {URL} from '../../../shared/utils';
import {PlanningDesignation} from '../../application/enums/PlanningConstraints';
import {PropertyType} from '../../prototypeApplication/enums/PropertyTypes';
import {URL} from '../../../shared/utils';

export interface Property {
address: ProposedAddress | OSAddress;
region: UKRegion;
region: Region;
/**
* @description Current and historic UK Local Authority Districts that contain this address sourced from planning.data.gov.uk/dataset/local-authority-district
*/
Expand Down
Loading

0 comments on commit 3eecd10

Please sign in to comment.