Class TiffUtilsV2
java.lang.Object
org.openjump.core.rasterimage.TiffUtilsV2
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic org.locationtech.jts.geom.EnvelopegetEnvelope(File tiffFile) static javax.media.jai.RenderedOpgetRenderedOp(File tiffFile) static DoublereadCellValue(File tiffFile, int col, int row, int band) Method to read the value of a cell at defined position on the rasterstatic ImageAndMetadatareadImage(File tiffFile, org.locationtech.jts.geom.Envelope viewportEnvelope, Resolution requestedRes, Overviews overviews, Stats stats) Method to build an ImageAndMetadata file An ImageAndMetadata groups the Envelope, the Image, the Statistics and NoData value of a TIF filestatic ImageAndMetadatareadImageAndMetadata(File tiffFile, org.locationtech.jts.geom.Envelope viewportEnvelope, Resolution requestedRes, Stats stats) New method to build an ImageAndMetadata file An ImageAndMetadata groups the Envelope, the Image, the Statistics and NoData value of a TIF file Removed reading overviews and dependency to commons imaging librarystatic javax.media.jai.RenderedOpreadSubsampled(File tiffFile, float xScale, float yScale) static voidremoveFromGeoRastercache(File file)
-
Constructor Details
-
TiffUtilsV2
public TiffUtilsV2()
-
-
Method Details
-
removeFromGeoRastercache
-
getRenderedOp
- Throws:
IOException
-
getEnvelope
- Throws:
IOException
-
readSubsampled
public static javax.media.jai.RenderedOp readSubsampled(File tiffFile, float xScale, float yScale) throws IOException - Throws:
IOException
-
readImage
public static ImageAndMetadata readImage(File tiffFile, org.locationtech.jts.geom.Envelope viewportEnvelope, Resolution requestedRes, Overviews overviews, Stats stats) throws NoninvertibleTransformException, IOException, FileNotFoundException, TiffTags.TiffReadingException, Exception Method to build an ImageAndMetadata file An ImageAndMetadata groups the Envelope, the Image, the Statistics and NoData value of a TIF file- Parameters:
tiffFile- file containing the tiff imageviewportEnvelope- envelope of the viewportrequestedRes- requested resolutionoverviews- overviewsstats- statistics about image data- Returns:
- an ImageAndMetadata
- Throws:
NoninvertibleTransformException- if a NoninvertibleTransformException occursIOException- if a IOException occursFileNotFoundException- if a FileNotFoundException occursTiffTags.TiffReadingException- if a TiffTags.TiffReadingException occursException- if a Exception occurs
-
readImageAndMetadata
public static ImageAndMetadata readImageAndMetadata(File tiffFile, org.locationtech.jts.geom.Envelope viewportEnvelope, Resolution requestedRes, Stats stats) throws NoninvertibleTransformException, IOException, FileNotFoundException, Exception New method to build an ImageAndMetadata file An ImageAndMetadata groups the Envelope, the Image, the Statistics and NoData value of a TIF file Removed reading overviews and dependency to commons imaging library- Parameters:
tiffFile- file containing the tiff imageviewportEnvelope- envelope of the viewportrequestedRes- requested resolutionstats- statistics about image data- Returns:
- ImageAndMetadata
- Throws:
NoninvertibleTransformException- if a NoninvertibleTransformException occursIOException- if a IOException occursFileNotFoundException- if a FileNotFoundException occursTiffTags.TiffReadingException- if a TiffTags.TiffReadingException occursException- if a Exception occurs
-
readCellValue
Method to read the value of a cell at defined position on the raster- Parameters:
tiffFile- file containing a tiff imagecol- column indexrow- row indexband- numero of band- Returns:
- the double value of the celle at coordinates col, row
- Throws:
Exception- if an Exception occurs
-