Class GenericRasterAlgorithm
- java.lang.Object
-
- org.openjump.core.rasterimage.algorithms.GenericRasterAlgorithm
-
public class GenericRasterAlgorithm extends Object
-
-
Field Summary
Fields Modifier and Type Field Description static WorkbenchFrameframe
-
Constructor Summary
Constructors Constructor Description GenericRasterAlgorithm()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidload(File inputFile, String category)Load a file into the workbenchprotected voidnotsaved()voidsave_ChangeDecimalValues(File outputFile, RasterImageLayer rLayer, int band, int n)Reset the values to a defined number of decimalsvoidsave_ChangeNoData(File outputFile, RasterImageLayer rasterImageLayer, int band, double oldnodata, double newnodata)Modify nodata tag a values to a defined input and save to tif filevoidsave_CropToEnvelope(File outputFile, RasterImageLayer rasterLayer, org.locationtech.jts.geom.Envelope envelope)Crop a RasterImageLayer to a defined envelope and save to tif filevoidsave_CropToGeometry(File outputFile, RasterImageLayer rasterLayer, org.locationtech.jts.geom.Geometry geometry)voidsave_ExtractValidData(File outputFile, RasterImageLayer rasterImageLayer, int band, double mindata, double maxdata)Extract a raster defining limits of outputvoidsave_LimitValidData(File outputFile, RasterImageLayer rasterImageLayer, int band, double mindata, double maxdata)voidsave_ResetNoDataTag(File outputFile, RasterImageLayer rasterImageLayer, int band, double nodata)voidsave_WarpToEnvelope(File file, RasterImageLayer rLayer, org.locationtech.jts.geom.Envelope env)protected voidsaved(File file)
-
-
-
Field Detail
-
frame
public static WorkbenchFrame frame
-
-
Method Detail
-
save_ChangeNoData
public void save_ChangeNoData(File outputFile, RasterImageLayer rasterImageLayer, int band, double oldnodata, double newnodata) throws IOException
Modify nodata tag a values to a defined input and save to tif file- Parameters:
outputFile- file to save. Eg "C:/folder/filename.tif" (always add extension)rasterImageLayer- input RasterImageLayerband- input bandoldnodata- original nodata valuenewnodata- new nodata value- Throws:
IOException- if an IOException occurs during getRasterData or writeImage operations
-
save_ResetNoDataTag
public void save_ResetNoDataTag(File outputFile, RasterImageLayer rasterImageLayer, int band, double nodata) throws IOException
- Parameters:
outputFile- output filerasterImageLayer- raster image layerband- th eband to processnodata- nodata value- Throws:
IOException- if an IOException occurs
-
save_LimitValidData
public void save_LimitValidData(File outputFile, RasterImageLayer rasterImageLayer, int band, double mindata, double maxdata) throws IOException
- Throws:
IOException
-
save_ExtractValidData
public void save_ExtractValidData(File outputFile, RasterImageLayer rasterImageLayer, int band, double mindata, double maxdata) throws IOException
Extract a raster defining limits of output- Parameters:
outputFile- output filerasterImageLayer- raster image layerband- the band to processmindata- minimum data value to be extractedmaxdata- maximum data value to be extracted- Throws:
IOException- if an IOException occurs
-
save_ChangeDecimalValues
public void save_ChangeDecimalValues(File outputFile, RasterImageLayer rLayer, int band, int n) throws IOException
Reset the values to a defined number of decimals- Parameters:
outputFile- output filerLayer- raster image layerband- the band to processn- Number of decimal to set the values- Throws:
IOException- if an IOException occurs
-
saved
protected void saved(File file)
-
notsaved
protected void notsaved()
-
save_CropToEnvelope
public void save_CropToEnvelope(File outputFile, RasterImageLayer rasterLayer, org.locationtech.jts.geom.Envelope envelope) throws IOException
Crop a RasterImageLayer to a defined envelope and save to tif file- Parameters:
outputFile- file to save. Eg "C:/folder/filename.tif" (always add extension)rasterLayer- input RasterImageLayerenvelope- input envelope to crop RasterImageLayer- Throws:
IOException- if an IOException occurs
-
save_CropToGeometry
public void save_CropToGeometry(File outputFile, RasterImageLayer rasterLayer, org.locationtech.jts.geom.Geometry geometry) throws IOException
- Throws:
IOException
-
save_WarpToEnvelope
public void save_WarpToEnvelope(File file, RasterImageLayer rLayer, org.locationtech.jts.geom.Envelope env) throws Exception
- Throws:
Exception
-
load
public void load(File inputFile, String category) throws Exception
Load a file into the workbench- Parameters:
inputFile- eg. "new File(C:/folder/fileName.tif)"category- eg. "Working"- Throws:
Exception- if an IOException occurs in RasterImageIO.getImageDimensions or if a general Exception occurs in RasterImageIO.getGeoReferencing or in RasterImageIO.loadImage
-
-