-
Notifications
You must be signed in to change notification settings - Fork 66
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
Wrong _FillValue in exported netcdf #123
Comments
Btw - I also removed the try-except lines in |
…th try-except which was hiding some actual problems - please don't use try-except like that, it is better to raise a specific error which can be handled in the calling code
orig.export2thredds(ncfile, bands = {'incidence_angle': {}}) in TestRadarsat.test_export2thredds() does not work because dataset with GCPs cannot export for Thredds. |
Don't worry about that now - we can reproject the image to make it work
|
It is related to issue42. |
Great - that will probably work and both issues should be solved :) perfect
|
When I export a Radarsat-2 image to netcdf, the
_FillValue
metadata item is set to9.96921e+36
whereas the actual invalid data points arefloat(-10000)
. This causes the__getitem__
function in Nansat to fail. I have created a quick hack to set all values equal tofloat(-10000)
in thenp.array
tonp.nan
when_FillValue
is9.96921e+36
but this should be corrected such that the_FillValue
provided in the metadata is the same as the actual invalid data. See b7fba1f.This problem seems to be solved in the export2thredds function, and probably the same fix should apply also in the export-function. If so, please make sure that code is not duplicated but that export and export2thredds use a common function.
I have created three tests for checking:
nansat.tests.test_export_netcdf
(in the develop branch) which tests test_file_gcps by setting some band values to nan, then exports to a netcdf. This seems to work.mapper_tests.test_mappers.TestRadarsat.test_export2thredds
(in the master branch) which does not yet work because I didn't add all the parameters (see the code)mapper_tests.test_mappers.TestRadarsat.test_export
(in the master branch) which tests export of a radarsat-2 fileSo, the tasks in this issue are to
_FillValue
item equals the actual values of invalid datanansat.Nansat.__getitem__
The text was updated successfully, but these errors were encountered: