Mercurial > dive4elements > river
diff flys-artifacts/src/main/java/de/intevation/flys/utils/GeometryUtils.java @ 3286:f062b5a90e26
Add showpointlabel style attribute
flys-artifacts/trunk@4948 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Christian Lins <christian.lins@intevation.de> |
---|---|
date | Thu, 12 Jul 2012 11:51:32 +0000 |
parents | 33aa37e6d98f |
children | c8f670ae96e8 |
line wrap: on
line diff
--- a/flys-artifacts/src/main/java/de/intevation/flys/utils/GeometryUtils.java Thu Jul 12 07:47:45 2012 +0000 +++ b/flys-artifacts/src/main/java/de/intevation/flys/utils/GeometryUtils.java Thu Jul 12 11:51:32 2012 +0000 @@ -1,7 +1,13 @@ package de.intevation.flys.utils; +import com.vividsolutions.jts.geom.Coordinate; +import com.vividsolutions.jts.geom.Envelope; +import com.vividsolutions.jts.geom.Geometry; + +import de.intevation.flys.model.RiverAxis; + +import java.io.File; import java.io.IOException; -import java.io.File; import java.io.Serializable; import java.net.MalformedURLException; import java.util.ArrayList; @@ -10,11 +16,19 @@ import java.util.Map; import org.apache.log4j.Logger; - -import com.vividsolutions.jts.geom.Coordinate; -import com.vividsolutions.jts.geom.Envelope; -import com.vividsolutions.jts.geom.Geometry; - +import org.geotools.data.DataStoreFactorySpi; +import org.geotools.data.DefaultTransaction; +import org.geotools.data.FeatureWriter; +import org.geotools.data.Transaction; +import org.geotools.data.shapefile.ShapefileDataStore; +import org.geotools.data.shapefile.ShapefileDataStoreFactory; +import org.geotools.data.simple.SimpleFeatureIterator; +import org.geotools.feature.FeatureCollection; +import org.geotools.feature.FeatureIterator; +import org.geotools.feature.simple.SimpleFeatureTypeBuilder; +import org.geotools.geojson.feature.FeatureJSON; +import org.geotools.geometry.jts.JTS; +import org.geotools.referencing.CRS; import org.opengis.feature.simple.SimpleFeature; import org.opengis.feature.simple.SimpleFeatureType; import org.opengis.referencing.FactoryException; @@ -23,22 +37,6 @@ import org.opengis.referencing.operation.MathTransform; import org.opengis.referencing.operation.TransformException; -import org.geotools.data.DataStoreFactorySpi; -import org.geotools.data.DefaultTransaction; -import org.geotools.data.FeatureWriter; -import org.geotools.data.Transaction; -import org.geotools.data.shapefile.ShapefileDataStore; -import org.geotools.data.shapefile.ShapefileDataStoreFactory; -import org.geotools.data.simple.SimpleFeatureIterator; -import org.geotools.feature.FeatureIterator; -import org.geotools.feature.FeatureCollection; -import org.geotools.feature.simple.SimpleFeatureTypeBuilder; -import org.geotools.geojson.feature.FeatureJSON; -import org.geotools.geometry.jts.JTS; -import org.geotools.referencing.CRS; - -import de.intevation.flys.model.RiverAxis; - public class GeometryUtils { @@ -134,7 +132,7 @@ public static SimpleFeatureType buildFeatureType( - String name, String srs, Class geometryType) + String name, String srs, Class<?> geometryType) { return buildFeatureType(name, srs, geometryType, null); } @@ -153,7 +151,7 @@ * @return a new SimpleFeatureType. */ public static SimpleFeatureType buildFeatureType( - String name, String srs, Class geometryType, Object[][] attrs) + String name, String srs, Class<?> geometryType, Object[][] attrs) { try { SimpleFeatureTypeBuilder builder = new SimpleFeatureTypeBuilder(); @@ -168,7 +166,7 @@ if (attrs != null) { for (Object[] attr: attrs) { - builder.add((String) attr[0], (Class) attr[1]); + builder.add((String) attr[0], (Class<?>) attr[1]); } }