public class GridCoordSys extends CoordinateSystem implements GridCoordSystem
CoordinateSystem.Builder<T extends CoordinateSystem.Builder<T>>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)
Deprecated.
use Projection.projToLatlonBB
|
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()
Deprecated.
will move in ver 6
|
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)
Deprecated.
doesnt work correctly for intervals
|
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()
Deprecated.
will move in ver 6
|
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 ve)
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, addLocalFieldsToBuilder, builder, containsAxes, containsAxis, containsAxisType, containsAxisTypes, containsDomain, countDomain, 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, isSubset, makeDomain, makeName, setImplicit, toBuilderclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetCoordinateAxes, getCoordinateTransforms, getDomain, getName, getProjectionCT, isProductSetpublic 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 ve)
sbuff - place information messages here, may be nullcs - the CoordinateSystem to testve - 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 GridCoordSystempublic VerticalCT getVerticalCT()
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 GridCoordSystemgetEnsembleAxis in class CoordinateSystempublic ProjectionImpl getProjection()
getProjection in interface GridCoordSystemgetProjection in class CoordinateSystempublic void setProjectionBoundingBox()
GridCoordSystemsetProjectionBoundingBox in interface GridCoordSystempublic boolean isLatLon()
isLatLon in interface GridCoordSystemisLatLon in class CoordinateSystempublic boolean isGlobalLon()
isGlobalLon in interface GridCoordSystempublic boolean isZPositive()
isZPositive in interface GridCoordSystempublic boolean isRegularSpatial()
isRegularSpatial in interface GridCoordSystempublic java.lang.String getHorizStaggerType()
getHorizStaggerType in interface GridCoordSystempublic void setHorizStaggerType(java.lang.String horizStaggerType)
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 (x,y) index in here, may be nullpublic int[] findXYindexFromCoordBounded(double x_coord,
double y_coord,
int[] result)
findXYindexFromCoordBounded in interface GridCoordSystemx_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 GridCoordSystemlat - latitude position.lon - longitude position.result - put result in here, may be nullpublic int[] findXYindexFromLatLonBounded(double lat,
double lon,
int[] result)
findXYindexFromLatLonBounded in interface GridCoordSystemlat - latitude position.lon - longitude position.result - put result in here, may be nullpublic boolean hasTimeAxis()
hasTimeAxis in interface GridCoordSystemhasTimeAxis in class CoordinateSystempublic boolean hasTimeAxis1D()
hasTimeAxis1D in interface GridCoordSystempublic CoordinateAxis1DTime getTimeAxisForRun(int run_index)
GridCoordSystemgetTimeAxisForRun in interface GridCoordSystemrun_index - which run?public ProjectionRect getBoundingBox()
getBoundingBox in interface GridCoordSystempublic LatLonPoint getLatLon(int xindex, int yindex)
getLatLon in interface GridCoordSystemxindex - x indexyindex - y indexpublic LatLonPoint getLatLon(double xcoord, double ycoord)
public LatLonRect getLatLonBoundingBox()
getLatLonBoundingBox in interface GridCoordSystempublic java.util.List<Range> getLatLonBoundingBox(LatLonRect rect) throws InvalidRangeException
InvalidRangeExceptionpublic java.util.List<Range> getRangesFromLatLonRect(LatLonRect rect) throws InvalidRangeException
getRangesFromLatLonRect in interface GridCoordSystemrect - the requested lat/lon bounding boxInvalidRangeException - if llbb generates bad rangespublic java.lang.String toString()
toString in class CoordinateSystempublic void show(java.util.Formatter f,
boolean showCoords)
show in interface GridCoordSystempublic java.util.List<CalendarDate> getCalendarDates()
getCalendarDates in interface GridCoordSystempublic CalendarDateRange getCalendarDateRange()
getCalendarDateRange in interface GridCoordSystem@Deprecated 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 name@Deprecated public java.util.List<NamedObject> getTimes()
public int[] findXYCoordElement(double x_coord,
double y_coord,
int[] result)
public DateRange getDateRange()
getDateRange in interface GridCoordSystempublic 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)
@Deprecated public static LatLonRect getLatLonBoundingBox(Projection proj, double startx, double starty, double endx, double endy)