"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.OLFactory = void 0;
var tslib_1 = require("tslib");
var Point_1 = tslib_1.__importDefault(require("ol/geom/Point"));
var LineString_1 = tslib_1.__importDefault(require("ol/geom/LineString"));
var Circle_1 = tslib_1.__importDefault(require("ol/geom/Circle"));
var Polygon_1 = tslib_1.__importStar(require("ol/geom/Polygon"));
var LinearRing_1 = tslib_1.__importDefault(require("ol/geom/LinearRing"));
var MultiLineString_1 = tslib_1.__importDefault(require("ol/geom/MultiLineString"));
var MultiPoint_1 = tslib_1.__importDefault(require("ol/geom/MultiPoint"));
var MultiPolygon_1 = tslib_1.__importDefault(require("ol/geom/MultiPolygon"));
var GeometryCollection_1 = tslib_1.__importDefault(require("ol/geom/GeometryCollection"));
var Overlay_1 = tslib_1.__importDefault(require("ol/Overlay"));
var olExtent = tslib_1.__importStar(require("ol/extent"));
var olProj = tslib_1.__importStar(require("ol/proj"));
var Projection_1 = tslib_1.__importDefault(require("ol/proj/Projection"));
var Vector_1 = tslib_1.__importDefault(require("ol/layer/Vector"));
var Vector_2 = tslib_1.__importDefault(require("ol/source/Vector"));
var Collection_1 = tslib_1.__importDefault(require("ol/Collection"));
var Feature_1 = tslib_1.__importDefault(require("ol/Feature"));
var Extent_1 = tslib_1.__importDefault(require("ol/interaction/Extent"));
var Snap_1 = tslib_1.__importDefault(require("ol/interaction/Snap"));
var Draw_1 = tslib_1.__importDefault(require("ol/interaction/Draw"));
var Translate_1 = tslib_1.__importDefault(require("ol/interaction/Translate"));
var Modify_1 = tslib_1.__importDefault(require("ol/interaction/Modify"));
var Select_1 = tslib_1.__importDefault(require("ol/interaction/Select"));
var GeoJSON_1 = tslib_1.__importDefault(require("ol/format/GeoJSON"));
var WKT_1 = tslib_1.__importDefault(require("ol/format/WKT"));
var Style_1 = tslib_1.__importDefault(require("ol/style/Style"));
var Icon_1 = tslib_1.__importDefault(require("ol/style/Icon"));
var RegularShape_1 = tslib_1.__importDefault(require("ol/style/RegularShape"));
var Text_1 = tslib_1.__importDefault(require("ol/style/Text"));
var Fill_1 = tslib_1.__importDefault(require("ol/style/Fill"));
var Stroke_1 = tslib_1.__importDefault(require("ol/style/Stroke"));
var Circle_2 = tslib_1.__importDefault(require("ol/style/Circle"));
/**
 * Creates various OpenLayers types used by the viewer
 *
 * @export
 * @class OLFactory
 * @implements {IOLFactory}
 */
var OLFactory = /** @class */ (function () {
    function OLFactory() {
    }
    OLFactory.prototype.createStyle = function (options) {
        return new Style_1.default(options);
    };
    OLFactory.prototype.createStyleFill = function (options) {
        return new Fill_1.default(options);
    };
    OLFactory.prototype.createStyleStroke = function (options) {
        return new Stroke_1.default(options);
    };
    OLFactory.prototype.createStyleCircle = function (options) {
        return new Circle_2.default(options);
    };
    OLFactory.prototype.createFeatureCollection = function () {
        return new Collection_1.default();
    };
    OLFactory.prototype.extentContainsXY = function (extent, x, y) {
        return olExtent.containsXY(extent, x, y);
    };
    OLFactory.prototype.extendExtent = function (extent, other) {
        return olExtent.extend(extent, other);
    };
    OLFactory.prototype.createProjection = function (options) {
        return new Projection_1.default(options);
    };
    OLFactory.prototype.transformCoordinateFromLonLat = function (lonlat, proj) {
        return olProj.fromLonLat(lonlat, proj);
    };
    OLFactory.prototype.transformCoordinate = function (coordinate, source, target) {
        return olProj.transform(coordinate, source, target);
    };
    OLFactory.prototype.transformExtent = function (extent, source, target) {
        return olProj.transformExtent(extent, source, target);
    };
    OLFactory.prototype.createGeomPoint = function (coordinates) {
        return new Point_1.default(coordinates);
    };
    OLFactory.prototype.createGeomLineString = function (coordinates) {
        return new LineString_1.default(coordinates);
    };
    OLFactory.prototype.createGeomCircle = function (center, radius) {
        return new Circle_1.default(center, radius);
    };
    OLFactory.prototype.createGeomLinearRing = function (coordinates) {
        return new LinearRing_1.default(coordinates);
    };
    OLFactory.prototype.createGeomPolygon = function (coordinates) {
        return new Polygon_1.default(coordinates);
    };
    OLFactory.prototype.createGeomPolygonFromCircle = function (circle) {
        return (0, Polygon_1.fromCircle)(circle);
    };
    OLFactory.prototype.createGeomMultiLineString = function (coordinates) {
        return new MultiLineString_1.default(coordinates);
    };
    OLFactory.prototype.createGeomMultiPoint = function (coordinates) {
        return new MultiPoint_1.default(coordinates);
    };
    OLFactory.prototype.createGeomMultiPolygon = function (coordinates) {
        return new MultiPolygon_1.default(coordinates);
    };
    OLFactory.prototype.createGeomCollection = function (geometries) {
        return new GeometryCollection_1.default(geometries);
    };
    OLFactory.prototype.createVectorSource = function (options) {
        return new Vector_2.default(options);
    };
    OLFactory.prototype.createVectorLayer = function (options) {
        return new Vector_1.default(options);
    };
    OLFactory.prototype.createOverlay = function (options) {
        return new Overlay_1.default(options);
    };
    OLFactory.prototype.createInteractionDraw = function (options) {
        return new Draw_1.default(options);
    };
    OLFactory.prototype.createInteractionExtent = function (options) {
        return new Extent_1.default(options);
    };
    OLFactory.prototype.createInteractionTranslate = function (options) {
        return new Translate_1.default(options);
    };
    OLFactory.prototype.createInteractionSnap = function (options) {
        return new Snap_1.default(options);
    };
    OLFactory.prototype.createInteractionModify = function (options) {
        return new Modify_1.default(options);
    };
    OLFactory.prototype.createInteractionSelect = function (options) {
        return new Select_1.default(options);
    };
    OLFactory.prototype.createFeature = function (geomOrProps) {
        return new Feature_1.default(geomOrProps);
    };
    OLFactory.prototype.createFormatGeoJSON = function (options) {
        return new GeoJSON_1.default(options);
    };
    OLFactory.prototype.createFormatWKT = function (options) {
        return new WKT_1.default(options);
    };
    /**
     * @since 0.12.6
     */
    OLFactory.prototype.createStyleIcon = function (options) {
        return new Icon_1.default(options);
    };
    /**
     * @since 0.12.6
     */
    OLFactory.prototype.createStyleRegularShape = function (options) {
        return new RegularShape_1.default(options);
    };
    /**
     * @since 0.12.6
     */
    OLFactory.prototype.createStyleText = function (options) {
        return new Text_1.default(options);
    };
    return OLFactory;
}());
exports.OLFactory = OLFactory;
//# sourceMappingURL=ol-factory.js.map