Revision 885 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/operations/strategies/ShpStrategy.java
ShpStrategy.java | ||
---|---|---|
11 | 11 |
import java.util.BitSet; |
12 | 12 |
|
13 | 13 |
import org.apache.log4j.Logger; |
14 |
import org.cresques.cts.ICoordTrans; |
|
14 | 15 |
import org.geotools.resources.geometry.XRectangle2D; |
15 | 16 |
|
16 | 17 |
import com.hardcode.driverManager.DriverLoadException; |
... | ... | |
54 | 55 |
try{ |
55 | 56 |
VectorialAdapter adapter = ((SingleLayer)getCapa()).getSource(); |
56 | 57 |
Selectable selection = (Selectable) getCapa(); |
58 |
ICoordTrans ct = getCapa().getCoordTrans(); |
|
57 | 59 |
BitSet bitSet = selection.getSelection(); |
58 | 60 |
BoundedShapes shapeBounds = (BoundedShapes) adapter.getDriver(); |
59 | 61 |
VectorialFileDriver driver = (VectorialFileDriver) adapter.getDriver(); |
... | ... | |
97 | 99 |
if (cancel.isCanceled()) break; |
98 | 100 |
|
99 | 101 |
bounds = shapeBounds.getShapeBounds(i); |
102 |
if (ct != null) |
|
103 |
{ |
|
104 |
Point2D pt1 = new Point2D.Double(bounds.getMinX(), bounds.getMinY()); |
|
105 |
Point2D pt2 = new Point2D.Double(bounds.getMaxX(), bounds.getMaxY()); |
|
106 |
pt1 = ct.convert(pt1, null); |
|
107 |
pt2 = ct.convert(pt2, null); |
|
108 |
bounds.setFrameFromDiagonal(pt1, pt2); |
|
109 |
} |
|
100 | 110 |
if (XRectangle2D.intersectInclusive(extent, bounds)) |
101 | 111 |
{ |
102 | 112 |
FSymbol symbol = l.getSymbol(i); |
... | ... | |
109 | 119 |
(bounds.getWidth() > viewPort.getDist1pixel()))) |
110 | 120 |
{ |
111 | 121 |
geom = driver.getShape(i); |
122 |
if (ct != null) |
|
123 |
{ |
|
124 |
geom.reProject(ct); |
|
125 |
} |
|
112 | 126 |
geom.draw(g, viewPort, symbol); |
113 | 127 |
} |
114 | 128 |
else |
Also available in: Unified diff