comparison flys-artifacts/src/main/java/de/intevation/flys/utils/GeometryUtils.java @ 1144:c07e9e9c7482

Set the river extent for WMSLayers in the FloodMapState. flys-artifacts/trunk@2667 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Wed, 07 Sep 2011 13:54:18 +0000
parents 66783d957201
children 0398c2b8dbaf
comparison
equal deleted inserted replaced
1143:eed81499b0d2 1144:c07e9e9c7482
30 import org.geotools.feature.FeatureCollection; 30 import org.geotools.feature.FeatureCollection;
31 import org.geotools.feature.simple.SimpleFeatureTypeBuilder; 31 import org.geotools.feature.simple.SimpleFeatureTypeBuilder;
32 import org.geotools.geojson.feature.FeatureJSON; 32 import org.geotools.geojson.feature.FeatureJSON;
33 import org.geotools.referencing.CRS; 33 import org.geotools.referencing.CRS;
34 34
35 import de.intevation.flys.model.RiverAxis;
36
35 37
36 public class GeometryUtils { 38 public class GeometryUtils {
37 39
38 private static final Logger logger = Logger.getLogger(GeometryUtils.class); 40 private static final Logger logger = Logger.getLogger(GeometryUtils.class);
39 41
40 42
41 private GeometryUtils() { 43 private GeometryUtils() {
44 }
45
46
47 public static String getRiverBounds(String rivername) {
48 RiverAxis axis = RiverAxis.getRiverAxis(rivername);
49 if (axis != null) {
50 // TODO Take the correct EPSG into account. Maybe, we need to
51 // reproject the geometry.
52 Geometry geom = axis.getGeom().getBoundary();
53 return jtsBoundsToOLBounds(geom);
54 }
55
56 return null;
42 } 57 }
43 58
44 59
45 /** 60 /**
46 * Returns the boundary of Geometry <i>geom</i> in OpenLayers 61 * Returns the boundary of Geometry <i>geom</i> in OpenLayers

http://dive4elements.wald.intevation.org