From 43afee1a1f198491ab33637561a5e75de0718acb Mon Sep 17 00:00:00 2001 From: Alex Cutforth Date: Sun, 5 Jan 2025 19:45:39 +0000 Subject: [PATCH 1/4] fix: gsurftyp --- packages/amdb/src/types/features/aprons.ts | 8 ++++---- packages/amdb/src/types/features/runway.ts | 2 +- packages/amdb/src/types/features/taxiways.ts | 4 ++-- 3 files changed, 7 insertions(+), 7 deletions(-) diff --git a/packages/amdb/src/types/features/aprons.ts b/packages/amdb/src/types/features/aprons.ts index 53a6e45..d5ee63a 100644 --- a/packages/amdb/src/types/features/aprons.ts +++ b/packages/amdb/src/types/features/aprons.ts @@ -54,7 +54,7 @@ export type ApronElement = AmdbFeature< * * Example: `Asphalt: 2` */ - gsurftype: GroundSurfaceType + gsurftyp: GroundSurfaceType /** * The name of the apron @@ -226,7 +226,7 @@ export type ParkingStandArea = AmdbFeature< * * Example: `Asphalt: 2` */ - gsurftype: GroundSurfaceType + gsurftyp: GroundSurfaceType /** * Availability of a jetway for the stands in this area @@ -306,7 +306,7 @@ export type DeicingArea = AmdbFeature< * * Example: `Asphalt: 2` */ - gsurftype: GroundSurfaceType + gsurftyp: GroundSurfaceType /** * Identifier of the underlying: @@ -342,7 +342,7 @@ export type ServiceRoad = AmdbFeature< * * Example: `Asphalt: 2` */ - gsurftype: GroundSurfaceType + gsurftyp: GroundSurfaceType /** * Type of feature which is overlapped by this road diff --git a/packages/amdb/src/types/features/runway.ts b/packages/amdb/src/types/features/runway.ts index 0502497..c7b501f 100644 --- a/packages/amdb/src/types/features/runway.ts +++ b/packages/amdb/src/types/features/runway.ts @@ -379,7 +379,7 @@ export type RunwayShoulder = AmdbFeature< * * Example: `Asphalt: 2` */ - gsurftype: GroundSurfaceType + gsurftyp: GroundSurfaceType }, FeatureType.RunwayShoulder, Polygon diff --git a/packages/amdb/src/types/features/taxiways.ts b/packages/amdb/src/types/features/taxiways.ts index d490eec..dd37485 100644 --- a/packages/amdb/src/types/features/taxiways.ts +++ b/packages/amdb/src/types/features/taxiways.ts @@ -43,7 +43,7 @@ export type TaxiwayElement = AmdbFeature< * * Example: `Asphalt: 2` */ - gsurftype: GroundSurfaceType + gsurftyp: GroundSurfaceType /** * Indicates whether the taxiway is a bridge, and if so, what kind of bridge it is @@ -104,7 +104,7 @@ export type TaxiwayShoulder = AmdbFeature< * * Example: `Asphalt: 2` */ - gsurftype: GroundSurfaceType + gsurftyp: GroundSurfaceType }, FeatureType.TaxiwayShoulder, Polygon From c9146b80e8efb28c27902f39dc0c518482ea2b20 Mon Sep 17 00:00:00 2001 From: Alex Cutforth Date: Sun, 5 Jan 2025 22:35:13 +0000 Subject: [PATCH 2/4] fix: remove status field --- packages/amdb/src/types/features/runway.ts | 9 --------- 1 file changed, 9 deletions(-) diff --git a/packages/amdb/src/types/features/runway.ts b/packages/amdb/src/types/features/runway.ts index c7b501f..a69fe50 100644 --- a/packages/amdb/src/types/features/runway.ts +++ b/packages/amdb/src/types/features/runway.ts @@ -486,15 +486,6 @@ export type BlastPad = AmdbFeature< * Example: `9` */ idthr: string | null - - /** - * Permanent state of feature (exceeding the AIRAC-cycle of 56 days) - * - * Non-permanent closures or outages of less than 56 days are not adressed in the airport maping database but will be addressed via NOTAMS - * - * Example: `Open: 1` - */ - status: Status }, FeatureType.BlastPad, Polygon From a6eab8a00665c77de3f8df9616602e0bc09d7b1e Mon Sep 17 00:00:00 2001 From: Alex Cutforth Date: Thu, 9 Jan 2025 09:53:31 +0000 Subject: [PATCH 3/4] fix: missing centroid/midpoint fields --- packages/amdb/src/types/features/types.ts | 32 ++++++++++++++--------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/packages/amdb/src/types/features/types.ts b/packages/amdb/src/types/features/types.ts index 3b2eeb6..65f4f29 100644 --- a/packages/amdb/src/types/features/types.ts +++ b/packages/amdb/src/types/features/types.ts @@ -1,18 +1,24 @@ import { Feature, LineString, Point, Polygon } from "geojson" import { FeatureType } from "../enums" -type Properties = { - /** Unique identifier for this feature instance. Only unique per feature type */ - id: number +export type AmdbFeature = Feature< + G, + { + /** Unique identifier for this feature instance. Only unique per feature type */ + id: number - feattype: F + feattype: F - /** - * ICAO aerodrome location indicator - * - * Example: `NZCH` - */ - idarpt: string -} & P - -export type AmdbFeature = Feature> + /** + * ICAO aerodrome location indicator + * + * Example: `NZCH` + */ + idarpt: string + } & P & + (G extends Polygon + ? { centroid: Point } + : G extends LineString + ? { midpoint: F extends FeatureType.AsrnEdge ? undefined : Point } // This AsrnEdge check isn't very nice, but its neccessary since it is the only table without a populated midpoint value + : Record) +> From db5c89c08f108b0f2034b75b40738a64a210862c Mon Sep 17 00:00:00 2001 From: Alex Cutforth Date: Tue, 12 Aug 2025 20:57:19 +1200 Subject: [PATCH 4/4] Create tame-emus-sing.md --- .changeset/tame-emus-sing.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 .changeset/tame-emus-sing.md diff --git a/.changeset/tame-emus-sing.md b/.changeset/tame-emus-sing.md new file mode 100644 index 0000000..66e8d35 --- /dev/null +++ b/.changeset/tame-emus-sing.md @@ -0,0 +1,6 @@ +--- +"@navigraph/amdb": patch +"navigraph": patch +--- + +Fixed field names