diff flys-artifacts/src/main/java/de/intevation/flys/artifacts/services/MapInfoService.java @ 2078:cbeeaaad1056

#440 Support river axes that consist of more than a single geometry. flys-artifacts/trunk@3593 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Thu, 05 Jan 2012 10:46:32 +0000
parents 092e1e5020bc
children a18ec861b4a4
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/artifacts/services/MapInfoService.java	Thu Jan 05 08:34:47 2012 +0000
+++ b/flys-artifacts/src/main/java/de/intevation/flys/artifacts/services/MapInfoService.java	Thu Jan 05 10:46:32 2012 +0000
@@ -77,12 +77,11 @@
         cr.addAttr(root, "name", river);
         mapinfo.appendChild(root);
 
-        RiverAxis axis = RiverAxis.getRiverAxis(river);
-        if (axis != null) {
-            Envelope env    = axis.getGeom().getEnvelopeInternal();
-            String   bounds = GeometryUtils.jtsBoundsToOLBounds(env);
+        Envelope env = GeometryUtils.getRiverBoundary(river);
+        if (env != null) {
+            String bounds = GeometryUtils.jtsBoundsToOLBounds(env);
+            logger.debug("River '" + river + "' bounds: " + bounds);
 
-            logger.debug("River '" + river + "' bounds: " + bounds);
             Element bbox = cr.create("bbox");
             cr.addAttr(bbox, "value", bounds);
             root.appendChild(bbox);

http://dive4elements.wald.intevation.org