Package org.esa.snap.core.util
Class AreaCalculator
java.lang.Object
org.esa.snap.core.util.AreaCalculator
Calculates the size of an specified area in square meter. The size is computed considering the latitudinal
area correction.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiondoublecalculatePixelSize(int x, int y) Calculates the size of the pixel specified by the given x,y coordinates.doublecalculateRectangleSize(Rectangle2D rectangle) Calculates the size of the area of the rectangle specified.doubleThe earth radius used for the calculation
-
Constructor Details
-
Method Details
-
getEarthRadius
public double getEarthRadius()The earth radius used for the calculation- Returns:
- the earth radius in meter
-
calculatePixelSize
public double calculatePixelSize(int x, int y) Calculates the size of the pixel specified by the given x,y coordinates. The unit of the size is alwaysmeter.- Parameters:
x- the x location of the pixely- the y location of the pixel- Returns:
- the size in square meters
-
calculateRectangleSize
Calculates the size of the area of the rectangle specified. The rectangle needs to be specified in geo-graphical latitude/longitude coordinates The unit of the size is alwaysmeter.- Parameters:
rectangle- rectangle of the area in latitude/longitude coordinates- Returns:
- the size in square meters
-