# HG changeset patch # User Ingo Weinzierl # Date 1336472383 0 # Node ID 7a124cb11d8e65659100b43050ed375cad792253 # Parent 53f42adf450570daf48ff0f158edd8c06ece284a Added a PROJECTION section to all db mapserver layers. flys-artifacts/trunk@4355 c6561f87-3c4e-4783-a992-168aeb5c3f6f diff -r 53f42adf4505 -r 7a124cb11d8e flys-artifacts/ChangeLog --- 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 + + * 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 * doc/conf/artifacts/fixanalysis.xml: diff -r 53f42adf4505 -r 7a124cb11d8e flys-artifacts/doc/conf/mapserver/db_layer.vm --- 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" diff -r 53f42adf4505 -r 7a124cb11d8e flys-artifacts/src/main/java/de/intevation/flys/artifacts/model/LayerInfo.java --- 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; } diff -r 53f42adf4505 -r 7a124cb11d8e flys-artifacts/src/main/java/de/intevation/flys/utils/MapfileGenerator.java --- 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();