changeset 5140:18ef819a7c92

Changed river axis from LineString to MultiLineString.
author Raimund Renkert <rrenkert@intevation.de>
date Thu, 28 Feb 2013 14:04:41 +0100
parents 76db0e48dbc0
children 0773f4524107
files flys-artifacts/src/main/java/de/intevation/flys/utils/RiverMapfileGenerator.java flys-backend/src/main/java/de/intevation/flys/model/RiverAxis.java
diffstat 2 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/utils/RiverMapfileGenerator.java	Thu Feb 28 13:15:42 2013 +0100
+++ b/flys-artifacts/src/main/java/de/intevation/flys/utils/RiverMapfileGenerator.java	Thu Feb 28 14:04:41 2013 +0100
@@ -2,6 +2,7 @@
 
 import com.vividsolutions.jts.geom.Envelope;
 import com.vividsolutions.jts.geom.LineString;
+import com.vividsolutions.jts.geom.MultiLineString;
 
 import de.intevation.flys.artifacts.model.LayerInfo;
 import de.intevation.flys.artifacts.model.RiverFactory;
@@ -71,7 +72,7 @@
                 logger.warn("River " + river.getName() + " has no river axis!");
                 continue;
             }
-            LineString geom = riverAxis.get(0).getGeom();
+            MultiLineString geom = riverAxis.get(0).getGeom();
             Envelope extent = geom.getEnvelopeInternal();
 
             createRiverAxisLayer(
--- a/flys-backend/src/main/java/de/intevation/flys/model/RiverAxis.java	Thu Feb 28 13:15:42 2013 +0100
+++ b/flys-backend/src/main/java/de/intevation/flys/model/RiverAxis.java	Thu Feb 28 14:04:41 2013 +0100
@@ -14,7 +14,7 @@
 import org.hibernate.Query;
 import org.hibernate.annotations.Type;
 
-import com.vividsolutions.jts.geom.LineString;
+import com.vividsolutions.jts.geom.MultiLineString;
 
 import de.intevation.flys.backend.SessionHolder;
 
@@ -34,7 +34,7 @@
     private Integer    id;
     private Integer    kind;
     private River      river;
-    private LineString geom;
+    private MultiLineString geom;
 
     public static final int DEFAULT_KIND = 0;
 
@@ -82,12 +82,12 @@
 
     @Column(name = "geom")
     @Type(type = "org.hibernatespatial.GeometryUserType")
-    public LineString getGeom() {
+    public MultiLineString getGeom() {
         return geom;
     }
 
 
-    public void setGeom(LineString geom) {
+    public void setGeom(MultiLineString geom) {
         this.geom = geom;
     }
 

http://dive4elements.wald.intevation.org