Revision 3095 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/operations/strategies/DBStrategy.java
DBStrategy.java | ||
---|---|---|
44 | 44 |
package com.iver.cit.gvsig.fmap.operations.strategies; |
45 | 45 |
|
46 | 46 |
import java.awt.Graphics2D; |
47 |
import java.awt.geom.Rectangle2D; |
|
47 | 48 |
import java.awt.image.BufferedImage; |
48 | 49 |
import java.sql.SQLException; |
49 | 50 |
import java.util.BitSet; |
... | ... | |
55 | 56 |
import com.iver.cit.gvsig.fmap.core.IFeature; |
56 | 57 |
import com.iver.cit.gvsig.fmap.core.IGeometry; |
57 | 58 |
import com.iver.cit.gvsig.fmap.core.v02.FSymbol; |
59 |
import com.iver.cit.gvsig.fmap.drivers.DriverAttributes; |
|
58 | 60 |
import com.iver.cit.gvsig.fmap.drivers.IFeatureIterator; |
59 | 61 |
import com.iver.cit.gvsig.fmap.drivers.VectorialDatabaseDriver; |
60 | 62 |
import com.iver.cit.gvsig.fmap.layers.FBitSet; |
... | ... | |
103 | 105 |
// con todos los campos de Vias: 11 segundos. |
104 | 106 |
// => MODIFICAR EL getFeatureIterator para que admita los nombres |
105 | 107 |
// de los campos adem?s del rect?ngulo que pides. |
108 |
Rectangle2D rectAux = viewPort.getAdjustedExtent(); |
|
109 |
if (ct != null) { |
|
110 |
ICoordTrans invertedCT = ct.getInverted(); |
|
111 |
rectAux = invertedCT.convert(rectAux); |
|
112 |
} |
|
113 |
|
|
106 | 114 |
|
107 |
IFeatureIterator geomIt = dbAdapter.getFeatureIterator(viewPort.getAdjustedExtent(), strEPSG);
|
|
115 |
IFeatureIterator geomIt = dbAdapter.getFeatureIterator(rectAux, strEPSG);
|
|
108 | 116 |
VectorialLegend l = (VectorialLegend) ((ClassifiableVectorial) capa).getLegend(); |
117 |
|
|
118 |
DriverAttributes attr = dbAdapter.getDriverAttributes(); |
|
119 |
boolean bMustClone = false; |
|
120 |
if (attr != null) |
|
121 |
{ |
|
122 |
if (attr.isLoadedInMemory()) |
|
123 |
{ |
|
124 |
bMustClone = attr.isLoadedInMemory(); |
|
125 |
} |
|
126 |
} |
|
127 |
|
|
128 |
|
|
109 | 129 |
int i; |
110 | 130 |
FSymbol symbol; |
111 | 131 |
try { |
... | ... | |
117 | 137 |
} |
118 | 138 |
IFeature feat = geomIt.next(); |
119 | 139 |
IGeometry geom = feat.getGeometry(); |
140 |
|
|
141 |
if (ct != null) { |
|
142 |
if (bMustClone) |
|
143 |
geom = geom.cloneGeometry(); |
|
144 |
geom.reProject(ct); |
|
145 |
} |
|
146 |
|
|
120 | 147 |
i = dbDriver.getRowIndexByFID(feat); |
121 | 148 |
// System.out.println("Antes de pintar " + i); |
122 | 149 |
// symbol = l.getSymbolByFeature(feat); |
Also available in: Unified diff