86 |
86 |
import org.gvsig.fmap.mapcontext.exceptions.LegendLayerException;
|
87 |
87 |
import org.gvsig.fmap.mapcontext.exceptions.LoadLayerException;
|
88 |
88 |
import org.gvsig.fmap.mapcontext.exceptions.ReloadLayerException;
|
|
89 |
import org.gvsig.fmap.mapcontext.exceptions.ReprojectLayerException;
|
89 |
90 |
import org.gvsig.fmap.mapcontext.exceptions.StartEditionLayerException;
|
90 |
91 |
import org.gvsig.fmap.mapcontext.exceptions.XMLLayerException;
|
91 |
92 |
import org.gvsig.fmap.mapcontext.layers.AbstractLinkProperties;
|
... | ... | |
351 |
352 |
}
|
352 |
353 |
// Si existe reproyecci?n, reproyectar el extent
|
353 |
354 |
ICoordTrans ct = getCoordTrans();
|
354 |
|
if (ct != null) {
|
355 |
|
Point2D pt1 = new Point2D.Double(rAux.getMinimum(0), rAux.getMinimum(1));
|
356 |
|
Point2D pt2 = new Point2D.Double(rAux.getMaximum(0), rAux.getMaximum(1));
|
357 |
|
pt1 = ct.convert(pt1, null);
|
358 |
|
pt2 = ct.convert(pt2, null);
|
359 |
|
try {
|
360 |
|
rAux = geomManager.createEnvelope(pt1.getX(),pt1.getY(),pt2.getX(),pt2.getY(), SUBTYPES.GEOM2D);
|
361 |
|
} catch (CreateEnvelopeException e) {
|
362 |
|
logger.error("Error creating the envelope", e);
|
363 |
|
e.printStackTrace();
|
364 |
|
}//new Rectangle2D.Double();
|
|
355 |
try{
|
|
356 |
if (ct != null) {
|
|
357 |
Point2D pt1 = new Point2D.Double(rAux.getMinimum(0), rAux.getMinimum(1));
|
|
358 |
Point2D pt2 = new Point2D.Double(rAux.getMaximum(0), rAux.getMaximum(1));
|
|
359 |
pt1 = ct.convert(pt1, null);
|
|
360 |
pt2 = ct.convert(pt2, null);
|
|
361 |
try {
|
|
362 |
rAux = geomManager.createEnvelope(pt1.getX(),pt1.getY(),pt2.getX(),pt2.getY(), SUBTYPES.GEOM2D);
|
|
363 |
} catch (CreateEnvelopeException e) {
|
|
364 |
logger.error("Error creating the envelope", e);
|
|
365 |
e.printStackTrace();
|
|
366 |
}//new Rectangle2D.Double();
|
|
367 |
}
|
|
368 |
}catch (IllegalStateException e) {
|
|
369 |
this.setAvailable(false);
|
|
370 |
this.addError(new ReprojectLayerException(getName(), e));
|
365 |
371 |
}
|
366 |
372 |
return rAux;
|
367 |
373 |
|