Revision 3236 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/operations/strategies/DBStrategy.java
DBStrategy.java | ||
---|---|---|
61 | 61 |
import com.iver.cit.gvsig.fmap.drivers.VectorialDatabaseDriver; |
62 | 62 |
import com.iver.cit.gvsig.fmap.layers.FBitSet; |
63 | 63 |
import com.iver.cit.gvsig.fmap.layers.FLayer; |
64 |
import com.iver.cit.gvsig.fmap.layers.FLyrVect; |
|
64 | 65 |
import com.iver.cit.gvsig.fmap.layers.VectorialDBAdapter; |
65 | 66 |
import com.iver.cit.gvsig.fmap.layers.layerOperations.ClassifiableVectorial; |
66 | 67 |
import com.iver.cit.gvsig.fmap.layers.layerOperations.Selectable; |
... | ... | |
87 | 88 |
public void draw(BufferedImage image, Graphics2D g, ViewPort viewPort, Cancellable cancel) throws DriverException { |
88 | 89 |
// Nos aprovechamos del SQL para lanzar la consulta |
89 | 90 |
// teniendo en cuenta el boundingbox que toca. |
90 |
FLayer capa = getCapa();
|
|
91 |
FLyrVect lyr = (FLyrVect) getCapa();
|
|
91 | 92 |
VectorialDBAdapter dbAdapter = (VectorialDBAdapter) ((SingleLayer) capa).getSource(); |
92 | 93 |
VectorialDatabaseDriver dbDriver = (VectorialDatabaseDriver) dbAdapter.getDriver(); |
93 | 94 |
dbAdapter.start(); |
94 |
Selectable selection = (Selectable) getCapa();
|
|
95 |
ICoordTrans ct = getCapa().getCoordTrans();
|
|
95 |
Selectable selection = (Selectable) lyr;
|
|
96 |
ICoordTrans ct = lyr.getCoordTrans();
|
|
96 | 97 |
FBitSet bitSet = selection.getSelection(); |
97 | 98 |
|
98 | 99 |
String strEPSG = viewPort.getProjection().getAbrev().substring(5); |
... | ... | |
105 | 106 |
// con todos los campos de Vias: 11 segundos. |
106 | 107 |
// => MODIFICAR EL getFeatureIterator para que admita los nombres |
107 | 108 |
// de los campos adem?s del rect?ngulo que pides. |
109 |
String[] usedFields = null; |
|
110 |
if (lyr.getLegend() instanceof VectorialLegend) |
|
111 |
{ |
|
112 |
VectorialLegend legend = (VectorialLegend) lyr.getLegend(); |
|
113 |
// TODO: Meter en el interaz Legend un m?todo String[] getUsedFields() |
|
114 |
} |
|
115 |
|
|
108 | 116 |
Rectangle2D rectAux = viewPort.getAdjustedExtent(); |
109 | 117 |
if (ct != null) { |
110 | 118 |
ICoordTrans invertedCT = ct.getInverted(); |
Also available in: Unified diff