|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.nc2.dataset.CoordinateSystem
ucar.nc2.dt.grid.GridCoordSys
public class GridCoordSys
A georeferencing "gridded" CoordinateSystem. This describes a "grid" of coordinates, which implies a connected topology such that values next to each other in index space are next to each other in coordinate space. Note: these classes should be considered experimental and will likely be refactored in the next release.
This currently assumes that the CoordinateSystem
| Constructor Summary | |
|---|---|
GridCoordSys(CoordinateSystem cs,
java.lang.StringBuffer 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. |
|
| Method Summary | |
|---|---|
int |
findTimeIndexFromDate(java.util.Date d)
Given a Date, find the corresponding time index on the time coordinate axis. |
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. |
ProjectionRect |
getBoundingBox()
Get the x,y bounding box in projection coordinates. |
DateRange |
getDateRange()
If there is a time coordinate, get the time covered. |
DateUnit |
getDateUnit()
|
CoordinateAxis1D |
getEnsembleAxis()
get the Ensemble axis, else null |
LatLonRect |
getLatLonBoundingBox()
Get horizontal bounding box in lat, lon coordinates. |
java.util.List |
getLatLonBoundingBox(LatLonRect rect)
Deprecated. use getRangesFromLatRect. |
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 |
getLevels()
Get the list of level names, to be used for user selection. |
ProjectionImpl |
getProjection()
get the projection |
java.util.List |
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()
Get the list of times as Dates. |
int |
getTimeIndex(java.lang.String name)
Get the index corresponding to the time name. |
java.lang.String |
getTimeName(int index)
Get the string name for the ith time coordinate. |
TimeUnit |
getTimeResolution()
return null if !isRegular() |
java.util.List |
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 Vertical CoordinateTransform, it it exists. |
VerticalTransform |
getVerticalTransform()
Get the vertical transform, if any. |
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 |
isDate()
is there a time coordinate, and can it be expressed as a Date? |
static boolean |
isGridCoordSys(java.lang.StringBuffer sbuff,
CoordinateSystem cs)
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.lang.StringBuffer sbuff,
CoordinateSystem cs,
VariableEnhanced v)
Determine if the CoordinateSystem cs can be made into a GridCoordSys for the Variable v. |
java.lang.String |
toString()
String representation. |
| Methods inherited from class ucar.nc2.dataset.CoordinateSystem |
|---|
addCoordinateTransform, addCoordinateTransforms, containsAxes, containsAxis, containsAxisType, containsAxisTypes, containsDomain, equals, findAxis, getAzimuthAxis, getCoordinateAxes, getCoordinateTransforms, getDomain, getElevationAxis, getHeightAxis, getLatAxis, getLonAxis, getName, getPressureAxis, getProjectionCT, getRadialAxis, getRankDomain, getRankRange, getTaxis, getXaxis, getYaxis, getZaxis, hashCode, hasVerticalAxis, isComplete, isGeoReferencing, isGeoXY, isImplicit, isProductSet, isRadial, isRegular, makeName |
| Methods inherited from class java.lang.Object |
|---|
getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface ucar.nc2.dt.GridCoordSystem |
|---|
getCoordinateAxes, getCoordinateTransforms, getDomain, getName, getProjectionCT, isProductSet |
| Constructor Detail |
|---|
public GridCoordSys(CoordinateSystem cs,
java.lang.StringBuffer sbuff)
public 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 it
InvalidRangeException| Method Detail |
|---|
public static boolean isGridCoordSys(java.lang.StringBuffer sbuff,
CoordinateSystem cs)
cs - the CoordinateSystem to test
CoordinateSystem.isGeoReferencing()
public static GridCoordSys makeGridCoordSys(java.lang.StringBuffer 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 GridCoordSystempublic VerticalCT getVerticalCT()
GridCoordSystem
getVerticalCT in interface GridCoordSystempublic CoordinateAxis getXHorizAxis()
getXHorizAxis in interface GridCoordSystempublic CoordinateAxis getYHorizAxis()
getYHorizAxis in interface GridCoordSystempublic CoordinateAxis1D getVerticalAxis()
getVerticalAxis in interface GridCoordSystempublic CoordinateAxis getTimeAxis()
getTimeAxis in interface GridCoordSystempublic CoordinateAxis1DTime getTimeAxis1D()
getTimeAxis1D in interface GridCoordSystempublic CoordinateAxis1DTime getRunTimeAxis()
getRunTimeAxis in interface GridCoordSystempublic CoordinateAxis1D getEnsembleAxis()
getEnsembleAxis in interface GridCoordSystempublic ProjectionImpl getProjection()
getProjection in interface GridCoordSystemgetProjection in class CoordinateSystempublic java.util.List getLevels()
public java.util.List getTimes()
public java.util.Date[] getTimeDates()
public boolean isLatLon()
isLatLon in interface GridCoordSystemisLatLon in class CoordinateSystempublic boolean isDate()
public boolean isZPositive()
isZPositive in interface GridCoordSystempublic boolean isRegularSpatial()
isRegularSpatial in interface GridCoordSystem
public int[] findXYindexFromCoord(double x_coord,
double y_coord,
int[] result)
findXYindexFromCoord in interface GridCoordSystemx_coord - position in x coordinate space.y_coord - position in y coordinate space.result - put result in here, may be null
public int[] findXYCoordElement(double x_coord,
double y_coord,
int[] result)
public int findTimeIndexFromDate(java.util.Date d)
d - date to look for
java.lang.UnsupportedOperationException - is no time axis or isDate() falsepublic java.lang.String getLevelName(int index)
index - which level coordinate
public int getLevelIndex(java.lang.String name)
name - level name
public java.lang.String getTimeName(int index)
index - which time coordinate
public int getTimeIndex(java.lang.String name)
name - time name
public DateRange getDateRange()
GridCoordSystem
getDateRange in interface GridCoordSystempublic boolean hasTimeAxis()
hasTimeAxis in interface GridCoordSystemhasTimeAxis in class CoordinateSystempublic boolean hasTimeAxis1D()
hasTimeAxis1D in interface GridCoordSystempublic CoordinateAxis1DTime getTimeAxisForRun(int run_index)
GridCoordSystem
getTimeAxisForRun in interface GridCoordSystemrun_index - which run?
public DateUnit getDateUnit()
throws java.lang.Exception
java.lang.Exception
public TimeUnit getTimeResolution()
throws java.lang.Exception
java.lang.Exceptionpublic ProjectionRect getBoundingBox()
getBoundingBox in interface GridCoordSystempublic LatLonRect getLatLonBoundingBox()
getLatLonBoundingBox in interface GridCoordSystempublic java.util.List getLatLonBoundingBox(LatLonRect rect)
public java.util.List getRangesFromLatLonRect(LatLonRect rect)
getRangesFromLatLonRect in interface GridCoordSystemrect - a lat/lon bounding box.
public java.lang.String toString()
toString in class CoordinateSystem
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||