UNPKG

@golemio/parkings

Version:
51 lines 2.03 kB
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.OsmSchemaGenerator = void 0; const SupportedGeometrySchema_1 = require("../shared/SupportedGeometrySchema"); const OsmEntrancesParkingSchema_1 = require("./OsmEntrancesParkingSchema"); const OsmParkingSchema_1 = require("./OsmParkingSchema"); const OsmParkingSpacesSchema_1 = require("./OsmParkingSpacesSchema"); const OsmParkingMachinesSchema_1 = require("./OsmParkingMachinesSchema"); class OsmSchemaGenerator { static getParkingSchema() { return this.getSchema(OsmParkingSchema_1.osmParkingSchema); } static getParkingSpacesSchema() { return this.getSchema(OsmParkingSpacesSchema_1.osmParkingSpacesSchema); } static getEntranceSchema() { return this.getSchema(OsmEntrancesParkingSchema_1.osmEntrancesParkingSchema); } static getParkingMachinesSchema() { return this.getSchema(OsmParkingMachinesSchema_1.osmParkingMachinesSchema); } static getSchema(propertiesSchema) { return { type: "object", properties: { type: { type: "string", enum: ["FeatureCollection"], }, features: { type: "array", items: { type: "object", properties: { type: { type: "string", enum: ["Feature"], }, geometry: SupportedGeometrySchema_1.SupportedGeometrySchema, properties: propertiesSchema, }, required: ["type", "geometry", "properties"], }, }, }, required: ["type", "features"], }; } } exports.OsmSchemaGenerator = OsmSchemaGenerator; //# sourceMappingURL=FeatureCollectionSchemaGenerator.js.map