File |
Line |
org/deegree/wps/jts/CentroidProcesslet.java |
97 |
org/deegree/wps/jts/ConvexHullProcesslet.java |
90 |
return inputGeometry.getCentroid();
}
private void writeGeometry( ComplexOutput gmlOutput, Geometry geometry )
throws ProcessletException {
try {
SchemaLocationXMLStreamWriter sw = new SchemaLocationXMLStreamWriter( gmlOutput.getXMLStreamWriter(),
"http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/base/geometryAggregates.xsd" );
sw.setPrefix( "gml", GMLNS );
GMLStreamWriter gmlWriter = GMLOutputFactory.createGMLStreamWriter( GML_31, sw );
gmlWriter.write( geometry );
} catch ( Exception e ) {
throw new ProcessletException( "Error exporting geometry: " + e.getMessage() );
}
}
private Geometry readGeometry( ComplexInput gmlInput1 )
throws ProcessletException {
try {
XMLStreamReader xmlReader = gmlInput1.getValueAsXMLStream();
GMLStreamReader gmlReader = GMLInputFactory.createGMLStreamReader( GML_31, xmlReader );
return gmlReader.readGeometry();
} catch ( Exception e ) {
throw new ProcessletException( "Error parsing parameter " + gmlInput1.getIdentifier() + ": "
+ e.getMessage() );
}
}
} |
File |
Line |
org/deegree/wps/jts/DifferenceProcesslet.java |
92 |
org/deegree/wps/jts/UnionProcesslet.java |
92 |
writeGeometry( differenceOutput, difference );
}
private void writeGeometry( ComplexOutput gmlOutput, Geometry geometry )
throws ProcessletException {
try {
SchemaLocationXMLStreamWriter sw = new SchemaLocationXMLStreamWriter( gmlOutput.getXMLStreamWriter(),
"http://www.opengis.net/gml http://schemas.opengis.net/gml/3.1.1/base/geometryAggregates.xsd" );
sw.setPrefix( "gml", GMLNS );
GMLStreamWriter gmlWriter = GMLOutputFactory.createGMLStreamWriter( GML_31, sw );
gmlWriter.write( geometry );
} catch ( Exception e ) {
throw new ProcessletException( "Error exporting geometry: " + e.getMessage() );
}
}
private Geometry readGeometry( ComplexInput gmlInput )
throws ProcessletException {
try {
XMLStreamReader xmlReader = gmlInput.getValueAsXMLStream();
GMLStreamReader gmlReader = GMLInputFactory.createGMLStreamReader( GML_31, xmlReader );
return gmlReader.readGeometry();
} catch ( Exception e ) {
throw new ProcessletException( "Error parsing parameter " + gmlInput.getIdentifier() + ": "
+ e.getMessage() );
}
}
} |