Revision 47685 trunk/org.gvsig.desktop/org.gvsig.desktop.compat.cdc/org.gvsig.fmap.geometry/org.gvsig.fmap.geometry.jts/src/main/java/org/gvsig/fmap/geom/jts/AbstractGeometry.java
AbstractGeometry.java | ||
---|---|---|
42 | 42 |
import org.gvsig.fmap.geom.GeometryLocator; |
43 | 43 |
import org.gvsig.fmap.geom.GeometryManager; |
44 | 44 |
import org.gvsig.fmap.geom.aggregate.Aggregate; |
45 |
import org.gvsig.fmap.geom.aggregate.MultiLine; |
|
45 | 46 |
import org.gvsig.fmap.geom.aggregate.MultiPrimitive; |
46 | 47 |
import org.gvsig.fmap.geom.complex.Complex; |
47 | 48 |
import org.gvsig.fmap.geom.exception.CreateGeometryException; |
... | ... | |
380 | 381 |
if(this.isEmpty()){ |
381 | 382 |
return new Envelope2D(getProjection()); |
382 | 383 |
} |
383 |
com.vividsolutions.jts.geom.Envelope envelope = getJTS().getEnvelopeInternal(); |
|
384 |
return new Envelope2D(envelope, this.getProjection()); |
|
384 |
try { |
|
385 |
com.vividsolutions.jts.geom.Envelope envelope = getJTS().getEnvelopeInternal(); |
|
386 |
return new Envelope2D(envelope, this.getProjection()); |
|
387 |
} catch (Exception ex){ |
|
388 |
try { |
|
389 |
MultiLine lines = this.toLines(); |
|
390 |
return lines.getEnvelope(); |
|
391 |
} catch (Exception ex2) { |
|
392 |
throw ex; |
|
393 |
} |
|
394 |
|
|
395 |
} |
|
385 | 396 |
} |
386 | 397 |
} |
387 | 398 |
|
Also available in: Unified diff