Mercurial > dive4elements > river
changeset 4738:d93748043cbc
Little work on the RiverMapfileGenerator.
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Wed, 02 Jan 2013 15:15:45 +0100 |
parents | 718adea968e2 |
children | 5014a84c0c7d fb135e1dfa35 |
files | flys-artifacts/doc/conf/mapserver/riveraxis-layer.vm flys-artifacts/src/main/java/de/intevation/flys/utils/RiverMapfileGenerator.java |
diffstat | 2 files changed, 8 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/flys-artifacts/doc/conf/mapserver/riveraxis-layer.vm Wed Jan 02 14:05:21 2013 +0100 +++ b/flys-artifacts/doc/conf/mapserver/riveraxis-layer.vm Wed Jan 02 15:15:45 2013 +0100 @@ -2,8 +2,7 @@ NAME "$LAYER.getName()" TYPE $LAYER.getType() - CONNECTIONTYPE $LAYER.getConnectionType() - CONNECTION "$LAYER.getConnection()" + INCLUDE "conf/dbconnection.include" DATA "$LAYER.getData()" FILTER "$LAYER.getFilter()"
--- a/flys-artifacts/src/main/java/de/intevation/flys/utils/RiverMapfileGenerator.java Wed Jan 02 14:05:21 2013 +0100 +++ b/flys-artifacts/src/main/java/de/intevation/flys/utils/RiverMapfileGenerator.java Wed Jan 02 15:15:45 2013 +0100 @@ -52,7 +52,7 @@ river.getName(), river.getId(), "41677", - "100,100,100,100"); + "-10000 -10000 10000 10000"); riverFiles.add("river-" + river.getName() + ".map"); } writeMapfile(riverFiles); @@ -63,12 +63,15 @@ layerInfo.setName(riverName); layerInfo.setSrid(srid); layerInfo.setExtent(extend); - layerInfo.setConnectionType(FLYSUtils.isUsingOracle() ? "oraclespatial" : "postgis"); + layerInfo.setType("line"); + layerInfo.setData("geom FROM river_axis"); // FIXME: Use templates for that + layerInfo.setFilter("river_id = " + riverID); + layerInfo.setTitle(riverName + " RiverAxis"); File layerFile = new File("river-" + riverName + ".map"); - Template template = getTemplateByName(DB_LAYER_TEMPLATE); + Template template = getTemplateByName("riveraxis-layer.vm"); if (template == null) { - logger.warn("Template '" + DB_LAYER_TEMPLATE + "' not found."); + logger.warn("Template riveraxis-layer.vm not found."); return; }