Package uk.ac.rdg.resc.edal.util
Class CoastlineReader
- java.lang.Object
-
- uk.ac.rdg.resc.edal.util.CoastlineReader
-
public class CoastlineReader extends Object
A class with static methods to read data from the GSHHS binary format to create masks of land data. Also contains a method to apply such a mask to an image file. All data assumed to be in EPSG:4326. Its original purpose was to mask out oceans from satellite images for the MyOcean project. This doesn't fit nicely into EDAL yet, but it has some useful methods so it is going in the codebase. We may want to modify this for other purposes in the future.- Author:
- Guy
-
-
Constructor Summary
Constructors Constructor Description CoastlineReader()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static BufferedImage
applyMask(BufferedImage original, BufferedImage mask)
static BufferedImage
generateMask(File gshhsBinFile, double minLon, double maxLon, double minLat, double maxLat, int width, int height)
static void
main(String[] args)
-
-
-
Method Detail
-
main
public static void main(String[] args) throws IOException
- Throws:
IOException
-
applyMask
public static BufferedImage applyMask(BufferedImage original, BufferedImage mask)
-
generateMask
public static BufferedImage generateMask(File gshhsBinFile, double minLon, double maxLon, double minLat, double maxLat, int width, int height) throws IOException
- Throws:
IOException
-
-