@golemio/parkings
Version:
Golemio Parkings Module
27 lines • 1.26 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.IptOictParkingSpaceTransformation = void 0;
const GeodataHelper_1 = require("../helpers/GeodataHelper");
const AbstractTransformation_1 = require("@golemio/core/dist/helpers/transformation/AbstractTransformation");
class IptOictParkingSpaceTransformation extends AbstractTransformation_1.AbstractTransformation {
constructor(source) {
super();
this.source = source;
this.name = "IptOictParkingSpaceTransformation";
this.transformInternal = (element) => {
const transformed = {
id: element.properties.id,
source: this.source,
source_id: element.properties.parking_id,
data_provider: "manual",
location: element.geometry,
centroid: (0, GeodataHelper_1.getPointOnFeature)(element.geometry),
total_spot_number: element.properties.capacity,
special_access: element.properties.access_dedicated_to,
};
return transformed;
};
}
}
exports.IptOictParkingSpaceTransformation = IptOictParkingSpaceTransformation;
//# sourceMappingURL=IptOictParkingSpaceTransformation.js.map