changeset 5304:ffa5eaad3a7b

Fix river_axes maps when using oracle. Oraclespatial always needs an SRID in the Data string
author Andre Heinecke <aheinecke@intevation.de>
date Thu, 14 Mar 2013 16:49:32 +0100
parents 08b3109c637b
children e60f65540cc2
files flys-artifacts/src/main/java/de/intevation/flys/artifacts/RiverAxisArtifact.java flys-artifacts/src/main/java/de/intevation/flys/utils/RiverMapfileGenerator.java
diffstat 2 files changed, 7 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/RiverAxisArtifact.java	Thu Mar 14 15:32:50 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/RiverAxisArtifact.java	Thu Mar 14 16:49:32 2013 +0100
@@ -145,7 +145,7 @@
         @Override
         protected String getDataString() {
             if (FLYSUtils.isUsingOracle()) {
-                return "geom FROM river_axes";
+                return "geom FROM river_axes USING SRID " + getSrid();
             }
             else {
                 return "geom FROM river_axes USING UNIQUE id";
--- a/flys-artifacts/src/main/java/de/intevation/flys/utils/RiverMapfileGenerator.java	Thu Mar 14 15:32:50 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/utils/RiverMapfileGenerator.java	Thu Mar 14 16:49:32 2013 +0100
@@ -110,7 +110,12 @@
         layerInfo.setSrid(srid);
         layerInfo.setExtent(extend);
         layerInfo.setType("line");
-        layerInfo.setData("geom FROM river_axes");      // FIXME: Use templates for that
+        // FIXME: Use templates for that
+        if (FLYSUtils.isUsingOracle()) {
+            layerInfo.setData("geom FROM river_axes USING SRID " + srid);
+        } else {
+            layerInfo.setData("geom FROM river_axes");
+        }
         layerInfo.setFilter("river_id = " + riverID);
         layerInfo.setTitle(riverName + " RiverAxis");
 

http://dive4elements.wald.intevation.org