Revision 27619 trunk/libraries/libFMap/src/com/iver/cit/gvsig/fmap/layers/FLyrVect.java
FLyrVect.java | ||
---|---|---|
55 | 55 |
|
56 | 56 |
import org.apache.log4j.Logger; |
57 | 57 |
import org.cresques.cts.ICoordTrans; |
58 |
import org.gvsig.exceptions.BaseException; |
|
58 | 59 |
|
59 | 60 |
import com.hardcode.gdbms.driver.exceptions.ReadDriverException; |
60 | 61 |
import com.hardcode.gdbms.engine.data.DataSourceFactory; |
... | ... | |
64 | 65 |
import com.iver.cit.gvsig.exceptions.expansionfile.ExpansionFileReadException; |
65 | 66 |
import com.iver.cit.gvsig.exceptions.layers.LegendLayerException; |
66 | 67 |
import com.iver.cit.gvsig.exceptions.layers.ReloadLayerException; |
68 |
import com.iver.cit.gvsig.exceptions.layers.ReprojectLayerException; |
|
67 | 69 |
import com.iver.cit.gvsig.exceptions.layers.StartEditionLayerException; |
68 | 70 |
import com.iver.cit.gvsig.exceptions.visitors.StartWriterVisitorException; |
69 | 71 |
import com.iver.cit.gvsig.exceptions.visitors.VisitorException; |
... | ... | |
299 | 301 |
|
300 | 302 |
// Si existe reproyecci?n, reproyectar el extent |
301 | 303 |
ICoordTrans ct = getCoordTrans(); |
302 |
|
|
303 |
if (ct != null) { |
|
304 |
Point2D pt1 = new Point2D.Double(rAux.getMinX(), rAux.getMinY()); |
|
305 |
Point2D pt2 = new Point2D.Double(rAux.getMaxX(), rAux.getMaxY()); |
|
306 |
pt1 = ct.convert(pt1, null); |
|
307 |
pt2 = ct.convert(pt2, null); |
|
308 |
rAux = new Rectangle2D.Double(); |
|
309 |
rAux.setFrameFromDiagonal(pt1, pt2); |
|
310 |
} |
|
311 |
|
|
304 |
try{ |
|
305 |
if (ct != null) { |
|
306 |
Point2D pt1 = new Point2D.Double(rAux.getMinX(), rAux.getMinY()); |
|
307 |
Point2D pt2 = new Point2D.Double(rAux.getMaxX(), rAux.getMaxY()); |
|
308 |
pt1 = ct.convert(pt1, null); |
|
309 |
pt2 = ct.convert(pt2, null); |
|
310 |
rAux = new Rectangle2D.Double(); |
|
311 |
rAux.setFrameFromDiagonal(pt1, pt2); |
|
312 |
} |
|
313 |
}catch (IllegalStateException e) { |
|
314 |
this.setAvailable(false); |
|
315 |
this.addError(new ReprojectLayerException(getName(), e)); |
|
316 |
} |
|
312 | 317 |
//Esto es para cuando se crea una capa nueva con el fullExtent de ancho y alto 0. |
313 | 318 |
if (rAux.getWidth()==0 && rAux.getHeight()==0) { |
314 | 319 |
rAux=new Rectangle2D.Double(0,0,100,100); |
... | ... | |
834 | 839 |
} |
835 | 840 |
System.out.println("avoided layer "+i+"of symbol '"+mlSym.getDescription()+"' (pass "+mapPass+")"); |
836 | 841 |
} |
837 |
|
|
838 | 842 |
if (sym == null) { |
839 | 843 |
continue; |
840 | 844 |
} |
Also available in: Unified diff