Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "sitn_geoshop_connector"]
path = sitn_geoshop_connector
url = https://github.com/sitn/sitn_geoshop_connector
2 changes: 1 addition & 1 deletion extract/src/main/resources/application.properties
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,4 @@ table.page.size=10
#http.proxyUser=myProxyUser
#http.proxyPassword=myProxyPassword

appplication.features.perRequestOwnership=false
appplication.features.perRequestOwnership=false
7 changes: 6 additions & 1 deletion extract/src/main/resources/static/css/extract.css
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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 {
Expand Down
20 changes: 13 additions & 7 deletions extract/src/main/resources/static/js/requestDetails.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"
}));
}


Expand Down Expand Up @@ -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({
Expand All @@ -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' +
Expand Down Expand Up @@ -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();
Expand Down
11 changes: 10 additions & 1 deletion extract/src/main/resources/static/js/requestMap/map.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,17 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

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,
Expand Down
27 changes: 26 additions & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -73,11 +73,36 @@
</filesets>
</configuration>
</plugin>
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<version>3.3.1</version>
<executions>
<execution>
<id>copy-resource-one</id>
<phase>generate-sources</phase>
<goals>
<goal>copy-resources</goal>
</goals>
<configuration>
<outputDirectory>./extract/src/main/resources/connectors/</outputDirectory>
<resources>
<resource>
<directory>./sitn_geoshop_connector/connectors/extract-connector-geoshop/target/</directory>
<includes>
<include>extract-connector-geoshop*.jar</include>
</includes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>

<modules>
<module>extract-interface</module>
<module>sitn_geoshop_connector/connectors/extract-connector-geoshop</module>
<module>extract-connector-easysdiv4</module>
<module>extract-task-archive</module>
<module>extract-task-email</module>
Expand Down
1 change: 1 addition & 0 deletions sitn_geoshop_connector
Submodule sitn_geoshop_connector added at 87b9bd