-
Notifications
You must be signed in to change notification settings - Fork 34
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
standardise metadata as Metadata{X,Dict{String,Any}}
#304
Conversation
Checks to ensure that the metadata conforms to each particular standard would be nice to have, but I was wondering if they would be necessary . . .
So, most of such checks as you describe can wait, I would think. |
The reason they are necessary is we can already write a tiff to a netcdf file, and the reverse. Before we go writing arbitrary metadata between file types we should know the consequences of that. (One option is to write any metadata from |
I agree. But, I was concerned about your mention of CF convensions and units. Violations of these conventions wouldn't have "serious" consequences. You don't need to implement checks against these. That was my point. As to serious consequences for netCDF . . .
I can imagine that violation of these would cause serious problems. |
Regarding endianness: isn't that taken care of by the netcdf-library through which the reading-writing of the files goes? |
Yeah I doubt endianness will be an issue. Another thing not mentioned here is the fields that NCDatasets.jl writes itself and how it interprets having those fields manually set. That may cause some problems with the current |
407524b
to
b8440a8
Compare
Codecov Report
@@ Coverage Diff @@
## main #304 +/- ##
==========================================
+ Coverage 80.02% 80.08% +0.05%
==========================================
Files 38 38
Lines 2889 2897 +8
==========================================
+ Hits 2312 2320 +8
Misses 577 577
📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more |
@ryofurue what I meant by consequences was the ability to write e.g. a It is not clear which of those netcdf attribute fields will actually result in reading different data to what is written, or if that is possible with NCDatasets.jl. |
@ryofurue this PR standardise all RasterStack, Raster and LookupArray metadata to be
Metadata{SOURCE,Dict{String,Any}}
.The intention is to allow more strings keys that CF standards allow that are either awkward or impossible with
Symbol
keys. It's also a breaking change that will require a minor version bump. See also: rafaqz/DimensionalData.jl#406What is further needed is to define the lists of allowed keys for all metadata subtypes, and allow users to use a plain
Dict
to define keys, that we can check against allowed keys to warn on mistakes.@ryoforue if you have any time to collate these allowed key/value combinations from the CF standards, GDAL and Rs GRI/GRI files, or for even some of these types, we could get started on implementing proper metadata checking, conversion, and writing (as outlined in #3 the oldest open issue here!). Seems I haven't found time to do it in the last 3 years 😅