autoplot / cdfj

Pure-Java code for reading NASA/GSFC CDF (Common Data Format) files
1 stars 2 forks source link

One table used for zvariables and rvariables, corrected in version within Autoplot but not here #14

Open jbfaden opened 3 years ago

jbfaden commented 3 years ago

The code getCDFVariable(String vtype, int number) uses a lookup table to find the Variable in O(1) time, but this was implemented with just one table for both Z and R variables. I had assumed a file was either all Z variables or all R variables, and this was an incorrect assumption. (R variables are the original CDF variable type and offer no benefit over the newer Z variable type.)

Autoplot contains a copy of this library within its bowels (CDFJavaDataSource), and this was quickly hacked to have two separate tables, one for Z variables and one for R variables, but this change was never migrated back into the library.

jbfaden commented 3 years ago

This is fixed on a branch.