Reading-eScience-Centre / pycovjson

Create CovJSON files from common scientific data formats
BSD 3-Clause "New" or "Revised" License
11 stars 7 forks source link

Weird error message about missing axis attribute #26

Closed letmaik closed 7 years ago

letmaik commented 7 years ago

When I use -v land_cover in pycovjson-convert, then I get the following output:

Error occured: Variable "land_cover" has no axis attribute
Error occured: Variable "land_cover" has no axis attribute
Converting....

The first two lines are confusing, as there is no reason why a data variable should have an axis attribute. But even for coordinate variables, an axis attribute is not required. So I don't really understand why this is displayed as an error, considering that the conversion runs through.

jelpatte commented 7 years ago

I also received this error while testing converting a netcdf grid file via CLI. A coverage.json file was created (so I agree weird error) and the generated coverage.json file loads and views perfectly in leaflet.
I am now trying to load that coverage.json file into the webworldwind and am getting an error. I need to do more testing. I did notice that my coveragejson file seems to be a little different than the example, using the term 'coordinates' in the referencing section where the example uses the term 'components'. I'll post a separate issue on that if it turns out to be related. It's also my first time using webworldwind so may be a newbie error on my part.

letmaik commented 7 years ago

@jelpatte Please post any issues related to the webworldwind app in the relevant repository. But note that the webworldwind demo is in a very early phase and likely not usable yet.

RileyWilliams commented 7 years ago

@letmaik some NetCDF files have data values with an 'axis' attribute. This simplifies the process of setting the 'shape' property in the covsjon file.

You are right though it should not really be an error, rather a warning that indicates pycovjson has fallen back to detecting the axis values itself. I will push a fix.

jelpatte commented 7 years ago

Thanks @letmaik , I have gone ahead and posted an issue in the webworldwind repo with the understanding that this capability is still in dev mode and will refocus on the leaflet plugin.

lewismc commented 7 years ago

This can be closed @RileyWilliams