changeset 8802:a58cbb1b7371

Control directory where axis mapfiles are written. Is assumed to be conf/.. but was working directory of server.
author Tom Gottfried <tom@intevation.de>
date Thu, 24 Dec 2015 17:48:42 +0100
parents dece88059a36
children 080ee1c73bab
files artifacts/src/main/java/org/dive4elements/river/utils/RiverMapfileGenerator.java
diffstat 1 files changed, 5 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/artifacts/src/main/java/org/dive4elements/river/utils/RiverMapfileGenerator.java	Tue Dec 22 11:22:06 2015 +0100
+++ b/artifacts/src/main/java/org/dive4elements/river/utils/RiverMapfileGenerator.java	Thu Dec 24 17:48:42 2015 +0100
@@ -11,6 +11,8 @@
 import com.vividsolutions.jts.geom.Envelope;
 import com.vividsolutions.jts.geom.MultiLineString;
 
+import org.dive4elements.artifacts.common.utils.Config;
+
 import org.dive4elements.river.artifacts.model.LayerInfo;
 import org.dive4elements.river.artifacts.model.RiverFactory;
 
@@ -121,7 +123,9 @@
         layerInfo.setFilter("river_id = " + riverID + " and kind_id = 1");
         layerInfo.setTitle(riverName + " RiverAxis");
 
-        File layerFile = new File("river-" + riverName + ".map");
+        File layerFile = new File(
+            Config.getConfigDirectory().getParentFile(),
+            "river-" + riverName + ".map");
         Template template = getTemplateByName("riveraxis-layer.vm");
         if (template == null) {
             log.warn("Template riveraxis-layer.vm not found.");

http://dive4elements.wald.intevation.org