public abstract class CFPointWriter
extends java.lang.Object
implements java.io.Closeable
Modifier and Type | Field and Description |
---|---|
protected java.lang.String |
altitudeCoordinateName |
static java.lang.String |
altName |
protected java.lang.String |
altUnits |
protected CFPointWriterConfig |
config |
protected java.util.Map<java.lang.String,Variable> |
dataMap |
protected java.util.List<VariableSimpleIF> |
dataVars |
static java.lang.String |
descName |
protected java.util.List<Variable> |
extra |
protected int |
id_strlen |
static int |
idMissingValue |
protected boolean |
isExtendedModel |
static java.lang.String |
latName |
protected LatLonRect |
llbb |
static java.lang.String |
lonName |
protected CalendarDate |
maxDate |
protected CalendarDate |
minDate |
protected int |
nfeatures |
protected boolean |
noTimeCoverage |
protected boolean |
noUnlimitedDimension |
static java.lang.String |
numberOfObsName |
static java.lang.String |
profileDimName |
static java.lang.String |
profileIdName |
static java.lang.String |
profileStructName |
static java.lang.String |
profileTimeName |
protected Structure |
record |
protected Dimension |
recordDim |
static java.lang.String |
recordDimName |
static java.lang.String |
recordName |
protected static java.util.List<java.lang.String> |
reservedGlobalAtts |
protected static java.util.List<java.lang.String> |
reservedVariableAtts |
static java.lang.String |
stationAltName |
static java.lang.String |
stationDimName |
static java.lang.String |
stationIdName |
static java.lang.String |
stationIndexName |
static java.lang.String |
stationStructName |
static java.lang.String |
timeName |
protected DateUnit |
timeUnit |
static java.lang.String |
trajDimName |
static java.lang.String |
trajIdName |
static java.lang.String |
trajStructName |
protected boolean |
useAlt |
static java.lang.String |
wmoName |
protected NetcdfFileWriter |
writer |
Modifier | Constructor and Description |
---|---|
protected |
CFPointWriter(java.lang.String fileOut,
java.util.List<Attribute> atts,
java.util.List<VariableSimpleIF> dataVars,
java.util.List<Variable> extra,
DateUnit timeUnit,
java.lang.String altUnits,
CFPointWriterConfig config)
Ctor
|
protected |
CFPointWriter(java.lang.String fileOut,
java.util.List<Attribute> atts,
NetcdfFileWriter.Version version) |
Modifier and Type | Method and Description |
---|---|
protected void |
addCoordinatesClassic(Dimension recordDim,
java.util.List<VariableSimpleIF> coords,
java.util.Map<java.lang.String,Variable> varMap) |
protected void |
addCoordinatesExtended(Structure parent,
java.util.List<VariableSimpleIF> coords) |
protected void |
addDataVariablesClassic(Dimension recordDim,
StructureData stnData,
java.util.Map<java.lang.String,Variable> varMap,
java.lang.String coordVars) |
protected void |
addDataVariablesExtended(StructureData obsData,
java.lang.String coordVars) |
protected void |
addDimensionsClassic(java.util.List<? extends VariableSimpleIF> vars,
java.util.Map<java.lang.String,Dimension> dimMap) |
protected void |
addExtraVariables() |
void |
close() |
void |
finish() |
protected VariableSimpleIF |
getDataVar(java.lang.String name) |
static java.lang.String |
getSharedDimName(Dimension dim)
Returns a name for
dim that is suitable for a shared dimension. |
static void |
main(java.lang.String[] args) |
protected java.util.List<Dimension> |
makeDimensionList(java.util.Map<java.lang.String,Dimension> dimMap,
java.util.List<Dimension> oldDims) |
protected abstract void |
makeFeatureVariables(StructureData featureData,
boolean isExtended) |
protected void |
makeMiddleVariables(StructureData middleData,
boolean isExtended) |
void |
setFeatureAuxInfo(int nfeatures,
int id_strlen) |
protected void |
trackBB(LatLonPoint loc,
CalendarDate obsDate) |
protected void |
writeExtraVariables() |
static int |
writeFeatureCollection(FeatureDatasetPoint fdpoint,
java.lang.String fileOut,
CFPointWriterConfig config)
Write a FeatureDatasetPoint to a netcd3/4 file.
|
static int |
writeFeatureCollection(FeatureDatasetPoint fdpoint,
java.lang.String fileOut,
NetcdfFileWriter.Version version) |
protected void |
writeHeader(java.util.List<VariableSimpleIF> obsCoords,
StructureData featureData,
StructureData obsData,
java.lang.String coordNames) |
protected void |
writeHeader2(java.util.List<VariableSimpleIF> obsCoords,
StructureData featureData,
StructureData middleData,
StructureData obsData,
java.lang.String coordNames) |
protected int |
writeStructureData(int recno,
Structure s,
StructureData sdata,
java.util.Map<java.lang.String,Variable> varMap) |
protected int |
writeStructureDataClassic(java.util.Map<java.lang.String,Variable> varMap,
int[] origin,
StructureData sdata) |
public static final java.lang.String recordName
public static final java.lang.String recordDimName
public static final java.lang.String latName
public static final java.lang.String lonName
public static final java.lang.String altName
public static final java.lang.String timeName
public static final java.lang.String stationStructName
public static final java.lang.String stationDimName
public static final java.lang.String stationIdName
public static final java.lang.String stationAltName
public static final java.lang.String descName
public static final java.lang.String wmoName
public static final java.lang.String stationIndexName
public static final java.lang.String profileStructName
public static final java.lang.String profileDimName
public static final java.lang.String profileIdName
public static final java.lang.String numberOfObsName
public static final java.lang.String profileTimeName
public static final java.lang.String trajStructName
public static final java.lang.String trajDimName
public static final java.lang.String trajIdName
public static final int idMissingValue
protected static final java.util.List<java.lang.String> reservedGlobalAtts
protected static final java.util.List<java.lang.String> reservedVariableAtts
protected final CFPointWriterConfig config
protected NetcdfFileWriter writer
protected DateUnit timeUnit
protected java.lang.String altUnits
protected java.lang.String altitudeCoordinateName
protected final boolean noTimeCoverage
protected final boolean noUnlimitedDimension
protected final boolean isExtendedModel
protected boolean useAlt
protected int nfeatures
protected int id_strlen
protected Structure record
protected Dimension recordDim
protected java.util.Map<java.lang.String,Variable> dataMap
protected java.util.List<VariableSimpleIF> dataVars
protected java.util.List<Variable> extra
protected LatLonRect llbb
protected CalendarDate minDate
protected CalendarDate maxDate
protected CFPointWriter(java.lang.String fileOut, java.util.List<Attribute> atts, NetcdfFileWriter.Version version) throws java.io.IOException
java.io.IOException
protected CFPointWriter(java.lang.String fileOut, java.util.List<Attribute> atts, java.util.List<VariableSimpleIF> dataVars, java.util.List<Variable> extra, DateUnit timeUnit, java.lang.String altUnits, CFPointWriterConfig config) throws java.io.IOException
fileOut
- name of the output fileatts
- global attributes to be addedconfig
- configurejava.io.IOException
public static int writeFeatureCollection(FeatureDatasetPoint fdpoint, java.lang.String fileOut, NetcdfFileWriter.Version version) throws java.io.IOException
java.io.IOException
public static int writeFeatureCollection(FeatureDatasetPoint fdpoint, java.lang.String fileOut, CFPointWriterConfig config) throws java.io.IOException
fdpoint
- the FeatureDatasetPoint; do first FeatureCollection contained within.fileOut
- write to the is fileconfig
- configurationjava.io.IOException
public void setFeatureAuxInfo(int nfeatures, int id_strlen)
protected VariableSimpleIF getDataVar(java.lang.String name)
protected abstract void makeFeatureVariables(StructureData featureData, boolean isExtended) throws java.io.IOException
java.io.IOException
protected void makeMiddleVariables(StructureData middleData, boolean isExtended) throws java.io.IOException
java.io.IOException
protected void writeHeader(java.util.List<VariableSimpleIF> obsCoords, StructureData featureData, StructureData obsData, java.lang.String coordNames) throws java.io.IOException
java.io.IOException
protected void writeHeader2(java.util.List<VariableSimpleIF> obsCoords, StructureData featureData, StructureData middleData, StructureData obsData, java.lang.String coordNames) throws java.io.IOException
java.io.IOException
protected void addExtraVariables() throws java.io.IOException
java.io.IOException
protected void writeExtraVariables() throws java.io.IOException
java.io.IOException
protected void addCoordinatesClassic(Dimension recordDim, java.util.List<VariableSimpleIF> coords, java.util.Map<java.lang.String,Variable> varMap) throws java.io.IOException
java.io.IOException
protected void addCoordinatesExtended(Structure parent, java.util.List<VariableSimpleIF> coords) throws java.io.IOException
java.io.IOException
protected void addDataVariablesClassic(Dimension recordDim, StructureData stnData, java.util.Map<java.lang.String,Variable> varMap, java.lang.String coordVars) throws java.io.IOException
java.io.IOException
protected void addDataVariablesExtended(StructureData obsData, java.lang.String coordVars) throws java.io.IOException
java.io.IOException
protected void addDimensionsClassic(java.util.List<? extends VariableSimpleIF> vars, java.util.Map<java.lang.String,Dimension> dimMap) throws java.io.IOException
java.io.IOException
protected java.util.List<Dimension> makeDimensionList(java.util.Map<java.lang.String,Dimension> dimMap, java.util.List<Dimension> oldDims) throws java.io.IOException
java.io.IOException
public static java.lang.String getSharedDimName(Dimension dim)
dim
that is suitable for a shared dimension. If the dimension is anonymous, meaning
that its name is null
, we return a default name: "len" + dim.getLength()
. Otherwise, we return the
dimension's existing name.dim
- a dimension.null
.protected int writeStructureData(int recno, Structure s, StructureData sdata, java.util.Map<java.lang.String,Variable> varMap) throws java.io.IOException
java.io.IOException
protected int writeStructureDataClassic(java.util.Map<java.lang.String,Variable> varMap, int[] origin, StructureData sdata) throws java.io.IOException, InvalidRangeException
java.io.IOException
InvalidRangeException
protected void trackBB(LatLonPoint loc, CalendarDate obsDate)
public void finish() throws java.io.IOException
java.io.IOException
public void close() throws java.io.IOException
close
in interface java.io.Closeable
close
in interface java.lang.AutoCloseable
java.io.IOException
public static void main(java.lang.String[] args) throws java.lang.Exception
java.lang.Exception