diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index f0d7dfec..fe350513 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -11,6 +11,8 @@ jobs:
steps:
- name: Download the code
uses: actions/checkout@v4
+ with:
+ submodules: recursive
- name: Install JDK 17
uses: actions/setup-java@v4
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 00000000..a685cbe9
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "sitn_geoshop_connector"]
+ path = sitn_geoshop_connector
+ url = https://github.com/sitn/sitn_geoshop_connector
diff --git a/extract/src/main/resources/application.properties b/extract/src/main/resources/application.properties
index 69f22403..58d1971f 100644
--- a/extract/src/main/resources/application.properties
+++ b/extract/src/main/resources/application.properties
@@ -55,4 +55,4 @@ table.page.size=10
#http.proxyUser=myProxyUser
#http.proxyPassword=myProxyPassword
-appplication.features.perRequestOwnership=false
\ No newline at end of file
+appplication.features.perRequestOwnership=false
diff --git a/extract/src/main/resources/static/css/extract.css b/extract/src/main/resources/static/css/extract.css
index a2b3c056..b72862d4 100644
--- a/extract/src/main/resources/static/css/extract.css
+++ b/extract/src/main/resources/static/css/extract.css
@@ -565,6 +565,11 @@ table.list-table.files-list-table {
bottom: 0.5em;
}
+.lv95 {
+ right: 8.5em;
+ bottom: 0.5em;
+}
+
.export-kml {
right: 4.5em;
bottom: 0.5em;
@@ -576,7 +581,7 @@ table.list-table.files-list-table {
}
.ol-control.ol-attribution {
- right: 8.5em;
+ right: 15.5em;
}
.ol-attribution.ol-uncollapsible ~ .ol-control.export-button {
diff --git a/extract/src/main/resources/static/js/requestDetails.js b/extract/src/main/resources/static/js/requestDetails.js
index 1f226f2e..f2688608 100644
--- a/extract/src/main/resources/static/js/requestDetails.js
+++ b/extract/src/main/resources/static/js/requestDetails.js
@@ -239,6 +239,12 @@ function _initializeExportButtons(map) {
label: LANG_MESSAGES.requestDetails.exportToKml.label,
tooltip: LANG_MESSAGES.requestDetails.exportToKml.tooltip
}));
+ map.addControl(new ExportToDxfControl({
+ label: `${LANG_MESSAGES.requestDetails.exportToDxf.label} (LV95)`,
+ tooltip: `${LANG_MESSAGES.requestDetails.exportToDxf.tooltip} (LV95)`,
+ projection: "EPSG:2056",
+ styleClass: "lv95"
+ }));
}
@@ -364,7 +370,7 @@ class ExportToDxfControl extends ol.control.Control {
button.title = options.tooltip;
var element = document.createElement('div');
- element.className = 'export-dxf export-button ol-unselectable ol-control';
+ element.className = `${options.styleClass || "export-dxf"} export-button ol-unselectable ol-control`;
element.appendChild(button);
super({
@@ -375,11 +381,10 @@ class ExportToDxfControl extends ol.control.Control {
button.addEventListener('click', this.handleExportToDxf.bind(this), false);
button.addEventListener('touchstart', this.handleExportToDxf.bind(this), false);
this.DxfGlobalHandle = 2000;
+ this.projection = options.projection || "";
}
buildDxfPolyline(ring) {
- console.log(ring);
-
this.DxfGlobalHandle++;
var pointsCount = ring.length;
var dxfPolygon = ' 0\n' +
@@ -1687,15 +1692,16 @@ class ExportToDxfControl extends ol.control.Control {
return parseInt(number, 10).toString(16);
}
-
+
getLinearRingsFromFeatures(features) {
- console.log(features);
-
var rings = [];
for (var i = 0; i < features.length; i++) {
var feature = features[i];
- var geometry = feature.getGeometry();
+ var geometry = feature.getGeometry().clone();
+ if (this.projection) {
+ geometry.transform('EPSG:3857', this.projection);
+ }
if (geometry instanceof ol.geom.MultiPolygon) {
var polygons = geometry.getPolygons();
diff --git a/extract/src/main/resources/static/js/requestMap/map.js b/extract/src/main/resources/static/js/requestMap/map.js
index 2d5cdd3c..2b3e379c 100644
--- a/extract/src/main/resources/static/js/requestMap/map.js
+++ b/extract/src/main/resources/static/js/requestMap/map.js
@@ -15,8 +15,17 @@
* along with this program. If not, see .
*/
+function registerProjections() {
+ proj4.defs("EPSG:2056",
+ '+proj=somerc +lat_0=46.95240555555556 +lon_0=7.439583333333333'
+ + ' +k_0=1 +x_0=2600000 +y_0=1200000 +ellps=bessel '
+ + '+towgs84=674.374,15.056,405.346,0,0,0,0 +units=m +no_defs');
+ ol.proj.proj4.register(proj4);
+}
+
function initializeMap() {
-
+ registerProjections();
+
return new Promise(function(resolve, reject) {
const attribution = new ol.control.Attribution({
collapsible: true,
diff --git a/pom.xml b/pom.xml
index 0ae2ce8b..31558230 100644
--- a/pom.xml
+++ b/pom.xml
@@ -73,11 +73,36 @@
+
+ maven-resources-plugin
+ 3.3.1
+
+
+ copy-resource-one
+ generate-sources
+
+ copy-resources
+
+
+ ./extract/src/main/resources/connectors/
+
+
+ ./sitn_geoshop_connector/connectors/extract-connector-geoshop/target/
+
+ extract-connector-geoshop*.jar
+
+
+
+
+
+
+
-
+
extract-interface
+ sitn_geoshop_connector/connectors/extract-connector-geoshop
extract-connector-easysdiv4
extract-task-archive
extract-task-email
diff --git a/sitn_geoshop_connector b/sitn_geoshop_connector
new file mode 160000
index 00000000..87b9bd6c
--- /dev/null
+++ b/sitn_geoshop_connector
@@ -0,0 +1 @@
+Subproject commit 87b9bd6cde1bc4c23f42c477fe51162856488c1d