Mercurial > dive4elements > gnv-client
comparison gnv-artifacts/src/main/java/de/intevation/gnv/math/AttributedPoint2ds.java @ 657:af3f56758f59
merged gnv-artifacts/0.5
author | Thomas Arendsen Hein <thomas@intevation.de> |
---|---|
date | Fri, 28 Sep 2012 12:13:53 +0200 |
parents | 823e4f808418 |
children | c4156275c1e1 |
comparison
equal
deleted
inserted
replaced
590:5f5f273c8566 | 657:af3f56758f59 |
---|---|
1 package de.intevation.gnv.math; | |
2 | |
3 import com.vividsolutions.jts.geom.MultiLineString; | |
4 import com.vividsolutions.jts.geom.MultiPolygon; | |
5 | |
6 import de.intevation.gnv.utils.Pair; | |
7 | |
8 import java.io.Serializable; | |
9 | |
10 import java.util.HashMap; | |
11 import java.util.List; | |
12 import java.util.Map; | |
13 | |
14 /** | |
15 * @author Sascha L. Teichmann (sascha.teichmann@intevation.de) | |
16 */ | |
17 public class AttributedPoint2ds | |
18 implements Serializable | |
19 { | |
20 protected List<? extends Point2d> points; | |
21 protected Map attributes; | |
22 protected AreaInterpolation interpolation; | |
23 protected List<Pair<Object, MultiLineString>> lineStrings; | |
24 protected Map<Integer, MultiPolygon> polygons; | |
25 | |
26 public AttributedPoint2ds() { | |
27 } | |
28 | |
29 public AttributedPoint2ds(List<? extends Point2d> points) { | |
30 this.points = points; | |
31 } | |
32 | |
33 public Object getAttribute(Object key) { | |
34 return attributes != null | |
35 ? attributes.get(key) | |
36 : null; | |
37 } | |
38 | |
39 public void setAttribute(Object key, Object value) { | |
40 if (attributes == null) { | |
41 attributes = new HashMap(); | |
42 } | |
43 attributes.put(key, value); | |
44 } | |
45 | |
46 public List<? extends Point2d> getPoints() { | |
47 return points; | |
48 } | |
49 | |
50 public void setPoints(List<? extends Point2d> points) { | |
51 this.points = points; | |
52 } | |
53 | |
54 public void setInterpolation(AreaInterpolation interpolation) { | |
55 this.interpolation = interpolation; | |
56 } | |
57 | |
58 public AreaInterpolation getInterpolation() { | |
59 return interpolation; | |
60 } | |
61 | |
62 public void setPolygons(Map<Integer, MultiPolygon> polygons) { | |
63 this.polygons = polygons; | |
64 } | |
65 | |
66 public Map<Integer, MultiPolygon> getPolygons() { | |
67 return polygons; | |
68 } | |
69 | |
70 public void setLineStrings( | |
71 List<Pair<Object, MultiLineString>> lineStrings | |
72 ) { | |
73 this.lineStrings = lineStrings; | |
74 } | |
75 | |
76 public List<Pair<Object, MultiLineString>> getLineStrings() { | |
77 return lineStrings; | |
78 } | |
79 } | |
80 // vim:set ts=4 sw=4 si et sta sts=4 fenc=utf8 : |