Revision 35742 branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/impl/Envelope2D.java

View differences:

Envelope2D.java
31 31

  
32 32
import org.cresques.cts.ICoordTrans;
33 33
import org.gvsig.fmap.geom.primitive.Envelope;
34
import org.gvsig.fmap.geom.primitive.EnvelopeNotInitializedException;
34 35
import org.gvsig.fmap.geom.primitive.Point;
35 36
import org.gvsig.tools.ToolsLocator;
36 37
import org.gvsig.tools.dynobject.DynStruct;
......
44 45
	public static final String PERSISTENCE_DEFINITION_NAME = "Envelope2Dimensions";
45 46
	
46 47
	public Envelope2D() {
47
		super();
48
		min = new Point2D(0.0, 0.0);
49
		max = new Point2D(0.0, 0.0);
48
		super();	
50 49
	}
51 50

  
52 51
	public Envelope2D(Point min, Point max) {
......
69 68
	 * @see org.gvsig.fmap.geom.primitive.Envelope#convert(org.cresques.cts.ICoordTrans)
70 69
	 */
71 70
	public Envelope convert(ICoordTrans trans) {
72
		if (this.getDimension() > 2) {
71
	    if (isEmpty){
72
            throw new EnvelopeNotInitializedException();
73
        }
74
	    if (this.getDimension() > 2) {
73 75
			return null;
74 76
		}
75 77
		Rectangle2D rect = new Rectangle2D.Double(this.getMinimum(0), this

Also available in: Unified diff