Package ucar.nc2.ft2.simpgeometry
Class SimpleGeometryFeature
- java.lang.Object
-
- ucar.nc2.ft2.simpgeometry.SimpleGeometryFeature
-
- All Implemented Interfaces:
Comparable<VariableSimpleIF>,VariableSimpleIF
public class SimpleGeometryFeature extends Object implements VariableSimpleIF
SimpleGeometry - forked from Coverage.java Immutable after setCoordSys() is called.- Since:
- 8/13/2018
-
-
Constructor Summary
Constructors Constructor Description SimpleGeometryFeature(String name, DataType dataType, AttributeContainer atts, String coordSysName, String units, String description, Object user, GeometryType geometryType)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AttributeContainerattributes()Attributes for the variable.intcompareTo(VariableSimpleIF o)AttributefindAttributeIgnoreCase(String name)find the attribute for the variable with the given name, ignoring case.List<Attribute>getAttributes()Attributes for the variable.SimpleGeometryCSgetCoordSys()StringgetCoordSysName()DataTypegetDataType()Variable's data typeStringgetDescription()description of the VariableList<Dimension>getDimensions()Dimension List.StringgetFullName()full, backslash escaped name of the data VariableStringgetGeometryDescription()GeometryTypegetGeometryType()CoordinateAxisgetIDAxis()Retrieves the ID Axis that corresponds to this geometry.StringgetName()Name of the data Variable.intgetRank()Variable rankint[]getShape()Variable shapeStringgetShortName()short name of the data VariableStringgetUnitsString()Units of the Variable.ObjectgetUserObject()CoordinateAxisgetXAxis()Retrieves the x Axis that corresponds to this geometry.CoordinateAxisgetYAxis()Retrieves the y Axis that corresponds to this geometry.CoordinateAxisgetZAxis()Retrieves the z Axis that corresponds to this geometry.SimpleGeometryreadGeometry(int index)Get the data associated with the indexvoidsetCoordSys(SimpleGeometryCS coordSys)StringtoString()voidtoString(Formatter f, Indent indent)
-
-
-
Field Detail
-
user
protected final Object user
-
-
Constructor Detail
-
SimpleGeometryFeature
public SimpleGeometryFeature(String name, DataType dataType, AttributeContainer atts, String coordSysName, String units, String description, Object user, GeometryType geometryType)
- Parameters:
name- name of the featuredataType- data typeatts- list of attriburtescoordSysName- name of the coordinate systemunits- units to be useddescription- description of the featureuser- user responsible for featuregeometryType- type of geometry
-
-
Method Detail
-
setCoordSys
public void setCoordSys(SimpleGeometryCS coordSys)
-
getName
public String getName()
Description copied from interface:VariableSimpleIFName of the data Variable. Not that this is technically ambiguous v-a-v short or full name; however, since this is a Variable interface, one must assume that it is intended to be getFullName().- Specified by:
getNamein interfaceVariableSimpleIF- Returns:
- name of the data Variable
-
getDataType
public DataType getDataType()
Description copied from interface:VariableSimpleIFVariable's data type- Specified by:
getDataTypein interfaceVariableSimpleIF- Returns:
- Variable's data type
-
attributes
public AttributeContainer attributes()
Description copied from interface:VariableSimpleIFAttributes for the variable.- Specified by:
attributesin interfaceVariableSimpleIF
-
getAttributes
public List<Attribute> getAttributes()
Description copied from interface:VariableSimpleIFAttributes for the variable.- Specified by:
getAttributesin interfaceVariableSimpleIF- Returns:
- List of type ucar.nc2.Attribute
-
findAttributeIgnoreCase
public Attribute findAttributeIgnoreCase(String name)
Description copied from interface:VariableSimpleIFfind the attribute for the variable with the given name, ignoring case.- Specified by:
findAttributeIgnoreCasein interfaceVariableSimpleIF- Parameters:
name- attribute name- Returns:
- the attribute for the variable with the given name, or null if not found.
-
getUnitsString
public String getUnitsString()
Description copied from interface:VariableSimpleIFUnits of the Variable. These should be udunits compatible if possible- Specified by:
getUnitsStringin interfaceVariableSimpleIF- Returns:
- Units of the Variable, or null if none.
-
getDescription
public String getDescription()
Description copied from interface:VariableSimpleIFdescription of the Variable- Specified by:
getDescriptionin interfaceVariableSimpleIF- Returns:
- description of the Variable, or null if none.
-
getCoordSysName
public String getCoordSysName()
-
getUserObject
public Object getUserObject()
-
getGeometryType
public GeometryType getGeometryType()
-
getGeometryDescription
public String getGeometryDescription()
-
getCoordSys
@Nonnull public SimpleGeometryCS getCoordSys()
-
getXAxis
public CoordinateAxis getXAxis()
Retrieves the x Axis that corresponds to this geometry.- Returns:
- x axis
-
getYAxis
public CoordinateAxis getYAxis()
Retrieves the y Axis that corresponds to this geometry.- Returns:
- y axis
-
getZAxis
public CoordinateAxis getZAxis()
Retrieves the z Axis that corresponds to this geometry.- Returns:
- z axis
-
getIDAxis
public CoordinateAxis getIDAxis()
Retrieves the ID Axis that corresponds to this geometry.- Returns:
- id axis
-
readGeometry
public SimpleGeometry readGeometry(int index)
Get the data associated with the index- Parameters:
index- number associated with the geometry
-
getFullName
public String getFullName()
Description copied from interface:VariableSimpleIFfull, backslash escaped name of the data Variable- Specified by:
getFullNamein interfaceVariableSimpleIF- Returns:
- full, backslash escaped name of the data Variable
-
getShortName
public String getShortName()
Description copied from interface:VariableSimpleIFshort name of the data Variable- Specified by:
getShortNamein interfaceVariableSimpleIF- Returns:
- short name of the data Variable
-
getRank
public int getRank()
Description copied from interface:VariableSimpleIFVariable rank- Specified by:
getRankin interfaceVariableSimpleIF- Returns:
- Variable rank
-
getShape
public int[] getShape()
Description copied from interface:VariableSimpleIFVariable shape- Specified by:
getShapein interfaceVariableSimpleIF- Returns:
- Variable shape
-
getDimensions
public List<Dimension> getDimensions()
Description copied from interface:VariableSimpleIFDimension List. empty for a scalar variable.- Specified by:
getDimensionsin interfaceVariableSimpleIF- Returns:
- List of ucar.nc2.Dimension, ImmutableList in ver6
-
compareTo
public int compareTo(@Nonnull VariableSimpleIF o)- Specified by:
compareToin interfaceComparable<VariableSimpleIF>
-
-