[Dive4elements-commits] [PATCH] Fix river_axes maps when using oracle

Wald Commits scm-commit at wald.intevation.org
Thu Mar 14 17:07:16 CET 2013


# HG changeset patch
# User Andre Heinecke <aheinecke at intevation.de>
# Date 1363276172 -3600
# Node ID ffa5eaad3a7b8518f235660a5ba67353a09d7872
# Parent  08b3109c637b2d24082dcf5d1d032be92125ffb4
Fix river_axes maps when using oracle.

    Oraclespatial always needs an SRID in the Data string

diff -r 08b3109c637b -r ffa5eaad3a7b flys-artifacts/src/main/java/de/intevation/flys/artifacts/RiverAxisArtifact.java
--- 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";
diff -r 08b3109c637b -r ffa5eaad3a7b flys-artifacts/src/main/java/de/intevation/flys/utils/RiverMapfileGenerator.java
--- 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");
 


More information about the Dive4elements-commits mailing list