sgtplot.dm
Class ThreeDGrid
- java.lang.Object
-
- sgtplot.dm.ThreeDGrid
-
- All Implemented Interfaces:
- java.io.Serializable, java.lang.Cloneable, Cartesian, CoordinateSystem, SGT3DGrid, SGTData
public class ThreeDGrid extends java.lang.Object implements SGT3DGrid, Cartesian, java.lang.Cloneable, java.io.Serializable
ThreeDGridprovides an implementation of theSGT3DGridandCartesianinterfaces.- Since:
- 1.0
- See Also:
SGTGrid,Cartesian, Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description ThreeDGrid()Default constructor.ThreeDGrid(double[] grid, double[] xloc, double[] yloc, double[] zloc, java.lang.String title)Constructor for X, Y, and Z coordinates as double.ThreeDGrid(double[] grid, double[] xloc, double[] yloc, GeoDate[] tloc, java.lang.String title)Constructor for X double and Y double, and Z time.ThreeDGrid(double[] grid, double[] xloc, GeoDate[] tloc, double[] zloc, java.lang.String title)Constructor for X, Z double and Y time.ThreeDGrid(double[] grid, GeoDate[] tloc, double[] yloc, double[] zloc, java.lang.String title)Constructor for X time and Y, Z double.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description voidaddPropertyChangeListener(java.beans.PropertyChangeListener l)Add a PropertyChangeListener to the listener list.SGTDatacopy()Create a copy of the grid.SGTGridgetAssociatedData()java.lang.StringgetId()Get the unique identifier.SGLabelgetKeyTitle()Get a title formatted for a Key.GeoDate[]getTimeArray()GeoDate[]getTimeEdges()java.lang.StringgetTitle()Get the title.intgetTSize()Get the length of the Time axisdouble[]getValArray()intgetValArraySize()SGTMetaDatagetValMetaData()Get the Value SGTMetaData.Range2DgetValRange()Get the range of measured values on this 3D grid.double[]getXArray()double[]getXEdges()SoTRangegetXEdgesRange()Return the range of the x edgesSGTMetaDatagetXMetaData()Returns the X SGTMetaData.SoTRangegetXRange()Returns the range of the X coordinates.intgetXSize()Get the length of the x axisdouble[]getYArray()double[]getYEdges()SoTRangegetYEdgesRange()Return the range of the y edgesSGTMetaDatagetYMetaData()Returns the Y SGTMetaData.SoTRangegetYRange()Returns the range of the Y coordinates.intgetYSize()Get the length of the y axisdouble[]getZArray()double[]getZEdges()Get the Y coordinate edges.SoTRangegetZEdgesRange()Get the range of Y coordinate edges.SGTMetaDatagetZMetaData()SoTRangegetZRange()intgetZSize()Get the length of Z value array.booleanhasAssociatedData()booleanhasXEdges()booleanhasYEdges()booleanhasZEdges()Z edges available?booleanisXTime()Returns true if the X coordinate is Time.booleanisYTime()Returns true if the Y coordinate is Time.booleanisZTime()Returns true if the Z coordinate is Time.voidremovePropertyChangeListener(java.beans.PropertyChangeListener l)Remove a PropertyChangeListener from the listener list.voidsetAssociatedData(SGTGrid assoc)Set the associated data grid.voidsetId(java.lang.String ident)Set the unique identifier.voidsetKeyTitle(SGLabel title)Set the title formatted for theVectorKey.voidsetTimeArray(GeoDate[] tloc)set the temporal grid centers
Property Change:dataModified.voidsetTimeEdges(GeoDate[] edge)Set the values for the temporal grid edges.voidsetTitle(java.lang.String title)Set the grid titlevoidsetValArray(double[] grid)Set the z grid values.voidsetValMetaData(SGTMetaData md)Set theSGTMetaDataassociated with the z coordinate.voidsetXArray(double[] xloc)Set the x coordinate grid centers
Property Change:dataModified.voidsetXEdges(double[] edge)Set the values for the x grid edges.voidsetXMetaData(SGTMetaData md)Set theSGTMetaDataassociated with the x coordinate.voidsetXTime(boolean flag)voidsetYArray(double[] yloc)Set the y coordinate grid centers
Property Change:dataModified.voidsetYEdges(double[] edge)Set the values for the y grid edges.voidsetYMetaData(SGTMetaData md)Set theSGTMetaDataassociated with the y coordinate.voidsetYTime(boolean flag)voidsetZArray(double[] zloc)Set the z coordinate grid centers
Property Change:dataModified.voidsetZEdges(double[] edge)Set the values for the z grid edges.voidsetZMetaData(SGTMetaData md)Set theSGTMetaDataassociated with the z coordinate.voidsetZTime(boolean flag)
-
-
-
Constructor Detail
-
ThreeDGrid
public ThreeDGrid()
Default constructor.
-
ThreeDGrid
public ThreeDGrid(double[] grid, double[] xloc, double[] yloc, double[] zloc, java.lang.String title)Constructor for X, Y, and Z coordinates as double.- Parameters:
grid- Z valuesxloc- X coordinatesyloc- Y coordinateszloc- Z coordinatestitle- the title
-
ThreeDGrid
public ThreeDGrid(double[] grid, GeoDate[] tloc, double[] yloc, double[] zloc, java.lang.String title)Constructor for X time and Y, Z double.- Parameters:
grid- valuestloc- Time coordinatesyloc- Y coordinateszloc- Z coordinatestitle- the title
-
ThreeDGrid
public ThreeDGrid(double[] grid, double[] xloc, GeoDate[] tloc, double[] zloc, java.lang.String title)Constructor for X, Z double and Y time.- Parameters:
grid- valuesxloc- X coordinatesxloc- Z coordinatestloc- Time coordinatestitle- the title
-
ThreeDGrid
public ThreeDGrid(double[] grid, double[] xloc, double[] yloc, GeoDate[] tloc, java.lang.String title)Constructor for X double and Y double, and Z time.- Parameters:
grid- Z valuesxloc- X coordinatestloc- Time coordinatestitle- the title
-
-
Method Detail
-
copy
public SGTData copy()
Create a copy of the grid.
-
getXArray
public double[] getXArray()
-
getXSize
public int getXSize()
Get the length of the x axis- Since:
- 2.0
-
getYArray
public double[] getYArray()
-
getYSize
public int getYSize()
Get the length of the y axis- Since:
- 2.0
-
getZArray
public double[] getZArray()
-
getZSize
public int getZSize()
Description copied from interface:SGT3DGridGet the length of Z value array.
-
getValArray
public double[] getValArray()
-
getValArraySize
public int getValArraySize()
-
getTimeArray
public GeoDate[] getTimeArray()
-
getTSize
public int getTSize()
Get the length of the Time axis- Since:
- 2.0
-
isXTime
public boolean isXTime()
Description copied from interface:SGTDataReturns true if the X coordinate is Time.
-
isYTime
public boolean isYTime()
Description copied from interface:SGTDataReturns true if the Y coordinate is Time.
-
isZTime
public boolean isZTime()
Description copied from interface:SGT3DGridReturns true if the Z coordinate is Time.
-
setXTime
public void setXTime(boolean flag)
-
setYTime
public void setYTime(boolean flag)
-
setZTime
public void setZTime(boolean flag)
-
getXMetaData
public SGTMetaData getXMetaData()
Description copied from interface:SGTDataReturns the X SGTMetaData.- Specified by:
getXMetaDatain interfaceSGTData
-
getYMetaData
public SGTMetaData getYMetaData()
Description copied from interface:SGTDataReturns the Y SGTMetaData.- Specified by:
getYMetaDatain interfaceSGTData
-
getZMetaData
public SGTMetaData getZMetaData()
-
getValMetaData
public SGTMetaData getValMetaData()
Description copied from interface:SGT3DGridGet the Value SGTMetaData.- Specified by:
getValMetaDatain interfaceSGT3DGrid
-
getTitle
public java.lang.String getTitle()
Description copied from interface:SGTDataGet the title.
-
setAssociatedData
public void setAssociatedData(SGTGrid assoc)
Set the associated data grid.
Property Change:associatedDataModified.- Since:
- 2.0
-
getAssociatedData
public SGTGrid getAssociatedData()
-
hasAssociatedData
public boolean hasAssociatedData()
-
hasXEdges
public boolean hasXEdges()
-
getXEdges
public double[] getXEdges()
-
hasZEdges
public boolean hasZEdges()
Description copied from interface:SGT3DGridZ edges available?
-
setZEdges
public void setZEdges(double[] edge)
Set the values for the z grid edges.
-
getZEdges
public double[] getZEdges()
Description copied from interface:SGT3DGridGet the Y coordinate edges. The YEdge length will be one greater than the YArray length.
-
setXEdges
public void setXEdges(double[] edge)
Set the values for the x grid edges.
-
hasYEdges
public boolean hasYEdges()
-
getYEdges
public double[] getYEdges()
-
setYEdges
public void setYEdges(double[] edge)
Set the values for the y grid edges.
-
getTimeEdges
public GeoDate[] getTimeEdges()
-
setTimeEdges
public void setTimeEdges(GeoDate[] edge)
Set the values for the temporal grid edges.
-
setXMetaData
public void setXMetaData(SGTMetaData md)
Set theSGTMetaDataassociated with the x coordinate.
-
setYMetaData
public void setYMetaData(SGTMetaData md)
Set theSGTMetaDataassociated with the y coordinate.
-
setZMetaData
public void setZMetaData(SGTMetaData md)
Set theSGTMetaDataassociated with the z coordinate.
-
setValMetaData
public void setValMetaData(SGTMetaData md)
Set theSGTMetaDataassociated with the z coordinate.
-
setTitle
public void setTitle(java.lang.String title)
Set the grid title
-
getKeyTitle
public SGLabel getKeyTitle()
Description copied from interface:SGTDataGet a title formatted for a Key.JPlotLayoutwill use this if an explicit Key title is not given in theaddDatamethod.- Specified by:
getKeyTitlein interfaceSGTData- See Also:
SGLabel,ColorKey,LineKey,PointCollectionKey,VectorKey
-
setKeyTitle
public void setKeyTitle(SGLabel title)
Set the title formatted for theVectorKey.
-
getId
public java.lang.String getId()
Get the unique identifier. The presence of the identifier is optional, but if it is present it should be unique. This field is used to search for the layer that contains the data.
-
setId
public void setId(java.lang.String ident)
Set the unique identifier.
-
setXArray
public void setXArray(double[] xloc)
Set the x coordinate grid centers
Property Change:dataModified.
-
setYArray
public void setYArray(double[] yloc)
Set the y coordinate grid centers
Property Change:dataModified.
-
setZArray
public void setZArray(double[] zloc)
Set the z coordinate grid centers
Property Change:dataModified.
-
setValArray
public void setValArray(double[] grid)
Set the z grid values.
Property Change:dataModified.
-
setTimeArray
public void setTimeArray(GeoDate[] tloc)
set the temporal grid centers
Property Change:dataModified.
-
getXRange
public SoTRange getXRange()
Description copied from interface:SGTDataReturns the range of the X coordinates. If all the data in the array is missing, this method will returnDouble.NaNas the start and end values for data of typedoubleand returnGeoDate(Long.MIN_VALUE)for data of typeGeoDate.- Specified by:
getXRangein interfaceSGTData- See Also:
GeoDate.isMissing()
-
getYRange
public SoTRange getYRange()
Description copied from interface:SGTDataReturns the range of the Y coordinates.- Specified by:
getYRangein interfaceSGTData- See Also:
SGTData.getXRange()
-
getZRange
public SoTRange getZRange()
-
getValRange
public Range2D getValRange()
Description copied from interface:SGT3DGridGet the range of measured values on this 3D grid.- Specified by:
getValRangein interfaceSGT3DGrid
-
getXEdgesRange
public SoTRange getXEdgesRange()
Return the range of the x edges- Since:
- 2.0
-
getYEdgesRange
public SoTRange getYEdgesRange()
Return the range of the y edges- Since:
- 2.0
-
getZEdgesRange
public SoTRange getZEdgesRange()
Description copied from interface:SGT3DGridGet the range of Y coordinate edges.- Specified by:
getZEdgesRangein interfaceSGT3DGrid
-
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Description copied from interface:SGTDataAdd a PropertyChangeListener to the listener list.- Specified by:
addPropertyChangeListenerin interfaceSGTData
-
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Description copied from interface:SGTDataRemove a PropertyChangeListener from the listener list.- Specified by:
removePropertyChangeListenerin interfaceSGTData
-
-
DMelt 3.0 © DataMelt by jWork.ORG