Revision 38770 branches/v2_0_0_prep/libraries/libFMap_geometries/src/org/gvsig/fmap/geom/primitive/impl/AbstractPrimitive.java

View differences:

AbstractPrimitive.java
673 673
		GeometryOperationContext geometryOperationContext = new GeometryOperationContext();
674 674
		geometryOperationContext.setAttribute("JTSGeometry", point);
675 675
		return (Point)this.invokeOperation("fromJTS", geometryOperationContext);		
676
	}	
676
	}
677 677
	
678
	   
679
	public Point getInteriorPoint() throws GeometryOperationNotSupportedException, GeometryOperationException {
680
	    
681
	    try {
682
	        com.vividsolutions.jts.geom.Geometry geometry = getJTS();
683
	        com.vividsolutions.jts.geom.Point point = geometry.getInteriorPoint();
684
	        GeometryOperationContext geometryOperationContext = new GeometryOperationContext();
685
	        geometryOperationContext.setAttribute("JTSGeometry", point);
686
	        return (Point)this.invokeOperation("fromJTS", geometryOperationContext);
687
        } catch (GeometryOperationNotSupportedException ns_ex) {
688
            throw ns_ex;
689
        } catch (GeometryOperationException op_ex) {
690
            throw op_ex;
691
	    } catch (Exception ex) {
692
	        /*
693
	         * This is for unexpected null pointer exceptions or other
694
	         */
695
	        throw new GeometryOperationException(ex);
696
	    }
697
	}   
698

  
699
	
678 700
	public double area() throws GeometryOperationNotSupportedException, GeometryOperationException
679 701
    {
680 702
        //Using get getJTS method instead of use the "toJTS" operation just for performance

Also available in: Unified diff