Mercurial > dive4elements > gnv-client
diff gnv-artifacts/src/main/java/de/intevation/gnv/raster/JTSMultiLineStringProducer.java @ 802:4abe172be970
Finished Javadoc of the raster package.
gnv-artifacts/trunk@884 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Wed, 07 Apr 2010 07:49:12 +0000 |
parents | c4156275c1e1 |
children | feae2f9d6c6f |
line wrap: on
line diff
--- a/gnv-artifacts/src/main/java/de/intevation/gnv/raster/JTSMultiLineStringProducer.java Tue Apr 06 16:53:43 2010 +0000 +++ b/gnv-artifacts/src/main/java/de/intevation/gnv/raster/JTSMultiLineStringProducer.java Wed Apr 07 07:49:12 2010 +0000 @@ -22,6 +22,9 @@ import org.apache.log4j.Logger; /** + * Vectorizer backend to generated iso lines in form of + * JTS multi linestrings. + * * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a> */ public class JTSMultiLineStringProducer @@ -30,10 +33,25 @@ private static Logger log = Logger.getLogger( JTSMultiLineStringProducer.class); + /** + * The JTS geometry factory of this producer. + */ protected GeometryFactory geometryFactory; + /** + * The polygon used to clip the produced multe line strings. + */ protected Polygon clip; + /** + * Constructor to create a JTSMultiLineStringProducer with + * a given clipping polygon and a world bounding box. + * @param clip The clipping polygon. + * @param minX Min x coord of the world. + * @param minY Min y coord of the world. + * @param maxX Max x coord of the world. + * @param maxY Max y coord of the world. + */ public JTSMultiLineStringProducer( Polygon clip, double minX, double minY, @@ -47,6 +65,17 @@ maxX, maxY); } + /** + * Constructor to create a JTSMultiLineStringProducer with + * a given clipping polygon, a geometry factory + * and a world bounding box. + * @param clip The clipping polygon. + * @param geometryFactory The geometry factory. + * @param minX Min x coord of the world. + * @param minY Min y coord of the world. + * @param maxX Max x coord of the world. + * @param maxY Max y coord of the world. + */ public JTSMultiLineStringProducer( Polygon clip, GeometryFactory geometryFactory, @@ -58,6 +87,12 @@ this.geometryFactory = geometryFactory; } + /** + * Clips a given line string against the clippin polygon. The + * result is stored in the given list of line strings. + * @param lineString The line string to be clipped. + * @param lineStrings The result line string list. + */ protected void clipLineString( LineString lineString, ArrayList<LineString> lineStrings @@ -99,6 +134,13 @@ } } + /** + * Returns a list of pairs attribute -> multi line string. + * All line strings produced are grouped by there attribute + * which is generated with the given attribute generator. + * @param attributeGenerator The attribute generator. + * @return The list of attribute/multi line strings. + */ public List<Pair<Object, MultiLineString>> getMultiLineStrings( AttributeGenerator attributeGenerator ) {