Mercurial > dive4elements > river
comparison flys-artifacts/src/main/java/de/intevation/flys/artifacts/services/MapInfoService.java @ 1774:092e1e5020bc
Added a new MapGenerator which only returns a map configuration document at the moment (work still in progress).
flys-artifacts/trunk@3095 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Ingo Weinzierl <ingo.weinzierl@intevation.de> |
---|---|
date | Fri, 28 Oct 2011 05:54:25 +0000 |
parents | b1b0a0b61845 |
children | cbeeaaad1056 |
comparison
equal
deleted
inserted
replaced
1773:9be01e2e6897 | 1774:092e1e5020bc |
---|---|
3 import org.apache.log4j.Logger; | 3 import org.apache.log4j.Logger; |
4 | 4 |
5 import org.w3c.dom.Document; | 5 import org.w3c.dom.Document; |
6 import org.w3c.dom.Element; | 6 import org.w3c.dom.Element; |
7 | 7 |
8 import com.vividsolutions.jts.geom.Geometry; | 8 import com.vividsolutions.jts.geom.Envelope; |
9 | 9 |
10 import de.intevation.artifacts.CallMeta; | 10 import de.intevation.artifacts.CallMeta; |
11 import de.intevation.artifacts.GlobalContext; | 11 import de.intevation.artifacts.GlobalContext; |
12 | 12 |
13 import de.intevation.artifacts.common.ArtifactNamespaceContext; | 13 import de.intevation.artifacts.common.ArtifactNamespaceContext; |
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 RiverAxis axis = RiverAxis.getRiverAxis(river); |
81 if (axis != null) { | 81 if (axis != null) { |
82 Geometry geom = axis.getGeom().getBoundary(); | 82 Envelope env = axis.getGeom().getEnvelopeInternal(); |
83 String bounds = GeometryUtils.jtsBoundsToOLBounds(geom); | 83 String bounds = GeometryUtils.jtsBoundsToOLBounds(env); |
84 | 84 |
85 logger.debug("River '" + river + "' bounds: " + bounds); | 85 logger.debug("River '" + river + "' bounds: " + bounds); |
86 Element bbox = cr.create("bbox"); | 86 Element bbox = cr.create("bbox"); |
87 cr.addAttr(bbox, "value", bounds); | 87 cr.addAttr(bbox, "value", bounds); |
88 root.appendChild(bbox); | 88 root.appendChild(bbox); |