Revision 34140 branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/impl/Geometry2D.java
Geometry2D.java | ||
---|---|---|
35 | 35 |
import java.awt.geom.Rectangle2D; |
36 | 36 |
|
37 | 37 |
import org.cresques.cts.ICoordTrans; |
38 |
import org.slf4j.Logger; |
|
39 |
import org.slf4j.LoggerFactory; |
|
40 |
|
|
38 | 41 |
import org.gvsig.fmap.geom.Geometry; |
39 | 42 |
import org.gvsig.fmap.geom.GeometryLocator; |
40 | 43 |
import org.gvsig.fmap.geom.GeometryManager; |
... | ... | |
50 | 53 |
import org.gvsig.fmap.geom.primitive.Point; |
51 | 54 |
import org.gvsig.fmap.geom.type.GeometryType; |
52 | 55 |
import org.gvsig.fmap.geom.util.Converter; |
53 |
import org.slf4j.Logger; |
|
54 |
import org.slf4j.LoggerFactory; |
|
55 | 56 |
|
56 | 57 |
/** |
57 | 58 |
* @author <a href="mailto:jpiera@gvsig.org">Jorge Piera</a> |
... | ... | |
574 | 575 |
GeometryOperationContext geometryOperationContext = new GeometryOperationContext(); |
575 | 576 |
geometryOperationContext.setAttribute("JTSGeometry", point); |
576 | 577 |
return (Point)this.invokeOperation("fromJTS", geometryOperationContext); |
577 |
} |
|
578 |
} |
|
579 |
|
|
580 |
public double area() throws GeometryOperationNotSupportedException, GeometryOperationException |
|
581 |
{ |
|
582 |
//Using get getJTS method instead of use the "toJTS" operation just for performance |
|
583 |
return getJTS().getArea(); |
|
584 |
} |
|
585 |
|
|
586 |
public double perimeter() throws GeometryOperationNotSupportedException, GeometryOperationException |
|
587 |
{ |
|
588 |
//Using get getJTS method instead of use the "toJTS" operation just for performance |
|
589 |
return getJTS().getLength(); |
|
590 |
} |
|
578 | 591 |
} |
579 | 592 |
|
Also available in: Unified diff