Revision 6164 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/FLayers.java
FLayers.java | ||
---|---|---|
46 | 46 |
import java.awt.image.BufferedImage; |
47 | 47 |
import java.awt.image.WritableRaster; |
48 | 48 |
import java.io.File; |
49 |
import java.io.WriteAbortedException; |
|
50 | 49 |
import java.util.ArrayList; |
51 | 50 |
import java.util.Collections; |
52 | 51 |
import java.util.ConcurrentModificationException; |
... | ... | |
59 | 58 |
import org.apache.log4j.Logger; |
60 | 59 |
import org.cresques.cts.ICoordTrans; |
61 | 60 |
import org.cresques.cts.IProjection; |
62 |
import org.cresques.cts.ProjectionPool; |
|
63 |
import org.cresques.cts.gt2.CoordSys; |
|
64 |
import org.cresques.cts.gt2.CoordTrans; |
|
65 | 61 |
|
66 | 62 |
import com.hardcode.driverManager.Driver; |
67 | 63 |
import com.hardcode.driverManager.DriverLoadException; |
... | ... | |
69 | 65 |
import com.iver.cit.gvsig.fmap.FMap; |
70 | 66 |
import com.iver.cit.gvsig.fmap.MapControl; |
71 | 67 |
import com.iver.cit.gvsig.fmap.ViewPort; |
68 |
import com.iver.cit.gvsig.fmap.crs.CRSFactory; |
|
72 | 69 |
import com.iver.cit.gvsig.fmap.drivers.DefaultDBDriver; |
73 | 70 |
import com.iver.cit.gvsig.fmap.drivers.DriverIOException; |
74 | 71 |
import com.iver.cit.gvsig.fmap.drivers.VectorialDatabaseDriver; |
... | ... | |
683 | 680 |
if (proj != null) |
684 | 681 |
if (proj != fmap.getProjection()) |
685 | 682 |
{ |
686 |
ICoordTrans ct = new CoordTrans((CoordSys) proj, |
|
687 |
(CoordSys) fmap.getProjection()); |
|
683 |
ICoordTrans ct = proj.getCT(fmap.getProjection()); |
|
688 | 684 |
layer.setCoordTrans(ct); |
689 | 685 |
System.err.println("coordTrans = " + |
690 | 686 |
proj.getAbrev() + " " + |
... | ... | |
783 | 779 |
//String recordsetName = xml.getChild(i).getStringProperty("recordset-name"); |
784 | 780 |
IProjection proj = null; |
785 | 781 |
if (xml.getChild(i).contains("proj")) { |
786 |
proj = ProjectionPool.get(xml.getChild(i).getStringProperty("proj"));
|
|
782 |
proj = CRSFactory.getCRS(xml.getChild(i).getStringProperty("proj"));
|
|
787 | 783 |
} |
788 | 784 |
else |
789 | 785 |
{ |
... | ... | |
937 | 933 |
if ((proj != null)) |
938 | 934 |
if (proj != getFMap().getProjection()) |
939 | 935 |
{ |
940 |
ICoordTrans ct = new CoordTrans((CoordSys) proj, |
|
941 |
(CoordSys) getFMap().getProjection()); |
|
936 |
ICoordTrans ct = proj.getCT(getFMap().getProjection()); |
|
942 | 937 |
// TODO: REVISAR CON LUIS |
943 | 938 |
// Se lo fijamos a todas, luego cada una que se reproyecte |
944 | 939 |
// si puede, o que no haga nada |
Also available in: Unified diff