Mercurial > dive4elements > river
changeset 9738:afad1fac70fb 3.2.x
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
author | Tom Gottfried <tom@intevation.de> |
---|---|
date | Mon, 25 Jul 2022 16:21:34 +0200 |
parents | 0c4736d5dd4a |
children | 414647dc6936 |
files | artifacts/doc/conf/mapserver/mapfile.vm artifacts/doc/conf/mapserver/river-mapfile.vm artifacts/src/main/java/org/dive4elements/river/utils/ArtifactMapfileGenerator.java artifacts/src/main/java/org/dive4elements/river/utils/MapfileGenerator.java artifacts/src/main/java/org/dive4elements/river/utils/RiverMapfileGenerator.java |
diffstat | 5 files changed, 4 insertions(+), 44 deletions(-) [+] |
line wrap: on
line diff
--- 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
--- 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@example.com" - "wms_contactvoicetelephone" "Any's telephone number" "wms_srs" "EPSG:4326 EPSG:31466 EPSG:31467" "ows_enable_request" "*" END
--- 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.
--- 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",
--- 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); }