use of au.gov.asd.tac.constellation.utilities.geospatial.Shape.SpatialReference in project constellation by constellation-app.
the class ExportToShapefilePlugin method exportGeo.
@Override
protected void exportGeo(final PluginParameters parameters, final String uuid, final Map<String, String> shapes, final Map<String, Map<String, Object>> attributes, final File output) throws IOException {
final ParameterValue geometryTypePV = parameters.getSingleChoice(GEOMETRY_TYPE_PARAMETER_ID);
assert (geometryTypePV instanceof GeometryTypeParameterValue);
final GeometryType geometryType = ((GeometryTypeParameterValue) geometryTypePV).getGeometryType();
final ParameterValue spatialReferencePV = parameters.getSingleChoice(SPATIAL_REFERENCE_PARAMETER_ID);
assert (spatialReferencePV instanceof SpatialReferenceParameterValue);
final SpatialReference spatialReference = ((SpatialReferenceParameterValue) spatialReferencePV).getSpatialReference();
Shape.generateShapefile(uuid, geometryType, shapes, attributes, output, spatialReference);
}
Aggregations