Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/raster/PolygonDatasetProducer.java @ 801:d766fe2d917a
More javadoc.
gnv-artifacts/trunk@883 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author | Sascha L. Teichmann <sascha.teichmann@intevation.de> |
---|---|
date | Tue, 06 Apr 2010 16:53:43 +0000 |
parents | 6cff63d0c434 |
children | feae2f9d6c6f |
comparison
equal
deleted
inserted
replaced
800:db5b04ecb426 | 801:d766fe2d917a |
---|---|
10 | 10 |
11 import java.util.HashMap; | 11 import java.util.HashMap; |
12 import java.util.List; | 12 import java.util.List; |
13 | 13 |
14 /** | 14 /** |
15 * Vectorizer backend to produce polygon datasets suitable to being | |
16 * displayed with {@link de.intevation.gnv.jfreechart.PolygonPlot}. | |
17 * | |
15 * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a> | 18 * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a> |
16 */ | 19 */ |
17 public class PolygonDatasetProducer | 20 public class PolygonDatasetProducer |
18 extends AbstractProducer | 21 extends AbstractProducer |
19 { | 22 { |
23 /** | |
24 * Maps value integers to series of polygons to group | |
25 * them by value. | |
26 */ | |
20 protected HashMap<Integer, PolygonSeries> polygonSeries; | 27 protected HashMap<Integer, PolygonSeries> polygonSeries; |
21 | 28 |
29 /** | |
30 * Default constructor. | |
31 */ | |
22 protected PolygonDatasetProducer() { | 32 protected PolygonDatasetProducer() { |
23 } | 33 } |
24 | 34 |
35 /** | |
36 * Constructor to create a PolygonDatasetProducer with | |
37 * a given world bound box. | |
38 * @param minX Min x coord of the world. | |
39 * @param minY Min y coord of the world. | |
40 * @param maxX Max x coord of the world. | |
41 * @param maxY Max y coord of the world. | |
42 */ | |
25 public PolygonDatasetProducer( | 43 public PolygonDatasetProducer( |
26 double minX, double minY, | 44 double minX, double minY, |
27 double maxX, double maxY | 45 double maxX, double maxY |
28 | 46 |
29 ) { | 47 ) { |
77 ps.addRing(new CompactXYItems(vertices.toNativeArray())); | 95 ps.addRing(new CompactXYItems(vertices.toNativeArray())); |
78 vertices.reset(); | 96 vertices.reset(); |
79 } | 97 } |
80 } | 98 } |
81 | 99 |
100 /** | |
101 * Creates a new PolygonDataset from the polygons build by this | |
102 * backend. | |
103 * @return the new PolygonDataset | |
104 */ | |
82 public PolygonDataset getPolygonDataset() { | 105 public PolygonDataset getPolygonDataset() { |
83 return new PolygonDataset(polygonSeries.values()); | 106 return new PolygonDataset(polygonSeries.values()); |
84 } | 107 } |
85 } | 108 } |
86 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : | 109 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |