@golemio/parkings
Version:
Golemio Parkings Module
30 lines • 1.52 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.OsmEntrancesTransformation = void 0;
const SourceEnum_1 = require("../../../helpers/constants/SourceEnum");
const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
class OsmEntrancesTransformation extends AbstractTransformation_1.AbstractTransformation {
constructor() {
super(...arguments);
this.name = "OsmParkingEntrancesTransformation";
this.transformInternal = (element) => {
const transformed = {
entrance_id: element.properties.osm_id,
source: SourceEnum_1.SourceEnum.OSM,
parking_id: `${SourceEnum_1.SourceEnum.OSM}-${element.properties.parking_id}`,
level: element.properties.level,
location: element.geometry,
entry: element.properties?.entry ?? null,
exit: element.properties?.exit ?? null,
entrance_type: element.properties?.entrance_type ?? null,
max_width: element.properties?.maxwidth ?? null,
max_length: element.properties?.maxlength ?? null,
max_weight: element.properties?.maxweight ?? null,
max_height: element.properties?.maxheight ?? null,
};
return transformed;
};
}
}
exports.OsmEntrancesTransformation = OsmEntrancesTransformation;
//# sourceMappingURL=OsmEntrancesTransformation.js.map