public class GridCoordSys extends CoordinateSystem implements GridCoordSystem
aziAxis, coordAxes, coordTrans, dataType, domain, ds, elevAxis, ensAxis, hAxis, isImplicit, latAxis, lonAxis, name, pAxis, radialAxis, tAxis, xAxis, yAxis, zAxis
Constructor and Description |
---|
GridCoordSys(CoordinateSystem cs,
java.util.Formatter sbuff)
Create a GridCoordSys from an existing Coordinate System.
|
GridCoordSys(GridCoordSys from,
Range t_range,
Range z_range,
Range y_range,
Range x_range)
Create a GridCoordSys as a section of an existing GridCoordSys.
|
GridCoordSys(GridCoordSys from,
Range rt_range,
Range e_range,
Range t_range,
Range z_range,
Range y_range,
Range x_range)
Create a GridCoordSys as a section of an existing GridCoordSys.
|
Modifier and Type | Method and Description |
---|---|
int |
findTimeIndexFromDate(java.util.Date d)
Deprecated.
use CoordinateAxis1DTime.findTimeIndexFromDate
|
int[] |
findXYCoordElement(double x_coord,
double y_coord,
int[] result)
Deprecated.
use findXYindexFromCoord
|
int[] |
findXYindexFromCoord(double x_coord,
double y_coord,
int[] result)
Given a point in x,y coordinate space, find the x,y index in the coordinate system.
|
int[] |
findXYindexFromCoordBounded(double x_coord,
double y_coord,
int[] result)
Given a point in x,y coordinate space, find the x,y index in the coordinate system.
|
int[] |
findXYindexFromLatLon(double lat,
double lon,
int[] result)
Given a lat,lon point, find the x,y index in the coordinate system.
|
int[] |
findXYindexFromLatLonBounded(double lat,
double lon,
int[] result)
Given a lat,lon point, find the x,y index in the coordinate system.
|
ProjectionRect |
getBoundingBox()
Get the x,y bounding box in projection coordinates.
|
CalendarDateRange |
getCalendarDateRange() |
java.util.List<CalendarDate> |
getCalendarDates() |
DateRange |
getDateRange()
Deprecated.
use getCalendarDateRange
|
CoordinateAxis1D |
getEnsembleAxis()
get the Ensemble axis, else null
|
java.lang.String |
getHorizStaggerType() |
LatLonPoint |
getLatLon(double xcoord,
double ycoord) |
LatLonPoint |
getLatLon(int xindex,
int yindex)
Get the Lat/Lon coordinates of the midpoint of a grid cell, using the x,y indices
|
LatLonRect |
getLatLonBoundingBox()
Get horizontal bounding box in lat, lon coordinates.
|
java.util.List<Range> |
getLatLonBoundingBox(LatLonRect rect)
Deprecated.
use getRangesFromLatLonRect.
|
static LatLonRect |
getLatLonBoundingBox(Projection proj,
double startx,
double starty,
double endx,
double endy) |
int |
getLevelIndex(java.lang.String name)
Get the index corresponding to the level name.
|
java.lang.String |
getLevelName(int index)
Get the String name for the ith level(z) coordinate.
|
java.util.List<NamedObject> |
getLevels()
Get the list of level names, to be used for user selection.
|
ProjectionImpl |
getProjection()
get the projection
|
java.util.List<Range> |
getRangesFromLatLonRect(LatLonRect rect)
Get Index Ranges for the given lat, lon bounding box.
|
CoordinateAxis1DTime |
getRunTimeAxis()
get the RunTime axis, else null
|
CoordinateAxis |
getTimeAxis()
get the Time axis
|
CoordinateAxis1DTime |
getTimeAxis1D()
get the Time axis, if its 1-dimensional
|
CoordinateAxis1DTime |
getTimeAxisForRun(int run_index)
This is the case of a 2D time axis, which depends on the run index.
|
java.util.Date[] |
getTimeDates()
Deprecated.
use getCalendarDates
|
int |
getTimeIndex(java.lang.String name)
Deprecated.
|
java.lang.String |
getTimeName(int index)
Deprecated.
|
java.util.List<NamedObject> |
getTimes()
Get the list of time names, to be used for user selection.
|
CoordinateAxis1D |
getVerticalAxis()
get the Vertical axis (either Geoz, Height, or Pressure)
|
VerticalCT |
getVerticalCT()
Get the Coordinate Transform description.
|
VerticalTransform |
getVerticalTransform()
Get the vertical transform function, or null if none
|
CoordinateAxis |
getXHorizAxis()
get the X Horizontal axis (either GeoX or Lon)
|
CoordinateAxis |
getYHorizAxis()
get the Y Horizontal axis (either GeoY or Lat)
|
boolean |
hasTimeAxis()
True if there is a Time Axis.
|
boolean |
hasTimeAxis1D()
True if there is a Time Axis and it is 1D.
|
boolean |
isGlobalLon()
Is this a global coverage over longitude ?
|
static boolean |
isGridCoordSys(java.util.Formatter sbuff,
CoordinateSystem cs,
VariableEnhanced v)
Determine if this CoordinateSystem can be made into a GridCoordSys.
|
boolean |
isLatLon()
is this a Lat/Lon coordinate system?
|
boolean |
isRegularSpatial()
true if x and y axes are CoordinateAxis1D and are regular
|
boolean |
isZPositive()
true if increasing z coordinate values means "up" in altitude
|
static GridCoordSys |
makeGridCoordSys(java.util.Formatter sbuff,
CoordinateSystem cs,
VariableEnhanced v)
Determine if the CoordinateSystem cs can be made into a GridCoordSys for the Variable v.
|
void |
setHorizStaggerType(java.lang.String horizStaggerType) |
void |
setProjectionBoundingBox()
Use the bounding box to set the defaule map are of the projection.
|
void |
show(java.util.Formatter f,
boolean showCoords) |
java.lang.String |
toString()
String representation.
|
addCoordinateTransform, addCoordinateTransforms, containsAxes, containsAxis, containsAxisType, containsAxisTypes, containsDomain, equals, findAxis, getAzimuthAxis, getCoordinateAxes, getCoordinateTransforms, getDomain, getElevationAxis, getHeightAxis, getLatAxis, getLonAxis, getName, getNetcdfDataset, getPressureAxis, getProjectionCT, getRadialAxis, getRankDomain, getRankRange, getTaxis, getXaxis, getYaxis, getZaxis, hashCode, hasVerticalAxis, isComplete, isCoordinateSystemFor, isGeoReferencing, isGeoXY, isImplicit, isProductSet, isRadial, isRegular, isSubset, makeDomain, makeName, setImplicit
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
getCoordinateAxes, getCoordinateTransforms, getDomain, getName, getProjectionCT, isProductSet
public GridCoordSys(CoordinateSystem cs, java.util.Formatter sbuff)
cs
- create from this Coordinate Systemsbuff
- place information messages here, may be nullpublic GridCoordSys(GridCoordSys from, Range t_range, Range z_range, Range y_range, Range x_range) throws InvalidRangeException
from
- copy this GridCoordSyst_range
- subset the time dimension, or null if you want all of itz_range
- subset the vertical dimension, or null if you want all of ity_range
- subset the y dimension, or null if you want all of itx_range
- subset the x dimension, or null if you want all of itInvalidRangeException
- if any of the ranges are illegalpublic GridCoordSys(GridCoordSys from, Range rt_range, Range e_range, Range t_range, Range z_range, Range y_range, Range x_range) throws InvalidRangeException
from
- copy this GridCoordSysrt_range
- subset the runtime dimension, or null if you want all of ite_range
- subset the ensemble dimension, or null if you want all of itt_range
- subset the time dimension, or null if you want all of itz_range
- subset the vertical dimension, or null if you want all of ity_range
- subset the y dimension, or null if you want all of itx_range
- subset the x dimension, or null if you want all of itInvalidRangeException
- if any of the ranges are illegalpublic static boolean isGridCoordSys(java.util.Formatter sbuff, CoordinateSystem cs, VariableEnhanced v)
sbuff
- place information messages here, may be nullcs
- the CoordinateSystem to testv
- can it be used for this variable; v may be nullCoordinateSystem.isGeoReferencing()
public static GridCoordSys makeGridCoordSys(java.util.Formatter sbuff, CoordinateSystem cs, VariableEnhanced v)
sbuff
- put debug information into this StringBuffer; may be null.cs
- CoordinateSystem to check.v
- Variable to check.public VerticalTransform getVerticalTransform()
getVerticalTransform
in interface GridCoordSystem
public VerticalCT getVerticalCT()
getVerticalCT
in interface GridCoordSystem
public CoordinateAxis getXHorizAxis()
getXHorizAxis
in interface GridCoordSystem
public CoordinateAxis getYHorizAxis()
getYHorizAxis
in interface GridCoordSystem
public CoordinateAxis1D getVerticalAxis()
getVerticalAxis
in interface GridCoordSystem
public CoordinateAxis getTimeAxis()
getTimeAxis
in interface GridCoordSystem
public CoordinateAxis1DTime getTimeAxis1D()
getTimeAxis1D
in interface GridCoordSystem
public CoordinateAxis1DTime getRunTimeAxis()
getRunTimeAxis
in interface GridCoordSystem
public CoordinateAxis1D getEnsembleAxis()
getEnsembleAxis
in interface GridCoordSystem
getEnsembleAxis
in class CoordinateSystem
public ProjectionImpl getProjection()
getProjection
in interface GridCoordSystem
getProjection
in class CoordinateSystem
public void setProjectionBoundingBox()
GridCoordSystem
setProjectionBoundingBox
in interface GridCoordSystem
public boolean isLatLon()
isLatLon
in interface GridCoordSystem
isLatLon
in class CoordinateSystem
public boolean isGlobalLon()
isGlobalLon
in interface GridCoordSystem
public boolean isZPositive()
isZPositive
in interface GridCoordSystem
public boolean isRegularSpatial()
isRegularSpatial
in interface GridCoordSystem
public java.lang.String getHorizStaggerType()
getHorizStaggerType
in interface GridCoordSystem
public void setHorizStaggerType(java.lang.String horizStaggerType)
public int[] findXYindexFromCoord(double x_coord, double y_coord, int[] result)
findXYindexFromCoord
in interface GridCoordSystem
x_coord
- position in x coordinate space.y_coord
- position in y coordinate space.result
- put result (x,y) index in here, may be nullpublic int[] findXYindexFromCoordBounded(double x_coord, double y_coord, int[] result)
findXYindexFromCoordBounded
in interface GridCoordSystem
x_coord
- position in x coordinate space.y_coord
- position in y coordinate space.result
- put result in here, may be nullpublic int[] findXYindexFromLatLon(double lat, double lon, int[] result)
findXYindexFromLatLon
in interface GridCoordSystem
lat
- latitude position.lon
- longitude position.result
- put result in here, may be nullpublic int[] findXYindexFromLatLonBounded(double lat, double lon, int[] result)
findXYindexFromLatLonBounded
in interface GridCoordSystem
lat
- latitude position.lon
- longitude position.result
- put result in here, may be nullpublic boolean hasTimeAxis()
hasTimeAxis
in interface GridCoordSystem
hasTimeAxis
in class CoordinateSystem
public boolean hasTimeAxis1D()
hasTimeAxis1D
in interface GridCoordSystem
public CoordinateAxis1DTime getTimeAxisForRun(int run_index)
GridCoordSystem
getTimeAxisForRun
in interface GridCoordSystem
run_index
- which run?public ProjectionRect getBoundingBox()
getBoundingBox
in interface GridCoordSystem
public LatLonPoint getLatLon(int xindex, int yindex)
getLatLon
in interface GridCoordSystem
xindex
- x indexyindex
- y indexpublic LatLonPoint getLatLon(double xcoord, double ycoord)
public LatLonRect getLatLonBoundingBox()
getLatLonBoundingBox
in interface GridCoordSystem
public java.util.List<Range> getLatLonBoundingBox(LatLonRect rect) throws InvalidRangeException
InvalidRangeException
public java.util.List<Range> getRangesFromLatLonRect(LatLonRect rect) throws InvalidRangeException
getRangesFromLatLonRect
in interface GridCoordSystem
rect
- the requested lat/lon bounding boxInvalidRangeException
- if llbb generates bad rangespublic java.lang.String toString()
toString
in class CoordinateSystem
public void show(java.util.Formatter f, boolean showCoords)
show
in interface GridCoordSystem
public java.util.List<CalendarDate> getCalendarDates()
getCalendarDates
in interface GridCoordSystem
public CalendarDateRange getCalendarDateRange()
getCalendarDateRange
in interface GridCoordSystem
public java.util.List<NamedObject> getLevels()
public java.lang.String getLevelName(int index)
index
- which level coordinatepublic int getLevelIndex(java.lang.String name)
name
- level namepublic java.util.List<NamedObject> getTimes()
public int[] findXYCoordElement(double x_coord, double y_coord, int[] result)
public DateRange getDateRange()
getDateRange
in interface GridCoordSystem
public java.util.Date[] getTimeDates()
public java.lang.String getTimeName(int index)
index
- which time coordinatepublic int getTimeIndex(java.lang.String name)
name
- time namepublic int findTimeIndexFromDate(java.util.Date d)
public static LatLonRect getLatLonBoundingBox(Projection proj, double startx, double starty, double endx, double endy)