Mercurial > dive4elements > river
comparison 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 |
comparison
equal
deleted
inserted
replaced
2077:29459ddb6f30 | 2078:cbeeaaad1056 |
---|---|
75 | 75 |
76 Element root = cr.create("river"); | 76 Element root = cr.create("river"); |
77 cr.addAttr(root, "name", river); | 77 cr.addAttr(root, "name", river); |
78 mapinfo.appendChild(root); | 78 mapinfo.appendChild(root); |
79 | 79 |
80 RiverAxis axis = RiverAxis.getRiverAxis(river); | 80 Envelope env = GeometryUtils.getRiverBoundary(river); |
81 if (axis != null) { | 81 if (env != null) { |
82 Envelope env = axis.getGeom().getEnvelopeInternal(); | 82 String bounds = GeometryUtils.jtsBoundsToOLBounds(env); |
83 String bounds = GeometryUtils.jtsBoundsToOLBounds(env); | 83 logger.debug("River '" + river + "' bounds: " + bounds); |
84 | 84 |
85 logger.debug("River '" + river + "' bounds: " + bounds); | |
86 Element bbox = cr.create("bbox"); | 85 Element bbox = cr.create("bbox"); |
87 cr.addAttr(bbox, "value", bounds); | 86 cr.addAttr(bbox, "value", bounds); |
88 root.appendChild(bbox); | 87 root.appendChild(bbox); |
89 } | 88 } |
90 | 89 |