annotate gnv-artifacts/src/main/java/de/intevation/gnv/raster/IsoPolygonSeriesProducer.java @ 1065:cf421645a2d3

Made cache statistics available as MBeans (eg in JConsole). gnv-artifacts/trunk@1157 c6561f87-3c4e-4783-a992-168aeb5c3f6f
author Ingo Weinzierl <ingo.weinzierl@intevation.de>
date Fri, 04 Jun 2010 08:47:52 +0000
parents 4abe172be970
children f953c9a559d8
rev   line source
437
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
1 package de.intevation.gnv.raster;
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
2
779
b1f5f2a8840f Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 521
diff changeset
3 import de.intevation.gnv.jfreechart.CompactXYItems;
b1f5f2a8840f Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 521
diff changeset
4 import de.intevation.gnv.jfreechart.PolygonSeries;
b1f5f2a8840f Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 521
diff changeset
5
b1f5f2a8840f Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 521
diff changeset
6 import de.intevation.gnv.math.IJKey;
b1f5f2a8840f Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 521
diff changeset
7
b1f5f2a8840f Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 521
diff changeset
8 import de.intevation.gnv.raster.Vectorizer.Edge;
b1f5f2a8840f Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 521
diff changeset
9
b1f5f2a8840f Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 521
diff changeset
10 import gnu.trove.TDoubleArrayList;
b1f5f2a8840f Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 521
diff changeset
11 import gnu.trove.TIntObjectHashMap;
b1f5f2a8840f Ordered imports. Removed needless imports. Removed empty headers.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 521
diff changeset
12
437
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
13 import java.util.ArrayList;
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
14 import java.util.Collection;
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
15
447
92b7ccbf6163 Improved generation of iso lines in vertical cross section.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 440
diff changeset
16 import org.apache.log4j.Logger;
92b7ccbf6163 Improved generation of iso lines in vertical cross section.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 440
diff changeset
17
437
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
18 /**
802
4abe172be970 Finished Javadoc of the raster package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 801
diff changeset
19 * Vectorizer backend to generate iso lines which are able to be visualized
4abe172be970 Finished Javadoc of the raster package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 801
diff changeset
20 * via {@link de.intevation.gnv.jfreechart.PolygonPlot} as line strings
4abe172be970 Finished Javadoc of the raster package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 801
diff changeset
21 * and custom labels on the chart.
4abe172be970 Finished Javadoc of the raster package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 801
diff changeset
22 *
780
c4156275c1e1 Bring @author javadoc tags in form '@author <a href="john.doe@example.com">John Doe</a>'
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 779
diff changeset
23 * @author <a href="mailto:sascha.teichmann@intevation.de">Sascha L. Teichmann</a>
437
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
24 */
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
25 public class IsoPolygonSeriesProducer
465
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 448
diff changeset
26 extends IsoProducer
437
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
27 {
448
3cb2bea50456 Generate iso line classes according gnv-issues/issue108
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 447
diff changeset
28 private static Logger log = Logger.getLogger(
3cb2bea50456 Generate iso line classes according gnv-issues/issue108
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 447
diff changeset
29 IsoPolygonSeriesProducer.class);
447
92b7ccbf6163 Improved generation of iso lines in vertical cross section.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 440
diff changeset
30
802
4abe172be970 Finished Javadoc of the raster package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 801
diff changeset
31 /**
4abe172be970 Finished Javadoc of the raster package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 801
diff changeset
32 * The line width of the line string used in the chart.
4abe172be970 Finished Javadoc of the raster package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 801
diff changeset
33 */
4abe172be970 Finished Javadoc of the raster package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 801
diff changeset
34 public static final Float LINE_WIDTH = Float.valueOf(0.1f);
447
92b7ccbf6163 Improved generation of iso lines in vertical cross section.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 440
diff changeset
35
802
4abe172be970 Finished Javadoc of the raster package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 801
diff changeset
36 /**
4abe172be970 Finished Javadoc of the raster package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 801
diff changeset
37 * Constructor to create an IsoPolygonSeriesProducer with a
4abe172be970 Finished Javadoc of the raster package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 801
diff changeset
38 * given world bounding box.
4abe172be970 Finished Javadoc of the raster package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 801
diff changeset
39 * @param minX Min x coord of the world.
4abe172be970 Finished Javadoc of the raster package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 801
diff changeset
40 * @param minY Min y coord of the world.
4abe172be970 Finished Javadoc of the raster package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 801
diff changeset
41 * @param maxX Max x coord of the world.
4abe172be970 Finished Javadoc of the raster package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 801
diff changeset
42 * @param maxY Max y coord of the world.
4abe172be970 Finished Javadoc of the raster package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 801
diff changeset
43 */
437
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
44 public IsoPolygonSeriesProducer(
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
45 double minX, double minY,
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
46 double maxX, double maxY
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
47 ) {
465
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 448
diff changeset
48 super(minX, minY, maxX, maxY);
437
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
49 }
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
50
802
4abe172be970 Finished Javadoc of the raster package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 801
diff changeset
51 /**
4abe172be970 Finished Javadoc of the raster package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 801
diff changeset
52 * Returns a collection of series with line strings
4abe172be970 Finished Javadoc of the raster package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 801
diff changeset
53 * with no AttributeGenerator.
4abe172be970 Finished Javadoc of the raster package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 801
diff changeset
54 * @return The collection with line strings.
4abe172be970 Finished Javadoc of the raster package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 801
diff changeset
55 */
437
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
56 public Collection<PolygonSeries> getSeries() {
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
57 return getSeries(null);
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
58 }
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
59
802
4abe172be970 Finished Javadoc of the raster package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 801
diff changeset
60 /**
4abe172be970 Finished Javadoc of the raster package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 801
diff changeset
61 * Returns a collection of series with line strings.
4abe172be970 Finished Javadoc of the raster package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 801
diff changeset
62 * The label attributes are generated with a given generator.
4abe172be970 Finished Javadoc of the raster package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 801
diff changeset
63 * @param attributeGenerator The attribute generator. Maybe null
4abe172be970 Finished Javadoc of the raster package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 801
diff changeset
64 * if no attributes should be generated.
4abe172be970 Finished Javadoc of the raster package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 801
diff changeset
65 * @return The collection with the line strings.
4abe172be970 Finished Javadoc of the raster package.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 801
diff changeset
66 */
448
3cb2bea50456 Generate iso line classes according gnv-issues/issue108
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 447
diff changeset
67 public Collection<PolygonSeries> getSeries(
3cb2bea50456 Generate iso line classes according gnv-issues/issue108
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 447
diff changeset
68 AttributeGenerator attributeGenerator
3cb2bea50456 Generate iso line classes according gnv-issues/issue108
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 447
diff changeset
69 ) {
437
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
70 ArrayList<PolygonSeries> series = new ArrayList<PolygonSeries>();
447
92b7ccbf6163 Improved generation of iso lines in vertical cross section.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 440
diff changeset
71
437
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
72 double b1 = minX;
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
73 double m1 = width != 1
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
74 ? (maxX - minX)/(width-1)
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
75 : 0d;
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
76
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
77 double b2 = minY;
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
78 double m2 = height != 1
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
79 ? (maxY - minY)/(height-1)
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
80 : 0d;
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
81
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
82 TDoubleArrayList vertices = new TDoubleArrayList();
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
83
465
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 448
diff changeset
84 for (IJKey key: joinPairs()) {
437
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
85 PolygonSeries ps = new PolygonSeries();
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
86
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
87 // process complete
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
88 ArrayList<Edge> completeList = complete.get(key);
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
89 if (completeList != null) {
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
90 for (Edge head: completeList) {
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
91 Edge current = head;
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
92 do {
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
93 vertices.add(m1*(current.a % width) + b1);
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
94 vertices.add(m2*(current.a / width) + b2);
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
95 }
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
96 while ((current = current.next) != head);
447
92b7ccbf6163 Improved generation of iso lines in vertical cross section.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 440
diff changeset
97 // add head again to close shape
92b7ccbf6163 Improved generation of iso lines in vertical cross section.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 440
diff changeset
98 vertices.add(m1*(head.a % width) + b1);
92b7ccbf6163 Improved generation of iso lines in vertical cross section.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 440
diff changeset
99 vertices.add(m2*(head.a / width) + b2);
437
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
100 ps.addRing(new CompactXYItems(vertices.toNativeArray()));
521
1bf058f1a2d1 Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 465
diff changeset
101 vertices.reset();
437
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
102 }
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
103 }
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
104
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
105 // process open
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
106 TIntObjectHashMap map = commonOpen.get(key);
447
92b7ccbf6163 Improved generation of iso lines in vertical cross section.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 440
diff changeset
107
437
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
108 if (map != null) {
465
f7038820df2e Added support to trace rasters to JTS multi polygons and multi line strings.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 448
diff changeset
109 for (Edge head: headList(map)) {
447
92b7ccbf6163 Improved generation of iso lines in vertical cross section.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 440
diff changeset
110
437
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
111 head = Vectorizer.simplify(head, width);
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
112 Edge current = head, last = head;
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
113 do {
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
114 vertices.add(m1*(current.a % width) + b1);
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
115 vertices.add(m2*(current.a / width) + b2);
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
116 last = current;
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
117 }
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
118 while ((current = current.next) != null);
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
119 // add b from tail
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
120 vertices.add(m1*(last.b % width) + b1);
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
121 vertices.add(m2*(last.b / width) + b2);
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
122 ps.addRing(new CompactXYItems(vertices.toNativeArray()));
521
1bf058f1a2d1 Generate seabed polygon to "Profilschnitte".
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 465
diff changeset
123 vertices.reset();
437
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
124 } // for all in common open
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
125 } // if map defined for key
447
92b7ccbf6163 Improved generation of iso lines in vertical cross section.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 440
diff changeset
126
801
d766fe2d917a More javadoc.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 798
diff changeset
127 if (ps.getItemCount() > 0) {
d766fe2d917a More javadoc.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 798
diff changeset
128 series.add(ps);
d766fe2d917a More javadoc.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 798
diff changeset
129 if (attributeGenerator != null) {
448
3cb2bea50456 Generate iso line classes according gnv-issues/issue108
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 447
diff changeset
130 Object attribute = attributeGenerator
3cb2bea50456 Generate iso line classes according gnv-issues/issue108
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 447
diff changeset
131 .generateAttribute(key.i, key.j);
3cb2bea50456 Generate iso line classes according gnv-issues/issue108
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 447
diff changeset
132
3cb2bea50456 Generate iso line classes according gnv-issues/issue108
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 447
diff changeset
133 if (attribute != null) {
3cb2bea50456 Generate iso line classes according gnv-issues/issue108
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 447
diff changeset
134 ps.setAttribute("label", attribute);
801
d766fe2d917a More javadoc.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 798
diff changeset
135 }
d766fe2d917a More javadoc.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 798
diff changeset
136 }
d766fe2d917a More javadoc.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 798
diff changeset
137 ps.setAttribute("line.width", LINE_WIDTH);
d766fe2d917a More javadoc.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 798
diff changeset
138 }
437
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
139 } // for all pairs
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
140
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
141 return series;
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
142 }
b624879d2902 Added vectorizer rings callback to generate iso lines.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents:
diff changeset
143 }
798
6cff63d0c434 Fixed vim modeline. Added some Javadoc.
Sascha L. Teichmann <sascha.teichmann@intevation.de>
parents: 780
diff changeset
144 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 :

http://dive4elements.wald.intevation.org