[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Issue with point feature type



On 11/3/2010 2:11 PM, John Caron wrote: Hi Steve:

TypedDatasetFactory is deprecated, use  ucar.nc2.ft.FeatureDatasetFactoryManager instead.

also see

http://www.unidata.ucar.edu/software/netcdf-java/reference/FeatureDatasets/PointFeatures.html

John


On 11/3/2010 1:31 PM, Steve Ansari wrote: John,

We are working on developing an IOSP for the fairly complicated Integrated Surface Data (ISD) text format used extensively here at NCDC.  One of the first steps is writing a NetCDF3 file and reading it with ToolsUI and with the NCJ API.  I can see the file as a 'PointFeature' in ToolsUI, but I am unable to open the file as a 'StationObsDataset' via the API.  This seems like the easiest first step for testing, but I can't figure out why ToolsUI can read the file at the CDM level, while the API cannot.  Any suggestions would be great!  I've attached a sample file with sample code and screenshot below.

Thanks,
Steve

       
        String infile = "E:\\work\\station-data\\911650-22536-2001.nc";

        StringBuilder sb = new StringBuilder();
        StationObsDataset sod = (StationObsDataset) TypedDatasetFactory.open(FeatureType.STATION, infile, WCTUtils.getEmptyCancelTask(), sb);
        if (sod == null) {
            System.out.println(sb.toString());
            throw new IOException("Data does not appear to be of CDM type 'StationObsDataset' - "+sb.toString());
        }





JPEG image