NASA-DEVELOP / dnppy

DEVELOP National Program Python package for use with NASA data and GIS!
https://nasa-develop.github.io/dnppy/
Other
81 stars 40 forks source link

null_define does not remove desired value #79

Open RyanMurphyRI opened 8 years ago

RyanMurphyRI commented 8 years ago

Hello, I am using null_define to remove an erroneous value in a MODIS MYD11A1 raster time series. The tool runs successfully, but the value (-32768) remains. Any ideas as to what may be going wrong?

Jwely commented 8 years ago

Please paste in the syntax you're using when you invoke null_define. Also, look at the datatype for your input image, and the datatype of the output image, and reply with that information.

First two likely guesses are:

possibility 1 If you are using Arcmap, and have opened the image you are attempting to set null values on before, Arcmap can sometimes save the color ramp information and statistics associated with an image and just keep reloading them. One thing you can try is to delete all the associated metadata files (like the .aux, .xml, .ovr etc, but NOT the ."tfw" if you have one) and rerun the null_define function.

possibility 2 That value (-32768) is the minimum possible value for a signed 16 bit integer datatype, if your output datatype is "float", the logical check may be failing because the number is represented as an approximate value that varies somewhere beyond the 6th decimal place and fails the equality check for setting null_data. This could be fixed by explicitly defining the output datatype as an 'int16'

RyanMurphyRI commented 8 years ago

Thank you @Jwely How and where would i need to define the datatype in the dnppy workflow?