Take the 2-minute tour ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Is there any way to determine what the nodata value should be, in a set of geotiff images that do not have the 42113 tiff tag ?
I am trying to get elevation information, programatically in c++, and I have encountered areas that return a value of -1 (when I skim over the longitude/latitude points in Global Mapper, and I get to certain points the cursor seems to just skip over them and the elevation shows -1, jumping from something like 200 so I know the info is missing on that exact point).
I would like to have some way of determining an invalid value for the elevation/ nodata, but I haven't found anything in my searches. And I don't trust my assumption of -1 being bad data, since it can be a very reasonable elevation.
Thank you.

share|improve this question
    
It's likely (although this is purely a guess) that the minimum value found in any file would represent NoData. You could also check for high outliers, in case values like 10^38 or 2^15-1 are used for NoData codes. –  whuber Jun 1 '12 at 15:02
    
That is true for one dataset that has a nodata field of -32767. This one has invalid data that returns -1 - which is unlikely to be the minimum. I don't want to change the content of the tiff images - I would like to write a nodata tag, but I can't be sure that -1 is really an invalid value unless I can find some other way (other than a tag, which is missing) to give me information about invalid values. I have searched the web - and all I found is that for that type of DEMs there seems to be a -1 offset... Not sure if this info helps me though. –  Mihaela Jun 2 '12 at 2:34
add comment

1 Answer

up vote 1 down vote accepted

I believe you have to look for the source of data. Different software use different nodata values. Once you know that, you can QGIS--> raster calculator to set that nodata value to your desirable nodata value.

If you don't have that information, you can look for outliers in a 3x3 or 5x5 window. But if you are working on built environment or values are close to -1 (say ranging from -5 to 50), then I think its not possible to look for nodata values.

Global mapper sets -32767 to nodata values. You can export your tiff as 32 bit floating point elevation values and look for -32767 also.

Best way is to check what nodata value is set by source.

Cheers N

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.