On 6/19/2012 3:19 PM, Don Murray wrote:
Hi-
I have a bunch of netCDF files and I want to quickly determine whether
they are grids, trajectories, or point features. For grids, I've been
using GridDataset gds = GridDataset.open(path) and catch the exception
if it's not a grid, but for a 3.3 GB file, that can take 2 minutes (or
longer) to open and create the dataset if it is a grid. I was
wondering if there's a quicker method of determining the feature type
of a netCDF file.
Thanks for your help.
Don
Hi Don:
The most convenient thing is to use ToolsUI / FeatureTypes /
FeatureScan, and give it a file or directory. It will try to figure out
the type and report on what it finds.
The code is in ucar.nc2.ft.scan.FeatureScan.java, you can copy the parts
you need.
Its an ongoing process, i think im not doing it as well as it can be
done. Send me reports on files it misidentifies.
John