Package gov.nasa.worldwind.data
Class GDAL.Area
- java.lang.Object
-
- gov.nasa.worldwind.data.GDAL.Area
-
- Enclosing class:
- GDAL
public static class GDAL.Area extends java.lang.Object
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static Sector
calcBoundingSector(org.gdal.osr.SpatialReference srs, java.awt.geom.Point2D[] corners)
calculates a Geodetic bounding boxjava.awt.Rectangle
computeClipRect(int rasterWidth, int rasterHeight, GDAL.Area clipArea)
java.awt.geom.AffineTransform
computeGeoToRasterTransform(int width, int height)
boolean
contains(GDAL.Area that)
GDAL.Area
getBoundingArea()
java.awt.geom.Point2D[]
getCorners()
double
getMaxX()
double
getMaxY()
double
getMinX()
double
getMinY()
Sector
getSector()
org.gdal.osr.SpatialReference
getSpatialReference()
GDAL.Area
intersection(GDAL.Area that)
GDAL.Area
intersection(Sector sector)
boolean
isGeographic()
boolean
isProjected()
protected void
makeCorners(double minY, double maxY, double minX, double maxX)
java.lang.String
toString()
-
-
-
Field Detail
-
srs
protected org.gdal.osr.SpatialReference srs
-
corners
protected java.awt.geom.Point2D[] corners
-
bbox
protected Sector bbox
-
-
Constructor Detail
-
Area
public Area(org.gdal.osr.SpatialReference srs, org.gdal.gdal.Dataset ds) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
Area
protected Area(org.gdal.osr.SpatialReference srs, double minY, double maxY, double minX, double maxX) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
Area
public Area(org.gdal.osr.SpatialReference srs, Sector sector) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
-
Method Detail
-
calcBoundingSector
public static Sector calcBoundingSector(org.gdal.osr.SpatialReference srs, java.awt.geom.Point2D[] corners) throws java.lang.IllegalArgumentException, WWRuntimeException
calculates a Geodetic bounding box- Parameters:
srs
- A Spatial Reference, must not be null and not LOCAL (aka SCREEN) Coordinate Systemcorners
- An array of 2D geographic points (java.awt.geom.Point2D)- Returns:
- Sector
- Throws:
java.lang.IllegalArgumentException
- if any of the parameters are nullWWRuntimeException
- in case of geo-transformation errors
-
makeCorners
protected void makeCorners(double minY, double maxY, double minX, double maxX)
-
isGeographic
public boolean isGeographic()
-
isProjected
public boolean isProjected()
-
getSpatialReference
public org.gdal.osr.SpatialReference getSpatialReference()
-
getSector
public Sector getSector()
-
getBoundingArea
public GDAL.Area getBoundingArea()
-
getCorners
public java.awt.geom.Point2D[] getCorners()
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
getMinX
public double getMinX()
-
getMaxX
public double getMaxX()
-
getMinY
public double getMinY()
-
getMaxY
public double getMaxY()
-
intersection
public GDAL.Area intersection(Sector sector) throws WWRuntimeException
- Throws:
WWRuntimeException
-
intersection
public GDAL.Area intersection(GDAL.Area that) throws WWRuntimeException
- Throws:
WWRuntimeException
-
contains
public boolean contains(GDAL.Area that) throws WWRuntimeException
- Throws:
WWRuntimeException
-
computeGeoToRasterTransform
public java.awt.geom.AffineTransform computeGeoToRasterTransform(int width, int height)
-
computeClipRect
public java.awt.Rectangle computeClipRect(int rasterWidth, int rasterHeight, GDAL.Area clipArea) throws java.lang.IllegalArgumentException
- Throws:
java.lang.IllegalArgumentException
-
-