Package ucar.nc2.dataset
Class CoordSysBuilder
java.lang.Object
ucar.nc2.dataset.CoordSysBuilder
- All Implemented Interfaces:
CoordSysBuilderIF
Deprecated.
do not use
Abstract class for implementing Convention-specific parsing of netCDF files.
You can use an NcML file alone (use registerNcML()) if file uses a convention attribute. If not, you must implement a class that implements isMine() to identify your files, and call wrapNcML in the augmentDataset method (see eg ATDRadarConvention class).
Subclasses Info:
// identify which variables are coordinate axes // default: 1) coordinate variables 2) variables with _coordinateAxisType attribute 3) variables listed // in a coordinates attribute on another variable. findCoordinateAxes(ncDataset); // identify which variables are used to describe coordinate system findCoordinateSystems(ncDataset); // identify which variables are used to describe coordinate transforms findCoordinateTransforms(ncDataset); // turn Variables into CoordinateAxis objects makeCoordinateAxes(ncDataset); // make Coordinate Systems for all Coordinate Systems Variables makeCoordinateSystems(ncDataset); // Assign explicit CoordinateSystem objects to variables assignExplicitCoordinateSystems(ncDataset); makeCoordinateSystemsImplicit(ncDataset); if (useMaximalCoordSys) makeCoordinateSystemsMaximal(ncDataset); makeCoordinateTransforms(ncDataset); assignCoordinateTransforms(ncDataset);
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic interfaceDeprecated.do not useclassDeprecated.Wrap each variable in the dataset with a VarProcess object. -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddUserAdvice(String advice) Deprecated.Give advice for a user trying to figure out why things arent workingvoidaugmentDataset(NetcdfDataset ncDataset, CancelTask cancelTask) Deprecated.Make changes to the dataset that are needed before processing scale/offset in NetcdfDataset.breakupConventionNames(String convAttValue) Deprecated.Breakup list of Convention names in the Convention attribute in CF compliant way.static StringbuildConventionAttribute(String mainConv, String... convAtts) Deprecated.Build a list of ConventionsvoidbuildCoordinateSystems(NetcdfDataset ncDataset) Deprecated.Heres where the work is to identify coordinate axes and coordinate systems.static CoordSysBuilderIFfactory(NetcdfDataset ds, CancelTask cancelTask) Deprecated.Get a CoordSysBuilder whose job it is to add Coordinate information to a NetcdfDataset.Deprecated.Get the name of the Convention.Deprecated.Detailed information when the coordinate systems were parsedstatic booleanDeprecated.Get whether to make records into Structures.Deprecated.Specific advice to a user about problems with the coordinate information in the file.static voidregisterConvention(String conventionName, Class c) Deprecated.Register a class that implements a Convention.static voidregisterConvention(String conventionName, Class c, CoordSysBuilder.ConventionNameOk match) Deprecated.Register a class that implements a Convention.static voidregisterConvention(String conventionName, String className) Deprecated.Register a class that implements a Convention.static voidregisterNcML(String conventionName, String ncmlLocation) Deprecated.Register an NcML file that implements a Convention by wrappping the dataset in the NcML.voidsetConventionUsed(String convName) Deprecated.Pass in the name of the Convention used to locate this CoordSysBuilderIF.static voidsetUseMaximalCoordSys(boolean b) Deprecated.If true, assign implicit CoordinateSystem objects to variables that dont have one yet.
-
Field Details
-
resourcesDir
Deprecated.- See Also:
-
-
Constructor Details
-
CoordSysBuilder
public CoordSysBuilder()Deprecated.
-
-
Method Details
-
registerNcML
Deprecated.Register an NcML file that implements a Convention by wrappping the dataset in the NcML. It is then processed by CoordSysBuilder, using the _Coordinate attributes.- Parameters:
conventionName- name of Convention, must be in the "Conventions" global attribute.ncmlLocation- location of NcML file, may be local file or URL.- See Also:
-
NcMLReader.wrapNcML(ucar.nc2.dataset.NetcdfDataset, java.lang.String, ucar.nc2.util.CancelTask)
-
registerConvention
Deprecated.Register a class that implements a Convention. Will match (ignoring case) the COnvention name.- Parameters:
conventionName- name of Convention. This name will be used to look in the "Conventions" global attribute. Otherwise, you must implement the isMine() static method.c- implementation of CoordSysBuilderIF that parses those kinds of netcdf files.
-
registerConvention
public static void registerConvention(String conventionName, Class c, CoordSysBuilder.ConventionNameOk match) Deprecated.Register a class that implements a Convention.- Parameters:
conventionName- name of Convention. This name will be used to look in the "Conventions" global attribute. Otherwise, you must implement the isMine() static method.match- pass in your own matcher. if null, equalsIgnoreCase() will be used.c- implementation of CoordSysBuilderIF that parses those kinds of netcdf files.
-
registerConvention
public static void registerConvention(String conventionName, String className) throws ClassNotFoundException Deprecated.Register a class that implements a Convention.- Parameters:
conventionName- name of Convention. This name will be used to look in the "Conventions" global attribute. Otherwise, you must implement the isMine() static method.className- name of class that implements CoordSysBuilderIF.- Throws:
ClassNotFoundException- if class could not be loaded
-
setUseMaximalCoordSys
public static void setUseMaximalCoordSys(boolean b) Deprecated.If true, assign implicit CoordinateSystem objects to variables that dont have one yet. Default value is false.- Parameters:
b- true if if you want to guess at Coordinate Systems- See Also:
-
makeCoordinateSystemsMaximal(ucar.nc2.dataset.NetcdfDataset)
-
getUseMaximalCoordSys
public static boolean getUseMaximalCoordSys()Deprecated.Get whether to make records into Structures.- Returns:
- whether to make records into Structures.
-
breakupConventionNames
Deprecated.Breakup list of Convention names in the Convention attribute in CF compliant way.- Parameters:
convAttValue- original value of Convention attribute- Returns:
- list of Convention names
-
buildConventionAttribute
Deprecated.Build a list of Conventions- Parameters:
mainConv- this is the main conventionconvAtts- list of others, onbly use "extra" Conventions- Returns:
- comma separated list of Conventions
-
factory
@Nonnull public static CoordSysBuilderIF factory(NetcdfDataset ds, CancelTask cancelTask) throws IOException Deprecated.Get a CoordSysBuilder whose job it is to add Coordinate information to a NetcdfDataset.- Parameters:
ds- the NetcdfDataset to modifycancelTask- allow user to bail out.- Returns:
- the builder used
- Throws:
IOException- on io error
-
setConventionUsed
Deprecated.Description copied from interface:CoordSysBuilderIFPass in the name of the Convention used to locate this CoordSysBuilderIF.- Specified by:
setConventionUsedin interfaceCoordSysBuilderIF- Parameters:
convName- the name of the Convention
-
getConventionUsed
Deprecated.Description copied from interface:CoordSysBuilderIFGet the name of the Convention. In the case where the Convention attribute is not set in the file, this name cannot be used to identify the Convention. The isMine() method is called instead.- Specified by:
getConventionUsedin interfaceCoordSysBuilderIF- Returns:
- Convention name
-
addUserAdvice
Deprecated.Description copied from interface:CoordSysBuilderIFGive advice for a user trying to figure out why things arent working- Specified by:
addUserAdvicein interfaceCoordSysBuilderIF- Parameters:
advice- add this advice to the User Advice String
-
getParseInfo
Deprecated.Description copied from interface:CoordSysBuilderIFDetailed information when the coordinate systems were parsed- Specified by:
getParseInfoin interfaceCoordSysBuilderIF- Returns:
- String containing parsing info
-
getUserAdvice
Deprecated.Description copied from interface:CoordSysBuilderIFSpecific advice to a user about problems with the coordinate information in the file.- Specified by:
getUserAdvicein interfaceCoordSysBuilderIF- Returns:
- String containing advice to a user about problems with the coordinate information in the file.
-
augmentDataset
Deprecated.Description copied from interface:CoordSysBuilderIFMake changes to the dataset that are needed before processing scale/offset in NetcdfDataset.- Specified by:
augmentDatasetin interfaceCoordSysBuilderIF- Parameters:
ncDataset- modify this datasetcancelTask- give user a chance to bail out- Throws:
IOException- on error
-
buildCoordinateSystems
Deprecated.Heres where the work is to identify coordinate axes and coordinate systems.- Specified by:
buildCoordinateSystemsin interfaceCoordSysBuilderIF- Parameters:
ncDataset- modify this dataset
-