changeset 2669:7a124cb11d8e

Added a PROJECTION section to all db mapserver layers. flys-artifacts/trunk@4355 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Tue, 08 May 2012 10:19:43 +0000
parents 53f42adf4505
children 402695ee7c24
files flys-artifacts/ChangeLog flys-artifacts/doc/conf/mapserver/db_layer.vm flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/LayerInfo.java flys-artifacts/src/main/java/de/intevation/flys/utils/MapfileGenerator.java
diffstat 4 files changed, 31 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/ChangeLog	Mon May 07 13:27:45 2012 +0000
+++ b/flys-artifacts/ChangeLog	Tue May 08 10:19:43 2012 +0000
@@ -1,3 +1,14 @@
+2012-05-08  Ingo Weinzierl <ingo@intevation.de>
+
+	* doc/conf/mapserver/db_layer.vm: Added a PROJECTION section which is
+	  filled by the LayerInfo object.
+
+	* src/main/java/de/intevation/flys/artifacts/model/LayerInfo.java: Added
+	  a 'srid' property.
+
+	* src/main/java/de/intevation/flys/utils/MapfileGenerator.java: Set the
+	  'srid' property of all LayerInfo objects.
+
 2012-05-07  Raimund Renkert <raimund.renkert@intevation.de>
 
 	* doc/conf/artifacts/fixanalysis.xml:
--- a/flys-artifacts/doc/conf/mapserver/db_layer.vm	Mon May 07 13:27:45 2012 +0000
+++ b/flys-artifacts/doc/conf/mapserver/db_layer.vm	Tue May 08 10:19:43 2012 +0000
@@ -21,6 +21,10 @@
         LABELITEM $LAYER.getLabelItem()
     #end
 
+    PROJECTION
+        "init=epsg:$LAYER.getSrid()"
+    END
+
     METADATA
         "wms_title" "$LAYER.getTitle()"
         "gml_include_items" "all"
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/LayerInfo.java	Mon May 07 13:27:45 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/LayerInfo.java	Tue May 08 10:19:43 2012 +0000
@@ -10,6 +10,7 @@
     protected String connection;
     protected String connectionType;
     protected String extent;
+    protected String srid;
     protected String group;
     protected String groupTitle;
     protected String title;
@@ -122,6 +123,16 @@
     }
 
 
+    public void setSrid(String srid) {
+        this.srid = srid;
+    }
+
+
+    public String getSrid() {
+        return srid;
+    }
+
+
     public void setStyle(String style) {
         this.style = style;
     }
--- a/flys-artifacts/src/main/java/de/intevation/flys/utils/MapfileGenerator.java	Mon May 07 13:27:45 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/utils/MapfileGenerator.java	Tue May 08 10:19:43 2012 +0000
@@ -392,6 +392,7 @@
                                             "floodmap.uesk",
                                             "Floodmap"));
         layerinfo.setStyle(style);
+        layerinfo.setSrid(wms.getSrid());
 
         String name = MS_LAYER_PREFIX + wms.getName();
 
@@ -458,6 +459,7 @@
         lineInfo.setTitle("I18N_LINE_SHAPE");
         lineInfo.setGroup(group);
         lineInfo.setGroupTitle(groupTitle);
+        lineInfo.setSrid(wms.getSrid());
 
         String nameLines = MS_LAYER_PREFIX + wms.getName() + "-lines";
 
@@ -503,6 +505,7 @@
         polygonInfo.setTitle("I18N_POLYGON_SHAPE");
         polygonInfo.setGroup(group);
         polygonInfo.setGroupTitle(groupTitle);
+        polygonInfo.setSrid(wms.getSrid());
 
         String namePolygons = MS_LAYER_PREFIX + wms.getName() + "-polygons";
 
@@ -567,6 +570,7 @@
         info.setTitle("I18N_USER_SHAPE");
         info.setGroup(group);
         info.setGroupTitle(groupTitle);
+        info.setSrid(wms.getSrid());
 
         String nameUser = MS_LAYER_PREFIX + wms.getName();
 
@@ -614,6 +618,7 @@
         layerinfo.setConnection(wms.getConnection());
         layerinfo.setConnectionType(wms.getConnectionType());
         layerinfo.setLabelItem(wms.getLabelItem());
+        layerinfo.setSrid(wms.getSrid());
 
         String name = MS_LAYER_PREFIX + wms.getName();
 

http://dive4elements.wald.intevation.org