Tom Kunicki wrote:
Hi John,
Yes we are working with Rich Signell.
For this project we will be working against a large number of ThreDDS based
NetCDF sources. For this particular case we were hoping to implement a
generalized solution to provide a user with a drop down list of range variables
for a given FeatureDatasource (currently of FeatureType.GRID or
FeatureType.STATION). This list would have all the domain variables removed.
With the source at
http://motherlode.ucar.edu:8080/thredds/dodsC/station/metar/Surface_METAR_20100114_0000.nc
the domain variables are prefixed with 'station.' while the range variables
are prefixed with 'record.'. Is this a convention that we could use to strip
out domain variables?
the most general thing is to look for the "_CoordinateAxisType" on each
VariableIF, if present its a "domain variable". eg:
for (VariableSimpleIF v : dataset.getDataVariables()) {
if (v.findAttributeIgnoreCase("_CoordinateAxisType") != null) {
// its a domain variable
}
}
Im not sure this is exactly what you want, but I think its a good
approximation. Th distinction of domain and range variables is not
always clear.