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 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..a69fe50 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 @@ -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 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 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) +>