svn-gvsig-desktop / trunk / org.gvsig.desktop / org.gvsig.desktop.compat.cdc / org.gvsig.fmap.mapcontext / org.gvsig.fmap.mapcontext.api / src / main / java / org / gvsig / fmap / mapcontext / layers / operations / InfoByPoint.java @ 40559
History | View | Annotate | Download (5.03 KB)
1 |
/**
|
---|---|
2 |
* gvSIG. Desktop Geographic Information System.
|
3 |
*
|
4 |
* Copyright (C) 2007-2013 gvSIG Association.
|
5 |
*
|
6 |
* This program is free software; you can redistribute it and/or
|
7 |
* modify it under the terms of the GNU General Public License
|
8 |
* as published by the Free Software Foundation; either version 3
|
9 |
* of the License, or (at your option) any later version.
|
10 |
*
|
11 |
* This program is distributed in the hope that it will be useful,
|
12 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
13 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
14 |
* GNU General Public License for more details.
|
15 |
*
|
16 |
* You should have received a copy of the GNU General Public License
|
17 |
* along with this program; if not, write to the Free Software
|
18 |
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
|
19 |
* MA 02110-1301, USA.
|
20 |
*
|
21 |
* For any additional information, do not hesitate to contact us
|
22 |
* at info AT gvsig.com, or visit our website www.gvsig.com.
|
23 |
*/
|
24 |
package org.gvsig.fmap.mapcontext.layers.operations; |
25 |
|
26 |
|
27 |
import org.gvsig.fmap.dal.exception.DataException; |
28 |
import org.gvsig.fmap.geom.primitive.Point; |
29 |
import org.gvsig.fmap.mapcontext.exceptions.LoadLayerException; |
30 |
import org.gvsig.tools.dynobject.DynObjectSet; |
31 |
import org.gvsig.tools.task.Cancellable; |
32 |
|
33 |
|
34 |
/**
|
35 |
* <p>Interface that must be implemented by layers which support the operation "<i>information by point</i>".</p>
|
36 |
*
|
37 |
* <p>That operation allows get meta-information from a point and an area around, of a layer.</p>
|
38 |
*/
|
39 |
public interface InfoByPoint { |
40 |
|
41 |
/**
|
42 |
* <p>
|
43 |
* Executes a consultation about information of a point on the layer.
|
44 |
* </p>
|
45 |
*
|
46 |
* <p>
|
47 |
* There is an area around the point where will got the information.
|
48 |
* </p>
|
49 |
*
|
50 |
* @param p
|
51 |
* point where is the consultation
|
52 |
* @param tolerance
|
53 |
* permissible margin around the coordinates of the point where
|
54 |
* the method will got the information. Each
|
55 |
* singular implementation of this method would use it in a
|
56 |
* different way. The coordinates also depend on the
|
57 |
* implementation.
|
58 |
* @param cancel
|
59 |
* shared object that determines if this layer can continue being
|
60 |
* drawn
|
61 |
*
|
62 |
* @return a DynObjectSet. If the InfoByPoint Object is a vector layer it
|
63 |
* should return a FeatureSet.
|
64 |
* @throws DataException
|
65 |
* TODO
|
66 |
* @throws LoadLayerException
|
67 |
* any exception produced using the driver.
|
68 |
*
|
69 |
* @deprecated use instead {@link #getInfo(Point, double)}
|
70 |
*/
|
71 |
public DynObjectSet getInfo(java.awt.Point p, double tolerance, Cancellable cancel) |
72 |
throws LoadLayerException, DataException;
|
73 |
|
74 |
/**
|
75 |
* <p>
|
76 |
* Executes a consultation about information of a point on the layer.
|
77 |
* </p>
|
78 |
*
|
79 |
* <p>
|
80 |
* There is an area around the point where will got the information.
|
81 |
* </p>
|
82 |
*
|
83 |
* @param p
|
84 |
* point where is the consultation
|
85 |
* @param tolerance
|
86 |
* permissible margin around the coordinates of the point where
|
87 |
* the method will got the information. Each
|
88 |
* singular implementation of this method would use it in a
|
89 |
* different way. The coordinates also depend on the
|
90 |
* implementation.
|
91 |
* @param cancel
|
92 |
* shared object that determines if this layer can continue being
|
93 |
* drawn
|
94 |
*
|
95 |
* @param fast
|
96 |
* if true try to reuse objects as much as possible to make the
|
97 |
* object iteration faster. If true, DynObjects got through the
|
98 |
* returned set must not be stored unless cloned.
|
99 |
*
|
100 |
* @return a DynObjectSet. If the InfoByPoint Object is a vector layer it
|
101 |
* should return a FeatureSet.
|
102 |
* @throws DataException
|
103 |
* TODO
|
104 |
* @throws LoadLayerException
|
105 |
* any exception produced using the driver.
|
106 |
*
|
107 |
* @deprecated use instead {@link #getInfo(Point, double)}
|
108 |
*/
|
109 |
public DynObjectSet getInfo(java.awt.Point p, double tolerance, Cancellable cancel, |
110 |
boolean fast) throws LoadLayerException, DataException; |
111 |
|
112 |
/**
|
113 |
* <p>
|
114 |
* Executes a consultation about information of a point on the layer.
|
115 |
* </p>
|
116 |
*
|
117 |
* <p>
|
118 |
* There is an area around the point where will got the information.
|
119 |
* </p>
|
120 |
*
|
121 |
* @param p
|
122 |
* point in map coordinates where is the consultation
|
123 |
* @param tolerance
|
124 |
* permissible margin around the coordinates of the point where
|
125 |
* the method will got the information. Each
|
126 |
* singular implementation of this method would use it in a
|
127 |
* different way. The unit are in map coordinates.
|
128 |
*/
|
129 |
public DynObjectSet getInfo(Point p, double tolerance) throws LoadLayerException, DataException; |
130 |
} |