public static Geometry removePoint ( Geometry geometry , Polygon polygon ) throws SQLException { if ( geometry == null ) { return null ; } GeometryEditor localGeometryEditor = new GeometryEditor ( ) ; PolygonDeleteVertexOperation localBoxDeleteVertexOperation = new PolygonDeleteVertexOperation ( geometry . getFactory ( ) , new PreparedPolygon ( polygon ) ) ; Geometry localGeometry = localGeometryEditor . edit ( geometry , localBoxDeleteVertexOperation ) ; if ( localGeometry . isEmpty ( ) ) { return null ; } return localGeometry ; }
Remove all vertices that are located within a polygon