[PATCH] Cleanup mapfile templating a bit
Wald Commits
scm-commit at wald.intevation.org
Mon Jul 25 16:43:53 CEST 2022
# HG changeset patch
# User Tom Gottfried <tom at intevation.de>
# Date 1658758894 -7200
# Mon Jul 25 16:21:34 2022 +0200
# Branch 3.2.x
# Node ID afad1fac70fbebadf7dba4630f7d3dd6f775b7a9
# Parent 0c4736d5dd4af42f345add38e6af4e932d3676d1
Cleanup mapfile templating a bit
_ Update names and titles
_ Skip wms_onlineresource because it's set automatically
_ Contact information is optional according to WMS specification
diff -r 0c4736d5dd4a -r afad1fac70fb artifacts/doc/conf/mapserver/mapfile.vm
--- a/artifacts/doc/conf/mapserver/mapfile.vm Mon Jul 25 12:31:08 2022 +0200
+++ b/artifacts/doc/conf/mapserver/mapfile.vm Mon Jul 25 16:21:34 2022 +0200
@@ -1,5 +1,5 @@
MAP
- NAME "FLYS-Map"
+ NAME "D4E-River-Map"
STATUS ON
SIZE 600 400
MAXSIZE 4000
@@ -18,26 +18,15 @@
WEB
METADATA
- "wms_title" "FLYS Web Map Service"
- "wms_onlineresource" "${MAPSERVERURL}user-wms"
+ "wms_title" "D4E River Web Map Service"
"wms_encoding" "UTF-8"
"wms_accessconstraints" "none"
"wms_fees" "none"
- "wms_addresstype" "postal"
- "wms_address" ""
- "wms_city" ""
- "wms_stateorprovince" ""
- "wms_postcode" ""
- "wms_country" ""
- "wms_contactperson" ""
- "wms_contactorganization" ""
- "wms_contactelectronicmailaddress" ""
- "wms_contactvoicetelephone" ""
"wms_srs" "EPSG:4326 EPSG:31466 EPSG:31467"
"wms_getmap_formatlist" "image/png,image/png; mode=24bit,image/jpeg"
"ows_enable_request" "*"
"ows_sld_enabled" "false"
- "ows_title" "FLYS Web Map Service"
+ "ows_title" "D4E River Web Map Service"
"ows_extent" "3233232 5303455 3421524 5585825"
END
END
diff -r 0c4736d5dd4a -r afad1fac70fb artifacts/doc/conf/mapserver/river-mapfile.vm
--- a/artifacts/doc/conf/mapserver/river-mapfile.vm Mon Jul 25 12:31:08 2022 +0200
+++ b/artifacts/doc/conf/mapserver/river-mapfile.vm Mon Jul 25 16:21:34 2022 +0200
@@ -18,21 +18,10 @@
WEB
METADATA
- "wms_title" "FLYS Rivers Web Map Service"
- "wms_onlineresource" "${MAPSERVERURL}river-wms"
+ "wms_title" "D4E River Web Map Service"
"wms_encoding" "UTF-8"
"wms_accessconstraints" "none"
"wms_fees" "none"
- "wms_addresstype" "postal"
- "wms_address" "Any Street"
- "wms_city" "Any City"
- "wms_stateorprovince" "Any state"
- "wms_postcode" "My Postalcode"
- "wms_country" "Any Country"
- "wms_contactperson" "Any Person"
- "wms_contactorganization" "Any Orga"
- "wms_contactelectronicmailaddress" "any-email at example.com"
- "wms_contactvoicetelephone" "Any's telephone number"
"wms_srs" "EPSG:4326 EPSG:31466 EPSG:31467"
"ows_enable_request" "*"
END
diff -r 0c4736d5dd4a -r afad1fac70fb artifacts/src/main/java/org/dive4elements/river/utils/ArtifactMapfileGenerator.java
--- a/artifacts/src/main/java/org/dive4elements/river/utils/ArtifactMapfileGenerator.java Mon Jul 25 12:31:08 2022 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/utils/ArtifactMapfileGenerator.java Mon Jul 25 16:21:34 2022 +0200
@@ -55,12 +55,6 @@
RiverUtils.XPATH_FLOODMAP_MAPSERVER_TEMPLATE_PATH);
}
- @Override
- public String getMapserverUrl() {
- return RiverUtils.getXPathString(
- RiverUtils.XPATH_FLOODMAP_MAPSERVER_URL);
- }
-
/**
* Method which starts searching for meta information file and mapfile
* generation.
diff -r 0c4736d5dd4a -r afad1fac70fb artifacts/src/main/java/org/dive4elements/river/utils/MapfileGenerator.java
--- a/artifacts/src/main/java/org/dive4elements/river/utils/MapfileGenerator.java Mon Jul 25 12:31:08 2022 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/utils/MapfileGenerator.java Mon Jul 25 16:21:34 2022 +0200
@@ -132,14 +132,10 @@
protected abstract String getMapserverTemplatePath();
- public abstract String getMapserverUrl();
-
protected VelocityContext getVelocityContext() {
VelocityContext context = new VelocityContext();
try {
- context.put("MAPSERVERURL",
- getMapserverUrl());
context.put("SHAPEFILEPATH",
getShapefileBaseDir().getCanonicalPath());
context.put("CONFIGDIR",
diff -r 0c4736d5dd4a -r afad1fac70fb artifacts/src/main/java/org/dive4elements/river/utils/RiverMapfileGenerator.java
--- a/artifacts/src/main/java/org/dive4elements/river/utils/RiverMapfileGenerator.java Mon Jul 25 12:31:08 2022 +0200
+++ b/artifacts/src/main/java/org/dive4elements/river/utils/RiverMapfileGenerator.java Mon Jul 25 16:21:34 2022 +0200
@@ -41,9 +41,6 @@
public static final String XPATH_RIVERMAP_VELOCITY_LOGFILE =
"/artifact-database/rivermap/velocity/logfile/@path";
- public static final String XPATH_RIVERMAP_MAPSERVER_URL =
- "/artifact-database/rivermap/mapserver/server/@path";
-
public static final String XPATH_RIVERMAP_MAPFILE_PATH =
"/artifact-database/rivermap/mapserver/mapfile/@path";
@@ -158,11 +155,6 @@
}
@Override
- public String getMapserverUrl() {
- return RiverUtils.getXPathString(XPATH_RIVERMAP_MAPSERVER_URL);
- }
-
- @Override
protected String getMapfilePath() {
return RiverUtils.getXPathString(XPATH_RIVERMAP_MAPFILE_PATH);
}
More information about the Dive4Elements-commits
mailing list