Revision 217
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/drivers/RasterDBDriver.java | ||
---|---|---|
6 | 6 |
import java.awt.geom.Point2D; |
7 | 7 |
import java.awt.geom.Rectangle2D; |
8 | 8 |
|
9 |
import com.iver.cit.gvsig.fmap.layers.Raster; |
|
10 | 9 |
import com.iver.cit.gvsig.fmap.operations.selection.Record; |
11 | 10 |
|
12 | 11 |
|
13 |
public class RasterDBDriver implements Raster {
|
|
12 |
public class RasterDBDriver { |
|
14 | 13 |
|
15 | 14 |
/** |
16 |
* @see com.iver.cit.gvsig.fmap.layers.Raster#renderTo(java.awt.Graphics2D, java.awt.geom.Rectangle2D) |
|
15 |
* @see com.iver.cit.gvsig.fmap.layers.RasterAdapter#renderTo(java.awt.Graphics2D, java.awt.geom.Rectangle2D)
|
|
17 | 16 |
*/ |
18 | 17 |
public void renderTo(Graphics2D g, Rectangle2D rectVisible) throws DriverIOException { |
19 | 18 |
} |
20 | 19 |
|
21 | 20 |
/** |
22 |
* @see com.iver.cit.gvsig.fmap.layers.Raster#queryByPoint(java.awt.geom.Point2D, double) |
|
21 |
* @see com.iver.cit.gvsig.fmap.layers.RasterAdapter#queryByPoint(java.awt.geom.Point2D, double)
|
|
23 | 22 |
*/ |
24 | 23 |
public Record queryByPoint(Point2D p, double tolerancia) throws DriverIOException { |
25 | 24 |
return null; |
26 | 25 |
} |
27 | 26 |
|
28 | 27 |
/** |
29 |
* @see com.iver.cit.gvsig.fmap.layers.Raster#selectByPoint() |
|
28 |
* @see com.iver.cit.gvsig.fmap.layers.RasterAdapter#selectByPoint()
|
|
30 | 29 |
*/ |
31 | 30 |
public void selectByPoint() throws DriverIOException { |
32 | 31 |
} |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/drivers/VectorialDriver.java | ||
---|---|---|
1 | 1 |
/* Generated by Together */ |
2 |
|
|
3 | 2 |
package com.iver.cit.gvsig.fmap.drivers; |
4 | 3 |
|
4 |
import com.iver.cit.gvsig.fmap.layers.FRecordset; |
|
5 |
|
|
6 |
|
|
5 | 7 |
/** |
6 |
* La ?nica finalidad de esta clase es para que VectorialAdapter pueda devolver un VectorialDriver y referirse asi a cualquier driver vectorial |
|
8 |
* La ?nica finalidad de esta clase es para que VectorialAdapter pueda devolver |
|
9 |
* un VectorialDriver y referirse asi a cualquier driver vectorial |
|
7 | 10 |
*/ |
8 | 11 |
public interface VectorialDriver { |
9 |
/** |
|
10 |
* Devuelve el tipo de los shapes que hay en el fichero. Pueden haber varios tipos de shapes y para indicar esto se devuelve un bitor de los tipos que contiene el fichero. Por ejemplo un fichero que contenga textos y lineas devolver? la expresi?n (Vectorial.LINE | Vectorial.TEXT) |
|
11 |
*/ |
|
12 |
int getShapeType(); |
|
12 |
/** |
|
13 |
* Devuelve el tipo de los shapes que hay en el fichero. Pueden haber |
|
14 |
* varios tipos de shapes y para indicar esto se devuelve un bitor de los |
|
15 |
* tipos que contiene el fichero. Por ejemplo un fichero que contenga |
|
16 |
* textos y lineas devolver? la expresi?n (Vectorial.LINE | |
|
17 |
* Vectorial.TEXT) |
|
18 |
* |
|
19 |
* @return DOCUMENT ME! |
|
20 |
*/ |
|
21 |
int getShapeType(); |
|
22 |
|
|
23 |
/** |
|
24 |
* Obtiene la fuente de datos asociada al driver. Si devuelve null se |
|
25 |
* interpreta que la capa no tiene datos asociados. Ha de implementarse de |
|
26 |
* manera eficaz porque para comprobar si una capa tiene datos |
|
27 |
* alfanum?ricos asociados se comprueba el valor devuelto por ?ste m?todo. |
|
28 |
* En caso de que la fuente de datos necesite alguna inicializaci?n NO se |
|
29 |
* deber? realizar en el constructor |
|
30 |
* |
|
31 |
* @return |
|
32 |
*/ |
|
33 |
FRecordset getRecordset(); |
|
13 | 34 |
} |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/drivers/wms/WMSDriver.java | ||
---|---|---|
6 | 6 |
import java.io.IOException; |
7 | 7 |
import java.net.ProtocolException; |
8 | 8 |
import java.net.URL; |
9 |
import com.iver.cit.gvsig.fmap.layers.RasterDriver; |
|
9 | 10 |
|
10 |
public interface WMSDriver { |
|
11 |
public interface WMSDriver extends RasterDriver {
|
|
11 | 12 |
void getCapabilities(URL servidor) throws WMSException, IOException, ProtocolException; |
12 | 13 |
|
13 | 14 |
Image getMap(MapQuery mapQuery) throws WMSException, IOException, ProtocolException; |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/drivers/shp/DemoSHPDriver.java | ||
---|---|---|
15 | 15 |
import com.iver.cit.gvsig.fmap.core.ShapeFactory; |
16 | 16 |
import com.iver.cit.gvsig.fmap.drivers.BoundedShapes; |
17 | 17 |
import com.iver.cit.gvsig.fmap.drivers.VectorialFileDriver; |
18 |
import com.iver.cit.gvsig.fmap.layers.FRecordset; |
|
18 | 19 |
|
19 | 20 |
|
20 | 21 |
public class DemoSHPDriver implements VectorialFileDriver, BoundedShapes{ |
... | ... | |
409 | 410 |
|
410 | 411 |
return BoundingBox; |
411 | 412 |
} |
413 |
|
|
414 |
/** |
|
415 |
* @see com.iver.cit.gvsig.fmap.drivers.VectorialDriver#getRecordset() |
|
416 |
*/ |
|
417 |
public FRecordset getRecordset() { |
|
418 |
return null; |
|
419 |
} |
|
412 | 420 |
} |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/drivers/LabelDriver.java | ||
---|---|---|
7 | 7 |
import java.io.IOException; |
8 | 8 |
|
9 | 9 |
import com.iver.cit.gvsig.fmap.core.FGeometry; |
10 |
import com.iver.cit.gvsig.fmap.layers.FRecordset; |
|
10 | 11 |
|
11 | 12 |
/** |
12 | 13 |
* Driver que lee un shapefile de puntos y devuelve las FGeometry resultantes de las llamadas a ShapeFactory.createLabel() |
... | ... | |
58 | 59 |
public int getShapeType() { |
59 | 60 |
return 0; |
60 | 61 |
} |
62 |
|
|
63 |
/** |
|
64 |
* @see com.iver.cit.gvsig.fmap.drivers.VectorialDriver#getRecordset() |
|
65 |
*/ |
|
66 |
public FRecordset getRecordset() { |
|
67 |
return null; |
|
68 |
} |
|
61 | 69 |
} |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/drivers/RasterFileDriver.java | ||
---|---|---|
2 | 2 |
|
3 | 3 |
package com.iver.cit.gvsig.fmap.drivers; |
4 | 4 |
|
5 |
import java.awt.Graphics2D; |
|
6 |
import java.awt.geom.Point2D; |
|
7 | 5 |
import java.awt.geom.Rectangle2D; |
6 |
import com.iver.cit.gvsig.fmap.layers.RasterDriver; |
|
8 | 7 |
|
9 |
import com.iver.cit.gvsig.fmap.layers.Raster; |
|
10 |
import com.iver.cit.gvsig.fmap.operations.selection.Record; |
|
11 | 8 |
|
12 | 9 |
|
13 |
public class RasterFileDriver implements Raster { |
|
14 |
/** |
|
15 |
* @see com.iver.cit.gvsig.fmap.layers.Raster#renderTo(java.awt.Graphics2D, java.awt.geom.Rectangle2D) |
|
16 |
*/ |
|
17 |
public void renderTo(Graphics2D g, Rectangle2D rectVisible) throws DriverIOException { |
|
18 |
} |
|
19 |
|
|
20 |
/** |
|
21 |
* @see com.iver.cit.gvsig.fmap.layers.Raster#queryByPoint(java.awt.geom.Point2D, double) |
|
22 |
*/ |
|
23 |
public Record queryByPoint(Point2D p, double tolerancia) throws DriverIOException { |
|
24 |
return null; |
|
25 |
} |
|
26 |
|
|
27 |
/** |
|
28 |
* @see com.iver.cit.gvsig.fmap.layers.Raster#selectByPoint() |
|
29 |
*/ |
|
30 |
public void selectByPoint() throws DriverIOException { |
|
31 |
} |
|
10 |
public interface RasterFileDriver extends RasterDriver { |
|
11 |
int getBandCount(); |
|
12 |
double getValueByPixel(int x, int y); |
|
13 |
double getValueByPixel(int x, int y, int band); |
|
14 |
double[] getValuesByPixel(int x, int y); |
|
15 |
Rectangle2D getFullExtent(); |
|
32 | 16 |
} |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/Raster.java | ||
---|---|---|
1 |
/* Generated by Together */ |
|
2 |
|
|
3 |
package com.iver.cit.gvsig.fmap.layers; |
|
4 |
|
|
5 |
import java.awt.Graphics2D; |
|
6 |
import java.awt.geom.Point2D; |
|
7 |
import java.awt.geom.Rectangle2D; |
|
8 |
|
|
9 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
|
10 |
import com.iver.cit.gvsig.fmap.operations.selection.Record; |
|
11 |
|
|
12 |
|
|
13 |
public interface Raster { |
|
14 |
void renderTo(Graphics2D g, Rectangle2D rectVisible) throws DriverIOException; |
|
15 |
|
|
16 |
Record queryByPoint(Point2D p, double tolerancia) throws DriverIOException; |
|
17 |
|
|
18 |
void selectByPoint() throws DriverIOException; |
|
19 |
} |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/FLayers.java | ||
---|---|---|
12 | 12 |
import com.iver.cit.gvsig.fmap.XMLEntity; |
13 | 13 |
import com.iver.cit.gvsig.fmap.core.FGeometry; |
14 | 14 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
15 |
import com.iver.cit.gvsig.fmap.operations.selection.Record;
|
|
15 |
import com.iver.cit.gvsig.fmap.operations.selection.VectorialSubSet;
|
|
16 | 16 |
import com.iver.cit.gvsig.fmap.operations.strategies.FeatureSelectorVisitor; |
17 | 17 |
import com.iver.cit.gvsig.fmap.operations.strategies.FeatureVisitor; |
18 | 18 |
import com.iver.cit.gvsig.fmap.operations.strategies.Strategy; |
... | ... | |
182 | 182 |
} |
183 | 183 |
|
184 | 184 |
/** |
185 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#process(com.iver.cit.gvsig.fmap.FeatureSelectorVisitor) |
|
185 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#process(com.iver.cit.gvsig.fmap.FeatureSelectorVisitor, VectorialSubSet)
|
|
186 | 186 |
*/ |
187 |
public void process(FeatureSelectorVisitor visitor) { |
|
187 |
public void process(FeatureSelectorVisitor visitor, VectorialSubSet subset) {
|
|
188 | 188 |
} |
189 | 189 |
|
190 | 190 |
/** |
... | ... | |
194 | 194 |
} |
195 | 195 |
|
196 | 196 |
/** |
197 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#select(com.iver.cit.gvsig.fmap.FeatureSelectorVisitor) |
|
197 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#select(com.iver.cit.gvsig.fmap.FeatureSelectorVisitor, VectorialSubSet)
|
|
198 | 198 |
*/ |
199 |
public void select(FeatureSelectorVisitor visitor) { |
|
199 |
public void select(FeatureSelectorVisitor visitor, VectorialSubSet subset) {
|
|
200 | 200 |
} |
201 | 201 |
|
202 | 202 |
/** |
... | ... | |
226 | 226 |
/** |
227 | 227 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#queryByPoint(java.awt.geom.Point2D, double) |
228 | 228 |
*/ |
229 |
public Record[] queryByPoint(Point2D p, double tolerance) {
|
|
229 |
public VectorialSubSet queryByPoint(Point2D p, double tolerance) {
|
|
230 | 230 |
return null; |
231 | 231 |
} |
232 | 232 |
|
233 | 233 |
/** |
234 | 234 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#queryByRect(java.awt.geom.Rectangle2D) |
235 | 235 |
*/ |
236 |
public Record[] queryByRect(Rectangle2D rect) {
|
|
236 |
public VectorialSubSet queryByRect(Rectangle2D rect) {
|
|
237 | 237 |
return null; |
238 | 238 |
} |
239 | 239 |
|
240 | 240 |
/** |
241 | 241 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#queryByShape(com.iver.cit.gvsig.fmap.fshape.FGeometry, int) |
242 | 242 |
*/ |
243 |
public Record[] queryByShape(FGeometry g, int relationship) {
|
|
243 |
public VectorialSubSet queryByShape(FGeometry g, int relationship) {
|
|
244 | 244 |
return null; |
245 | 245 |
} |
246 | 246 |
|
... | ... | |
279 | 279 |
//TODO implementar bien |
280 | 280 |
return null; |
281 | 281 |
} |
282 |
|
|
283 |
/** |
|
284 |
* @see com.iver.cit.gvsig.fmap.layers.FLayer#getRecordset() |
|
285 |
*/ |
|
286 |
public FRecordset getRecordset() { |
|
287 |
return null; |
|
288 |
} |
|
282 | 289 |
} |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/OperationNotSupportedException.java | ||
---|---|---|
1 |
package com.iver.cit.gvsig.fmap.layers; |
|
2 |
|
|
3 |
/** |
|
4 |
* Lanzada cuando se intenta realizar una operaci?n generalmente sobre una clase |
|
5 |
* abstracta o interfaz y la implementaci?n de dicha clase abstracta o interfaz no soporta dicha |
|
6 |
* operaci?n. Ver la descripci?n del m?todo que la origin? |
|
7 |
*/ |
|
8 |
public class OperationNotSupportedException extends Exception { |
|
9 |
/** |
|
10 |
* |
|
11 |
*/ |
|
12 |
public OperationNotSupportedException() { |
|
13 |
super(); |
|
14 |
|
|
15 |
} |
|
16 |
/** |
|
17 |
* @param message |
|
18 |
*/ |
|
19 |
public OperationNotSupportedException(String message) { |
|
20 |
super(message); |
|
21 |
|
|
22 |
} |
|
23 |
/** |
|
24 |
* @param message |
|
25 |
* @param cause |
|
26 |
*/ |
|
27 |
public OperationNotSupportedException(String message, Throwable cause) { |
|
28 |
super(message, cause); |
|
29 |
|
|
30 |
} |
|
31 |
/** |
|
32 |
* @param cause |
|
33 |
*/ |
|
34 |
public OperationNotSupportedException(Throwable cause) { |
|
35 |
super(cause); |
|
36 |
|
|
37 |
} |
|
38 |
} |
|
0 | 39 |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/WMSAdapter.java | ||
---|---|---|
1 |
/* Generated by Together */ |
|
2 |
|
|
3 |
package com.iver.cit.gvsig.fmap.layers; |
|
4 |
|
|
5 |
public class WMSAdapter extends RasterAdapter { |
|
6 |
} |
|
0 | 7 |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/RasterDriver.java | ||
---|---|---|
1 |
/* Generated by Together */ |
|
2 |
|
|
3 |
package com.iver.cit.gvsig.fmap.layers; |
|
4 |
|
|
5 |
public interface RasterDriver { |
|
6 |
} |
|
0 | 7 |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/FLayer.java | ||
---|---|---|
1 | 1 |
/* Generated by Together */ |
2 |
|
|
3 | 2 |
package com.iver.cit.gvsig.fmap.layers; |
4 | 3 |
|
4 |
import com.iver.cit.gvsig.fmap.ViewPort; |
|
5 |
import com.iver.cit.gvsig.fmap.XMLEntity; |
|
6 |
import com.iver.cit.gvsig.fmap.core.FGeometry; |
|
7 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
|
8 |
import com.iver.cit.gvsig.fmap.operations.selection.VectorialSubSet; |
|
9 |
|
|
10 |
import org.cresques.cts.IProjection; |
|
11 |
|
|
12 |
import org.cresques.geo.Projected; |
|
13 |
|
|
5 | 14 |
import java.awt.Graphics2D; |
15 |
import java.awt.geom.Point2D; |
|
6 | 16 |
import java.awt.geom.Rectangle2D; |
7 | 17 |
import java.awt.image.BufferedImage; |
8 | 18 |
|
9 |
import org.cresques.cts.IProjection; |
|
10 |
import org.cresques.geo.Projected; |
|
11 | 19 |
|
12 |
import com.iver.cit.gvsig.fmap.ViewPort; |
|
13 |
import com.iver.cit.gvsig.fmap.XMLEntity; |
|
14 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
|
15 |
|
|
20 |
/** |
|
21 |
* DOCUMENT ME! |
|
22 |
*/ |
|
16 | 23 |
public interface FLayer extends Projected { |
17 |
/** |
|
18 |
* Obtiene una representaci?n de la colecci?n de capas de forma recursiva |
|
19 |
*/ |
|
20 |
XMLEntity getProperties(); |
|
24 |
/** |
|
25 |
* Obtiene una representaci?n de la colecci?n de capas de forma recursiva |
|
26 |
* |
|
27 |
* @return DOCUMENT ME! |
|
28 |
*/ |
|
29 |
XMLEntity getProperties(); |
|
21 | 30 |
|
22 |
void setActive(boolean selected); |
|
31 |
/** |
|
32 |
* DOCUMENT ME! |
|
33 |
* |
|
34 |
* @param selected DOCUMENT ME! |
|
35 |
*/ |
|
36 |
void setActive(boolean selected); |
|
23 | 37 |
|
24 |
boolean isActive(); |
|
38 |
/** |
|
39 |
* DOCUMENT ME! |
|
40 |
* |
|
41 |
* @return DOCUMENT ME! |
|
42 |
*/ |
|
43 |
boolean isActive(); |
|
25 | 44 |
|
26 |
void setName(String name); |
|
45 |
/** |
|
46 |
* DOCUMENT ME! |
|
47 |
* |
|
48 |
* @param name DOCUMENT ME! |
|
49 |
*/ |
|
50 |
void setName(String name); |
|
27 | 51 |
|
28 |
String getName(); |
|
52 |
/** |
|
53 |
* DOCUMENT ME! |
|
54 |
* |
|
55 |
* @return DOCUMENT ME! |
|
56 |
*/ |
|
57 |
String getName(); |
|
29 | 58 |
|
30 |
/** |
|
31 |
* Realiza las operaciones de inicializaci?n de la capa. El m?todo es invocado una ?nica vez durante la vida de la capa y justo antes de visualizar la capa |
|
32 |
*/ |
|
33 |
void load() throws DriverIOException; |
|
59 |
/** |
|
60 |
* Realiza las operaciones de inicializaci?n de la capa. El m?todo es |
|
61 |
* invocado una ?nica vez durante la vida de la capa y justo antes de |
|
62 |
* visualizar la capa |
|
63 |
* |
|
64 |
* @throws DriverIOException DOCUMENT ME! |
|
65 |
*/ |
|
66 |
void load() throws DriverIOException; |
|
34 | 67 |
|
35 |
void setVisible(boolean visibility); |
|
68 |
/** |
|
69 |
* DOCUMENT ME! |
|
70 |
* |
|
71 |
* @param visibility DOCUMENT ME! |
|
72 |
*/ |
|
73 |
void setVisible(boolean visibility); |
|
36 | 74 |
|
37 |
boolean isVisible(); |
|
75 |
/** |
|
76 |
* DOCUMENT ME! |
|
77 |
* |
|
78 |
* @return DOCUMENT ME! |
|
79 |
*/ |
|
80 |
boolean isVisible(); |
|
38 | 81 |
|
39 |
/** |
|
40 |
* Establece la proyecci?n de la capa |
|
41 |
*/ |
|
42 |
void setProjection(IProjection proj); |
|
43 |
|
|
44 |
void setLayerPath(LayerPath l); |
|
45 |
|
|
46 |
LayerPath getLayerPath(); |
|
47 |
|
|
48 | 82 |
/** |
83 |
* Establece la proyecci?n de la capa |
|
84 |
* |
|
85 |
* @param proj DOCUMENT ME! |
|
86 |
*/ |
|
87 |
void setProjection(IProjection proj); |
|
88 |
|
|
89 |
/** |
|
90 |
* DOCUMENT ME! |
|
91 |
* |
|
92 |
* @param l DOCUMENT ME! |
|
93 |
*/ |
|
94 |
void setLayerPath(LayerPath l); |
|
95 |
|
|
96 |
/** |
|
97 |
* DOCUMENT ME! |
|
98 |
* |
|
99 |
* @return DOCUMENT ME! |
|
100 |
*/ |
|
101 |
LayerPath getLayerPath(); |
|
102 |
|
|
103 |
/** |
|
49 | 104 |
* Obtiene la extensi?n completa de la capa |
50 | 105 |
* |
51 | 106 |
* @return DOCUMENT ME! |
... | ... | |
53 | 108 |
* @throws DriverIOException DOCUMENT ME! |
54 | 109 |
*/ |
55 | 110 |
Rectangle2D getFullExtent() throws DriverIOException; |
56 |
|
|
111 |
|
|
57 | 112 |
/** |
58 |
* Dibuja la capa
|
|
113 |
* Dibuja la capa |
|
59 | 114 |
* |
60 | 115 |
* @param image DOCUMENT ME! |
61 | 116 |
* @param g DOCUMENT ME! |
... | ... | |
65 | 120 |
*/ |
66 | 121 |
void draw(BufferedImage image, Graphics2D g, ViewPort viewPort) |
67 | 122 |
throws DriverIOException; |
123 |
|
|
124 |
/** |
|
125 |
* Realiza una query por punto en coordenadas del mundo real y devuelve un |
|
126 |
* subconjunto de la capa. Para realizar la operaci?n es necesario que la |
|
127 |
* capa tenga una tabla asociada. En caso de que no la tenga se lanzar? |
|
128 |
* una NotSupportedOperationException |
|
129 |
* |
|
130 |
* @param p DOCUMENT ME! |
|
131 |
* @param tolerance DOCUMENT ME! |
|
132 |
* |
|
133 |
* @return DOCUMENT ME! |
|
134 |
* |
|
135 |
* @throws OperationNotSupportedException DOCUMENT ME! |
|
136 |
*/ |
|
137 |
public VectorialSubSet queryByPoint(Point2D p, double tolerance) |
|
138 |
throws OperationNotSupportedException; |
|
139 |
|
|
140 |
/** |
|
141 |
* Realiza una query por rect?ngulo en coordenadas del mundo real y |
|
142 |
* devuelve un subconjunto de la capa. Para realizar la operaci?n es |
|
143 |
* necesario que la capa tenga una tabla asociada. En caso de que no la |
|
144 |
* tenga se lanzar? una NotSupportedOperationException |
|
145 |
* |
|
146 |
* @param rect DOCUMENT ME! |
|
147 |
* |
|
148 |
* @return DOCUMENT ME! |
|
149 |
* |
|
150 |
* @throws OperationNotSupportedException DOCUMENT ME! |
|
151 |
*/ |
|
152 |
public VectorialSubSet queryByRect(Rectangle2D rect) |
|
153 |
throws OperationNotSupportedException; |
|
154 |
|
|
155 |
/** |
|
156 |
* Realiza una query por FGeometry en coordenadas del mundo real y devuelve |
|
157 |
* un subconjunto de la capa. Para realizar la operaci?n es necesario que |
|
158 |
* la capa tenga una tabla asociada. En caso de que no la tenga se lanzar? |
|
159 |
* una NotSupportedOperationException |
|
160 |
* |
|
161 |
* @param g DOCUMENT ME! |
|
162 |
* @param relationship DOCUMENT ME! |
|
163 |
* |
|
164 |
* @return DOCUMENT ME! |
|
165 |
* |
|
166 |
* @throws OperationNotSupportedException DOCUMENT ME! |
|
167 |
*/ |
|
168 |
public VectorialSubSet queryByShape(FGeometry g, int relationship) |
|
169 |
throws OperationNotSupportedException; |
|
170 |
|
|
171 |
/** |
|
172 |
* Selecciona por punto en coordenadas del mundo real esta capa |
|
173 |
* |
|
174 |
* @param p DOCUMENT ME! |
|
175 |
* @param tolerance DOCUMENT ME! |
|
176 |
*/ |
|
177 |
public void selectByPoint(Point2D p, double tolerance); |
|
178 |
|
|
179 |
/** |
|
180 |
* Selecciona por rect?ngulo en coordenadas del mundo real esta capa |
|
181 |
* |
|
182 |
* @param rect DOCUMENT ME! |
|
183 |
*/ |
|
184 |
public void selectByRect(Rectangle2D rect); |
|
185 |
|
|
186 |
/** |
|
187 |
* Selecciona por FGeometry en coordenadas del mundo real esta capa |
|
188 |
* |
|
189 |
* @param g DOCUMENT ME! |
|
190 |
* @param relationship DOCUMENT ME! |
|
191 |
*/ |
|
192 |
public void selectByShape(FGeometry g, int relationship); |
|
193 |
|
|
194 |
/** |
|
195 |
* Obtiene la fuente de datos asociada a la capa o null si no hay ninguna. |
|
196 |
* |
|
197 |
* @return DOCUMENT ME! |
|
198 |
*/ |
|
199 |
public FRecordset getRecordset(); |
|
68 | 200 |
} |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/Filter.java | ||
---|---|---|
1 |
/* Generated by Together */ |
|
2 |
|
|
3 |
package com.iver.cit.gvsig.fmap.layers; |
|
4 |
|
|
5 |
public interface Filter { |
|
6 |
public void process(int x, int y, RasterAdapter raster); |
|
7 |
|
|
8 |
/** |
|
9 |
* M?todo para combinar dos filtros en uno. En caso de que dos filtros sean del mismo tipo y se puedan combinar en uno solo se invocar? este m?todo y se intentar? su combinaci?n. En caso de ?xito se devolver? true para que el invocador del m?todo sepa que el filtro ha sido combinado y s?lo hace falta aplicar el combinado. Si no se puede combinar se devuelve false |
|
10 |
*/ |
|
11 |
public boolean addFilter(Filter filter); |
|
12 |
} |
|
0 | 13 |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/VectorialAdapter.java | ||
---|---|---|
60 | 60 |
*/ |
61 | 61 |
public void closeIndexFile() { |
62 | 62 |
} |
63 |
|
|
64 |
/** |
|
65 |
* @return |
|
66 |
*/ |
|
67 |
public FRecordset getRecordset() { |
|
68 |
return driver.getRecordset(); |
|
69 |
} |
|
63 | 70 |
} |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/FLyrRaster.java | ||
---|---|---|
1 | 1 |
/* Generated by Together */ |
2 |
|
|
3 | 2 |
package com.iver.cit.gvsig.fmap.layers; |
4 | 3 |
|
4 |
import com.iver.cit.gvsig.fmap.ViewPort; |
|
5 |
import com.iver.cit.gvsig.fmap.core.FGeometry; |
|
6 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
|
7 |
import com.iver.cit.gvsig.fmap.operations.selection.VectorialSubSet; |
|
8 |
|
|
5 | 9 |
import java.awt.Graphics2D; |
10 |
import java.awt.geom.Point2D; |
|
6 | 11 |
import java.awt.geom.Rectangle2D; |
7 | 12 |
import java.awt.image.BufferedImage; |
8 | 13 |
|
9 |
import com.iver.cit.gvsig.fmap.ViewPort; |
|
10 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
|
11 | 14 |
|
15 |
/** |
|
16 |
* DOCUMENT ME! |
|
17 |
* |
|
18 |
* @author Fernando Gonz?lez Cort?s |
|
19 |
*/ |
|
12 | 20 |
public class FLyrRaster extends FLyrDefault { |
13 |
private Raster source; |
|
21 |
private RasterAdapter source; |
|
22 |
|
|
23 |
private FRecordset dataSource; |
|
24 |
private int keyField; |
|
14 | 25 |
|
15 | 26 |
/** |
16 | 27 |
* @see com.iver.cit.gvsig.fmap.layers.FLayer#getFullExtent() |
... | ... | |
20 | 31 |
} |
21 | 32 |
|
22 | 33 |
/** |
23 |
* @see com.iver.cit.gvsig.fmap.operations.Operations#draw(java.awt.image.BufferedImage, java.awt.Graphics2D, com.iver.cit.gvsig.fmap.ViewPort) |
|
34 |
* @see com.iver.cit.gvsig.fmap.operations.Operations#draw(java.awt.image.BufferedImage, |
|
35 |
* java.awt.Graphics2D, com.iver.cit.gvsig.fmap.ViewPort) |
|
24 | 36 |
*/ |
25 |
public void draw(BufferedImage image, Graphics2D g, ViewPort viewPort) throws DriverIOException { |
|
37 |
public void draw(BufferedImage image, Graphics2D g, ViewPort viewPort) |
|
38 |
throws DriverIOException { |
|
26 | 39 |
} |
40 |
|
|
41 |
/** |
|
42 |
* Asigna la tabla asociada al raster |
|
43 |
*/ |
|
44 |
public void setRecordset(int fieldId, FRecordset tabla){ |
|
45 |
keyField = fieldId; |
|
46 |
dataSource = tabla; |
|
47 |
} |
|
48 |
|
|
49 |
/** |
|
50 |
* @see com.iver.cit.gvsig.fmap.layers.FLayer#getRecordset() |
|
51 |
*/ |
|
52 |
public FRecordset getRecordset() { |
|
53 |
return dataSource; |
|
54 |
} |
|
55 |
|
|
56 |
public void applyFilter(Filter f) { |
|
57 |
} |
|
58 |
|
|
59 |
/** |
|
60 |
* @see com.iver.cit.gvsig.fmap.layers.FLayer#queryByPoint(java.awt.geom.Point2D, double) |
|
61 |
*/ |
|
62 |
public VectorialSubSet queryByPoint(Point2D p, double tolerance) { |
|
63 |
return null; |
|
64 |
} |
|
65 |
|
|
66 |
/** |
|
67 |
* @see com.iver.cit.gvsig.fmap.layers.FLayer#queryByRect(java.awt.geom.Rectangle2D) |
|
68 |
*/ |
|
69 |
public VectorialSubSet queryByRect(Rectangle2D rect) { |
|
70 |
return null; |
|
71 |
} |
|
72 |
|
|
73 |
/** |
|
74 |
* @see com.iver.cit.gvsig.fmap.layers.FLayer#queryByShape(com.iver.cit.gvsig.fmap.core.FGeometry, int) |
|
75 |
*/ |
|
76 |
public VectorialSubSet queryByShape(FGeometry g, int relationship) { |
|
77 |
return null; |
|
78 |
} |
|
79 |
|
|
80 |
/** |
|
81 |
* Establece las bandas del raster que lee el driver que trata esta capa. Mediante ?ste m?todo se puede a?adir como una capa una s?la banda de un raster |
|
82 |
*/ |
|
83 |
public void setBands(int[] bandsIndexes) { |
|
84 |
} |
|
85 |
|
|
86 |
/** |
|
87 |
* @see com.iver.cit.gvsig.fmap.layers.FLayer#selectByPoint(java.awt.geom.Point2D, double) |
|
88 |
*/ |
|
89 |
public void selectByPoint(Point2D p, double tolerance) { |
|
90 |
} |
|
91 |
|
|
92 |
/** |
|
93 |
* @see com.iver.cit.gvsig.fmap.layers.FLayer#selectByRect(java.awt.geom.Rectangle2D) |
|
94 |
*/ |
|
95 |
public void selectByRect(Rectangle2D rect) { |
|
96 |
} |
|
97 |
|
|
98 |
/** |
|
99 |
* @see com.iver.cit.gvsig.fmap.layers.FLayer#selectByShape(com.iver.cit.gvsig.fmap.core.FGeometry, int) |
|
100 |
*/ |
|
101 |
public void selectByShape(FGeometry g, int relationship) { |
|
102 |
} |
|
27 | 103 |
} |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/FLyrVect.java | ||
---|---|---|
13 | 13 |
import com.iver.cit.gvsig.fmap.XMLEntity; |
14 | 14 |
import com.iver.cit.gvsig.fmap.core.FGeometry; |
15 | 15 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
16 |
import com.iver.cit.gvsig.fmap.operations.selection.Record;
|
|
16 |
import com.iver.cit.gvsig.fmap.operations.selection.VectorialSubSet;
|
|
17 | 17 |
import com.iver.cit.gvsig.fmap.operations.strategies.FeatureSelectorVisitor; |
18 | 18 |
import com.iver.cit.gvsig.fmap.operations.strategies.FeatureVisitor; |
19 | 19 |
import com.iver.cit.gvsig.fmap.operations.strategies.Strategy; |
... | ... | |
28 | 28 |
*/ |
29 | 29 |
private HashMap legends = new HashMap(1); |
30 | 30 |
|
31 |
public void selectFromSelection(BitSet selection) { |
|
32 |
} |
|
33 |
|
|
34 | 31 |
/** |
35 |
* A?ade una selecci?n a la selecci?n de la capa. No lanza nin?n evento, ya que se lanzan manualmente mediante el m?todo fireSelectionEvents |
|
36 |
*/ |
|
37 |
public void addSelection(BitSet selection) { |
|
38 |
} |
|
39 |
|
|
40 |
/** |
|
41 | 32 |
* Establece la selecci?n de la capa. No lanza nin?n evento, ya que se lanzan manualmente mediante el m?todo fireSelectionEvents |
42 | 33 |
*/ |
43 |
public void setSelection(BitSet selection) {
|
|
34 |
public void setSelection(VectorialSubSet selection) {
|
|
44 | 35 |
} |
45 | 36 |
|
46 | 37 |
/** |
... | ... | |
124 | 115 |
/** |
125 | 116 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#process(com.iver.cit.gvsig.fmap.FeatureSelectorVisitor) |
126 | 117 |
*/ |
127 |
public void process(FeatureSelectorVisitor visitor) { |
|
118 |
public void process(FeatureSelectorVisitor visitor, VectorialSubSet subset) {
|
|
128 | 119 |
} |
129 | 120 |
|
130 | 121 |
/** |
131 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#processSelected(com.iver.cit.gvsig.fmap.FeatureVisitor) |
|
132 |
*/ |
|
133 |
public void processSelected(FeatureVisitor visitor) { |
|
134 |
} |
|
135 |
|
|
136 |
/** |
|
137 | 122 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#select(com.iver.cit.gvsig.fmap.FeatureSelectorVisitor) |
138 | 123 |
*/ |
139 |
public void select(FeatureSelectorVisitor visitor) { |
|
124 |
public void select(FeatureSelectorVisitor visitor, VectorialSubSet subset) {
|
|
140 | 125 |
} |
141 | 126 |
|
142 | 127 |
/** |
143 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#selectFromSelection() |
|
144 |
*/ |
|
145 |
public void selectFromSelection() { |
|
146 |
} |
|
147 |
|
|
148 |
/** |
|
149 | 128 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#selectByPoint(java.awt.geom.Point2D, double) |
150 | 129 |
*/ |
151 | 130 |
public void selectByPoint(Point2D p, double tolerance) { |
... | ... | |
166 | 145 |
/** |
167 | 146 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#queryByPoint(java.awt.geom.Point2D, double) |
168 | 147 |
*/ |
169 |
public Record[] queryByPoint(Point2D p, double tolerance) {
|
|
148 |
public VectorialSubSet queryByPoint(Point2D p, double tolerance) {
|
|
170 | 149 |
return null; |
171 | 150 |
} |
172 | 151 |
|
173 | 152 |
/** |
174 | 153 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#queryByRect(java.awt.geom.Rectangle2D) |
175 | 154 |
*/ |
176 |
public Record[] queryByRect(Rectangle2D rect) {
|
|
155 |
public VectorialSubSet queryByRect(Rectangle2D rect) {
|
|
177 | 156 |
return null; |
178 | 157 |
} |
179 | 158 |
|
180 | 159 |
/** |
181 | 160 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#queryByShape(com.iver.cit.gvsig.fmap.fshape.FGeometry, int) |
182 | 161 |
*/ |
183 |
public Record[] queryByShape(FGeometry g, int relationship) {
|
|
162 |
public VectorialSubSet queryByShape(FGeometry g, int relationship) {
|
|
184 | 163 |
return null; |
185 | 164 |
} |
186 | 165 |
|
... | ... | |
206 | 185 |
|
207 | 186 |
strategy.draw(image, g, viewPort); |
208 | 187 |
} |
188 |
|
|
189 |
public FRecordset getRecordset(){ |
|
190 |
return source.getRecordset(); |
|
191 |
} |
|
209 | 192 |
|
210 | 193 |
/** |
211 | 194 |
* @throws DriverIOException |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/VectorialDBAdapter.java | ||
---|---|---|
24 | 24 |
public void setDriver(VectorialDatabaseDriver driver) { |
25 | 25 |
} |
26 | 26 |
|
27 |
private VectorialDatabaseDriver driver; |
|
28 |
|
|
29 | 27 |
/** |
30 | 28 |
* @see com.iver.cit.gvsig.fmap.layers.ReadableVectorial#getShape(int) |
31 | 29 |
*/ |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/FRecordset.java | ||
---|---|---|
1 |
package com.iver.cit.gvsig.fmap.layers; |
|
2 |
|
|
3 |
|
|
4 |
public interface FRecordset { |
|
5 |
|
|
6 |
} |
|
0 | 7 |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/WFSAdapter.java | ||
---|---|---|
28 | 28 |
private void createTempFile(VectorialFileAdapter adapter) { |
29 | 29 |
} |
30 | 30 |
|
31 |
private WFSDriver driver; |
|
32 | 31 |
private URL host; |
33 | 32 |
private VectorialAdapter tempAdapter; |
34 | 33 |
/** |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/RasterAdapter.java | ||
---|---|---|
1 |
/* Generated by Together */ |
|
2 |
|
|
3 |
package com.iver.cit.gvsig.fmap.layers; |
|
4 |
|
|
5 |
import java.awt.Graphics2D; |
|
6 |
import java.awt.geom.Rectangle2D; |
|
7 |
import java.awt.image.BufferedImage; |
|
8 |
|
|
9 |
import com.iver.cit.gvsig.fmap.ViewPort; |
|
10 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
|
11 |
|
|
12 |
|
|
13 |
public class RasterAdapter { |
|
14 |
private RasterDriver driver; |
|
15 |
|
|
16 |
public double getValueByCoords(int x, int y){ |
|
17 |
//TODO implementar bien |
|
18 |
return -1; |
|
19 |
} |
|
20 |
|
|
21 |
public double getValueByCoords(int x, int y, int band){ |
|
22 |
//TODO implementar bien |
|
23 |
return -1; |
|
24 |
} |
|
25 |
|
|
26 |
public double[] getValuesByCoords(int x, int y){ |
|
27 |
//TODO implementar bien |
|
28 |
return new double[]{-1}; |
|
29 |
} |
|
30 |
|
|
31 |
/** |
|
32 |
* @see com.iver.cit.gvsig.fmap.layers.FLayer#getFullExtent() |
|
33 |
*/ |
|
34 |
public Rectangle2D getFullExtent() throws DriverIOException { |
|
35 |
return null; |
|
36 |
} |
|
37 |
|
|
38 |
/** |
|
39 |
* @see com.iver.cit.gvsig.fmap.operations.Operations#draw(java.awt.image.BufferedImage, |
|
40 |
* java.awt.Graphics2D, com.iver.cit.gvsig.fmap.ViewPort) |
|
41 |
*/ |
|
42 |
public void draw(BufferedImage image, Graphics2D g, ViewPort viewPort) |
|
43 |
throws DriverIOException { |
|
44 |
} |
|
45 |
/** |
|
46 |
* @return Returns the driver. |
|
47 |
*/ |
|
48 |
public RasterDriver getDriver() { |
|
49 |
return driver; |
|
50 |
} |
|
51 |
/** |
|
52 |
* @param driver The driver to set. |
|
53 |
*/ |
|
54 |
public void setDriver(RasterDriver driver) { |
|
55 |
this.driver = driver; |
|
56 |
} |
|
57 |
} |
|
0 | 58 |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/RasterFileAdapter.java | ||
---|---|---|
1 |
/* Generated by Together */ |
|
2 |
|
|
3 |
package com.iver.cit.gvsig.fmap.layers; |
|
4 |
|
|
5 |
import java.awt.Graphics2D; |
|
6 |
import java.awt.geom.Rectangle2D; |
|
7 |
import java.awt.image.BufferedImage; |
|
8 |
|
|
9 |
import com.iver.cit.gvsig.fmap.ViewPort; |
|
10 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
|
11 |
|
|
12 |
public class RasterFileAdapter extends RasterAdapter { |
|
13 |
|
|
14 |
/** |
|
15 |
* @see com.iver.cit.gvsig.fmap.layers.RasterAdapter#getValueByCoords(int, int) |
|
16 |
*/ |
|
17 |
public double getValueByCoords(int x, int y) { |
|
18 |
return 0; |
|
19 |
} |
|
20 |
|
|
21 |
/** |
|
22 |
* @see com.iver.cit.gvsig.fmap.layers.RasterAdapter#getValueByCoords(int, int, int) |
|
23 |
*/ |
|
24 |
public double getValueByCoords(int x, int y, int band) { |
|
25 |
return 0; |
|
26 |
} |
|
27 |
|
|
28 |
/** |
|
29 |
* @see com.iver.cit.gvsig.fmap.layers.RasterAdapter#getValuesByCoords(int, int) |
|
30 |
*/ |
|
31 |
public double[] getValuesByCoords(int x, int y) { |
|
32 |
return null; |
|
33 |
} |
|
34 |
|
|
35 |
/** |
|
36 |
* @see com.iver.cit.gvsig.fmap.layers.RasterAdapter#getFullExtent() |
|
37 |
*/ |
|
38 |
public Rectangle2D getFullExtent() throws DriverIOException { |
|
39 |
return null; |
|
40 |
} |
|
41 |
|
|
42 |
/** |
|
43 |
* @see com.iver.cit.gvsig.fmap.layers.RasterAdapter#draw(java.awt.image.BufferedImage, java.awt.Graphics2D, com.iver.cit.gvsig.fmap.ViewPort) |
|
44 |
*/ |
|
45 |
public void draw(BufferedImage image, Graphics2D g, ViewPort viewPort) throws DriverIOException { |
|
46 |
} |
|
47 |
} |
|
0 | 48 |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/FMap.java | ||
---|---|---|
21 | 21 |
import com.iver.cit.gvsig.fmap.layers.ProjectionMismatchException; |
22 | 22 |
import com.iver.cit.gvsig.fmap.layers.VectorialAdapter; |
23 | 23 |
import com.iver.cit.gvsig.fmap.operations.selection.Record; |
24 |
import com.iver.cit.gvsig.fmap.operations.selection.VectorialSubSet; |
|
24 | 25 |
import com.iver.cit.gvsig.fmap.operations.strategies.FeatureSelectorVisitor; |
25 | 26 |
import com.iver.cit.gvsig.fmap.operations.strategies.FeatureVisitor; |
26 | 27 |
|
... | ... | |
179 | 180 |
} |
180 | 181 |
|
181 | 182 |
/** |
182 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#process(com.iver.cit.gvsig.fmap.FeatureSelectorVisitor) |
|
183 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#process(com.iver.cit.gvsig.fmap.FeatureSelectorVisitor, VectorialSubSet)
|
|
183 | 184 |
*/ |
184 | 185 |
public void process(FeatureSelectorVisitor visitor) { |
185 | 186 |
} |
... | ... | |
191 | 192 |
} |
192 | 193 |
|
193 | 194 |
/** |
194 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#select(com.iver.cit.gvsig.fmap.FeatureSelectorVisitor) |
|
195 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#select(com.iver.cit.gvsig.fmap.FeatureSelectorVisitor, VectorialSubSet)
|
|
195 | 196 |
*/ |
196 | 197 |
public void select(FeatureSelectorVisitor visitor) { |
197 | 198 |
} |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/operations/selection/QueryResults.java | ||
---|---|---|
1 |
/* Generated by Together */ |
|
2 |
package com.iver.cit.gvsig.fmap.operations.selection; |
|
3 |
|
|
4 |
import java.util.BitSet; |
|
5 |
|
|
6 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
|
7 |
|
|
8 |
/** |
|
9 |
* Subconjunto de elementos de una capa como resultado de una query |
|
10 |
*/ |
|
11 |
public class QueryResults { |
|
12 |
private BitSet results; |
|
13 |
private FLayer capa; |
|
14 |
|
|
15 |
/** |
|
16 |
* DOCUMENT ME! |
|
17 |
* |
|
18 |
* @param i DOCUMENT ME! |
|
19 |
* |
|
20 |
* @return DOCUMENT ME! |
|
21 |
*/ |
|
22 |
public Record getQueryResult(int i) { |
|
23 |
//TODO implementar bien |
|
24 |
return null; |
|
25 |
} |
|
26 |
|
|
27 |
/** |
|
28 |
* DOCUMENT ME! |
|
29 |
* |
|
30 |
* @param i DOCUMENT ME! |
|
31 |
* |
|
32 |
* @return DOCUMENT ME! |
|
33 |
*/ |
|
34 |
public FLayer getLayerName(int i) { |
|
35 |
//TODO implementar bien |
|
36 |
return null; |
|
37 |
} |
|
38 |
|
|
39 |
/** |
|
40 |
* DOCUMENT ME! |
|
41 |
* |
|
42 |
* @return DOCUMENT ME! |
|
43 |
*/ |
|
44 |
public int getResultCount() { |
|
45 |
//TODO implementar bien |
|
46 |
return -1; |
|
47 |
} |
|
48 |
} |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/operations/selection/VectorialSubSet.java | ||
---|---|---|
1 |
/* Generated by Together */ |
|
2 |
package com.iver.cit.gvsig.fmap.operations.selection; |
|
3 |
|
|
4 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
|
5 |
|
|
6 |
import java.util.BitSet; |
|
7 |
|
|
8 |
|
|
9 |
/** |
|
10 |
* Subconjunto de elementos de una capa como resultado de una query |
|
11 |
*/ |
|
12 |
public class VectorialSubSet { |
|
13 |
private BitSet results; |
|
14 |
private FLayer capa; |
|
15 |
|
|
16 |
/** |
|
17 |
* DOCUMENT ME! |
|
18 |
* |
|
19 |
* @param i DOCUMENT ME! |
|
20 |
* |
|
21 |
* @return DOCUMENT ME! |
|
22 |
*/ |
|
23 |
public FLayer getLayer(int i) { |
|
24 |
//TODO implementar bien |
|
25 |
return null; |
|
26 |
} |
|
27 |
|
|
28 |
/** |
|
29 |
* DOCUMENT ME! |
|
30 |
* |
|
31 |
* @return DOCUMENT ME! |
|
32 |
*/ |
|
33 |
public int getResultCount() { |
|
34 |
//TODO implementar bien |
|
35 |
return -1; |
|
36 |
} |
|
37 |
|
|
38 |
/** |
|
39 |
* Obtiene el ?ndice del siguiente registro seleccionado comenzando a |
|
40 |
* buscar desde 'from', ?ste inclu?do |
|
41 |
* |
|
42 |
* @param from DOCUMENT ME! |
|
43 |
* |
|
44 |
* @return DOCUMENT ME! |
|
45 |
*/ |
|
46 |
public int getNextSelected(int from) { |
|
47 |
//TODO implementar bien |
|
48 |
return -1; |
|
49 |
} |
|
50 |
|
|
51 |
/** |
|
52 |
* Hace que este subconjunto se transforme en el subconjunto |
|
53 |
* de los elementos que tiene en com?n con el subconjunto que se pasa como par?metro |
|
54 |
*/ |
|
55 |
public void and(VectorialSubSet otro) { |
|
56 |
} |
|
57 |
|
|
58 |
/** |
|
59 |
* Hace que este subconjunto se transforme en el subconjunto |
|
60 |
* de los elementos que tiene m?s los que tiene el subconjunto que se pasa como par?metro |
|
61 |
*/ |
|
62 |
public void or(VectorialSubSet otro) { |
|
63 |
} |
|
64 |
|
|
65 |
/** |
|
66 |
* Hace que este subconjunto se transforme en el subconjunto |
|
67 |
* de los elementos actualmente no estaban en ?l |
|
68 |
*/ |
|
69 |
public void not() { |
|
70 |
} |
|
71 |
} |
|
0 | 72 |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/operations/strategies/QueryByPointVisitor.java | ||
---|---|---|
6 | 6 |
|
7 | 7 |
import com.iver.cit.gvsig.fmap.core.FGeometry; |
8 | 8 |
import com.iver.cit.gvsig.fmap.operations.selection.Record; |
9 |
import com.iver.cit.gvsig.fmap.operations.selection.VectorialSubSet; |
|
9 | 10 |
|
10 | 11 |
public class QueryByPointVisitor implements FeatureDataVisitor { |
11 | 12 |
/** |
... | ... | |
16 | 17 |
public void setPoint2D(Point2D point) { |
17 | 18 |
} |
18 | 19 |
|
19 |
public Record[] getResult() {
|
|
20 |
public VectorialSubSet getResult() {
|
|
20 | 21 |
//TODO implementar bien |
21 | 22 |
return null; |
22 | 23 |
} |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/operations/strategies/Strategy.java | ||
---|---|---|
10 | 10 |
import com.iver.cit.gvsig.fmap.ViewPort; |
11 | 11 |
import com.iver.cit.gvsig.fmap.core.FGeometry; |
12 | 12 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
13 |
import com.iver.cit.gvsig.fmap.operations.selection.Record;
|
|
13 |
import com.iver.cit.gvsig.fmap.operations.selection.VectorialSubSet;
|
|
14 | 14 |
|
15 | 15 |
public interface Strategy{ |
16 | 16 |
/** |
... | ... | |
28 | 28 |
|
29 | 29 |
/** |
30 | 30 |
* Recorre las features de la capa vectorial invocando el m?todo visit del visitador que se pasa como par?metro, que es el que realizar? la operaci?n relacionada con la geometry |
31 |
* @param subset TODO |
|
31 | 32 |
*/ |
32 |
void process(FeatureSelectorVisitor visitor); |
|
33 |
void process(FeatureSelectorVisitor visitor, VectorialSubSet subset);
|
|
33 | 34 |
|
34 | 35 |
/** |
35 |
* Recorre las features seleccionadas de la capa vectorial invocando el m?todo visit del visitador que se pasa como par?metro, que es el que realizar? la operaci?n relacionada con la geometry |
|
36 |
*/ |
|
37 |
void processSelected(FeatureVisitor visitor); |
|
38 |
|
|
39 |
/** |
|
40 | 36 |
* Visita todas las features de la capa vectorial con el visitador de seleccion que se pasa como par?metro. Almacena en el bitmap de seleccion de la fuente de datos vectorial los ?ndices de los elementos seleccionados y luego establece la selecci?n en la capa vectorial asociada a la estrategia |
37 |
* @param subset TODO |
|
41 | 38 |
*/ |
42 |
void select(FeatureSelectorVisitor visitor); |
|
39 |
void select(FeatureSelectorVisitor visitor, VectorialSubSet subset);
|
|
43 | 40 |
|
44 |
/** |
|
45 |
* Visita todas las features seleccionadas de la capa vectorial con el visitador de seleccion que se pasa como par?metro. Almacena en el bitmap de seleccion de la fuente de datos vectorial los ?ndices de los elementos seleccionados y luego establece la selecci?n en la capa vectorial asociada a la estrategia |
|
46 |
*/ |
|
47 |
void selectFromSelection(); |
|
41 |
VectorialSubSet queryByPoint(Point2D p, double tolerance); |
|
48 | 42 |
|
49 |
void selectByPoint(Point2D p, double tolerance);
|
|
43 |
VectorialSubSet queryByRect(Rectangle2D rect);
|
|
50 | 44 |
|
51 |
void selectByRect(Rectangle2D rect);
|
|
45 |
VectorialSubSet queryByShape(FGeometry g, int relationship);
|
|
52 | 46 |
|
53 |
void selectByShape(FGeometry g, int relationship); |
|
54 |
|
|
55 |
Record[] queryByPoint(Point2D p, double tolerance); |
|
56 |
|
|
57 |
Record[] queryByRect(Rectangle2D rect); |
|
58 |
|
|
59 |
Record[] queryByShape(FGeometry g, int relationship); |
|
60 |
|
|
61 | 47 |
/** |
62 | 48 |
* Obtiene el rect?ngulo m?nimo que contiene todas las features seleccionadas |
63 | 49 |
* o null si no hay ninguna seleccionada |
trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/operations/strategies/DefaultStrategy.java | ||
---|---|---|
13 | 13 |
import com.iver.cit.gvsig.fmap.drivers.VectorialFileDriver; |
14 | 14 |
import com.iver.cit.gvsig.fmap.layers.FLyrVect; |
15 | 15 |
import com.iver.cit.gvsig.fmap.layers.VectorialAdapter; |
16 |
import com.iver.cit.gvsig.fmap.operations.selection.Record;
|
|
16 |
import com.iver.cit.gvsig.fmap.operations.selection.VectorialSubSet;
|
|
17 | 17 |
import com.iver.cit.gvsig.fmap.rendering.Legend; |
18 | 18 |
|
19 | 19 |
|
... | ... | |
34 | 34 |
} |
35 | 35 |
|
36 | 36 |
/** |
37 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#process(com.iver.cit.gvsig.fmap.FeatureSelectorVisitor) |
|
37 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#process(com.iver.cit.gvsig.fmap.FeatureSelectorVisitor, VectorialSubSet)
|
|
38 | 38 |
*/ |
39 |
public void process(FeatureSelectorVisitor visitor) { |
|
39 |
public void process(FeatureSelectorVisitor visitor, VectorialSubSet subset) {
|
|
40 | 40 |
} |
41 | 41 |
|
42 | 42 |
/** |
43 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#processSelected(com.iver.cit.gvsig.fmap.FeatureVisitor)
|
|
43 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#select(com.iver.cit.gvsig.fmap.FeatureSelectorVisitor, VectorialSubSet)
|
|
44 | 44 |
*/ |
45 |
public void processSelected(FeatureVisitor visitor) {
|
|
45 |
public void select(FeatureSelectorVisitor visitor, VectorialSubSet subset) {
|
|
46 | 46 |
} |
47 | 47 |
|
48 | 48 |
/** |
49 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#select(com.iver.cit.gvsig.fmap.FeatureSelectorVisitor) |
|
50 |
*/ |
|
51 |
public void select(FeatureSelectorVisitor visitor) { |
|
52 |
} |
|
53 |
|
|
54 |
/** |
|
55 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#selectFromSelection() |
|
56 |
*/ |
|
57 |
public void selectFromSelection() { |
|
58 |
} |
|
59 |
|
|
60 |
/** |
|
61 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#selectByPoint(java.awt.geom.Point2D, |
|
62 |
* double) |
|
63 |
*/ |
|
64 |
public void selectByPoint(Point2D p, double tolerance) { |
|
65 |
} |
|
66 |
|
|
67 |
/** |
|
68 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#selectByRect(java.awt.geom.Rectangle2D) |
|
69 |
*/ |
|
70 |
public void selectByRect(Rectangle2D rect) { |
|
71 |
} |
|
72 |
|
|
73 |
/** |
|
74 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#selectByShape(com.iver.cit.gvsig.fmap.fshape.FGeometry, |
|
75 |
* int) |
|
76 |
*/ |
|
77 |
public void selectByShape(FGeometry g, int relationship) { |
|
78 |
} |
|
79 |
|
|
80 |
/** |
|
81 | 49 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#queryByPoint(java.awt.geom.Point2D, |
82 | 50 |
* double) |
83 | 51 |
*/ |
84 |
public Record[] queryByPoint(Point2D p, double tolerance) {
|
|
52 |
public VectorialSubSet queryByPoint(Point2D p, double tolerance) {
|
|
85 | 53 |
return null; |
86 | 54 |
} |
87 | 55 |
|
88 | 56 |
/** |
89 | 57 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#queryByRect(java.awt.geom.Rectangle2D) |
90 | 58 |
*/ |
91 |
public Record[] queryByRect(Rectangle2D rect) {
|
|
59 |
public VectorialSubSet queryByRect(Rectangle2D rect) {
|
|
92 | 60 |
return null; |
93 | 61 |
} |
94 | 62 |
|
... | ... | |
96 | 64 |
* @see com.iver.cit.gvsig.fmap.operations.strategies.Strategy#queryByShape(com.iver.cit.gvsig.fmap.fshape.FGeometry, |
97 | 65 |
* int) |
98 | 66 |
*/ |
99 |
public Record[] queryByShape(FGeometry g, int relationship) {
|
|
67 |
public VectorialSubSet queryByShape(FGeometry g, int relationship) {
|
|
100 | 68 |
return null; |
101 | 69 |
} |
102 | 70 |
|
Also available in: Unified diff