Revision 34140 branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/impl/AbstractPrimitive.java
AbstractPrimitive.java | ||
---|---|---|
8 | 8 |
|
9 | 9 |
import org.cresques.cts.ICoordTrans; |
10 | 10 |
import org.cresques.cts.IProjection; |
11 |
import org.slf4j.Logger; |
|
12 |
import org.slf4j.LoggerFactory; |
|
13 |
|
|
11 | 14 |
import org.gvsig.fmap.geom.Geometry; |
12 | 15 |
import org.gvsig.fmap.geom.GeometryLocator; |
13 | 16 |
import org.gvsig.fmap.geom.GeometryManager; |
... | ... | |
25 | 28 |
import org.gvsig.fmap.geom.primitive.Primitive; |
26 | 29 |
import org.gvsig.fmap.geom.type.GeometryType; |
27 | 30 |
import org.gvsig.fmap.geom.util.Converter; |
28 |
import org.slf4j.Logger; |
|
29 |
import org.slf4j.LoggerFactory; |
|
30 | 31 |
|
31 | 32 |
|
32 | 33 |
/** |
... | ... | |
672 | 673 |
GeometryOperationContext geometryOperationContext = new GeometryOperationContext(); |
673 | 674 |
geometryOperationContext.setAttribute("JTSGeometry", point); |
674 | 675 |
return (Point)this.invokeOperation("fromJTS", geometryOperationContext); |
675 |
} |
|
676 |
} |
|
677 |
|
|
678 |
public double area() throws GeometryOperationNotSupportedException, GeometryOperationException |
|
679 |
{ |
|
680 |
//Using get getJTS method instead of use the "toJTS" operation just for performance |
|
681 |
return getJTS().getArea(); |
|
682 |
} |
|
683 |
|
|
684 |
public double perimeter() throws GeometryOperationNotSupportedException, GeometryOperationException |
|
685 |
{ |
|
686 |
//Using get getJTS method instead of use the "toJTS" operation just for performance |
|
687 |
return getJTS().getLength(); |
|
688 |
} |
|
676 | 689 |
} |
Also available in: Unified diff