NASA World Wind

gov.nasa.worldwind.data
Class GDAL.Area

java.lang.Object
  extended by gov.nasa.worldwind.data.GDAL.Area
Enclosing class:
GDAL

public static class GDAL.Area
extends Object


Field Summary
protected  Sector bbox
           
protected  Point2D[] corners
           
protected  org.gdal.osr.SpatialReference srs
           
 
Constructor Summary
  GDAL.Area(org.gdal.osr.SpatialReference srs, org.gdal.gdal.Dataset ds)
           
protected GDAL.Area(org.gdal.osr.SpatialReference srs, double minY, double maxY, double minX, double maxX)
           
  GDAL.Area(org.gdal.osr.SpatialReference srs, Sector sector)
           
 
Method Summary
static Sector calcBoundingSector(org.gdal.osr.SpatialReference srs, Point2D[] corners)
          calculates a Geodetic bounding box
 Rectangle computeClipRect(int rasterWidth, int rasterHeight, GDAL.Area clipArea)
           
 AffineTransform computeGeoToRasterTransform(int width, int height)
           
 boolean contains(GDAL.Area that)
           
 GDAL.Area getBoundingArea()
           
 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)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

bbox

protected Sector bbox

corners

protected Point2D[] corners

srs

protected org.gdal.osr.SpatialReference srs
Constructor Detail

GDAL.Area

public GDAL.Area(org.gdal.osr.SpatialReference srs,
                 org.gdal.gdal.Dataset ds)
          throws IllegalArgumentException
Throws:
IllegalArgumentException

GDAL.Area

protected GDAL.Area(org.gdal.osr.SpatialReference srs,
                    double minY,
                    double maxY,
                    double minX,
                    double maxX)
             throws IllegalArgumentException
Throws:
IllegalArgumentException

GDAL.Area

public GDAL.Area(org.gdal.osr.SpatialReference srs,
                 Sector sector)
          throws IllegalArgumentException
Throws:
IllegalArgumentException
Method Detail

calcBoundingSector

public static Sector calcBoundingSector(org.gdal.osr.SpatialReference srs,
                                        Point2D[] corners)
                                 throws IllegalArgumentException,
                                        WWRuntimeException
calculates a Geodetic bounding box

Parameters:
srs - A Spatial Reference, must not be null and not LOCAL (aka SCREEN) Coordinate System
corners - An array of 2D geographic points (java.awt.geom.Point2D)
Returns:
Sector
Throws:
IllegalArgumentException - if any of the parameters are null
WWRuntimeException - in case of geo-transformation errors

computeClipRect

public Rectangle computeClipRect(int rasterWidth,
                                 int rasterHeight,
                                 GDAL.Area clipArea)
                          throws IllegalArgumentException
Throws:
IllegalArgumentException

computeGeoToRasterTransform

public AffineTransform computeGeoToRasterTransform(int width,
                                                   int height)

contains

public boolean contains(GDAL.Area that)
                 throws WWRuntimeException
Throws:
WWRuntimeException

getBoundingArea

public GDAL.Area getBoundingArea()

getCorners

public Point2D[] getCorners()

getMaxX

public double getMaxX()

getMaxY

public double getMaxY()

getMinX

public double getMinX()

getMinY

public double getMinY()

getSector

public Sector getSector()

getSpatialReference

public org.gdal.osr.SpatialReference getSpatialReference()

intersection

public GDAL.Area intersection(GDAL.Area that)
                       throws WWRuntimeException
Throws:
WWRuntimeException

intersection

public GDAL.Area intersection(Sector sector)
                       throws WWRuntimeException
Throws:
WWRuntimeException

isGeographic

public boolean isGeographic()

isProjected

public boolean isProjected()

makeCorners

protected void makeCorners(double minY,
                           double maxY,
                           double minX,
                           double maxX)

toString

public String toString()
Overrides:
toString in class Object

NASA World Wind