Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/utils/RiverMapfileGenerator.java @ 4738:d93748043cbc
Little work on the RiverMapfileGenerator.
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Wed, 02 Jan 2013 15:15:45 +0100 |
parents | 38ec171544de |
children | 8062b571884d |
line wrap: on
line diff
--- 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; }