Large 32-bit integer data values in BILformat

QiaoQiao Global Mapper UserPosts: 74Trusted User
edited November 2013 in Elevation Data
Hi Mike,

I have created a BIL(/HDR) file with C++. The data format used was "long", which should be the same as signed 32-bit integer. The data value ranges from 1125 to something 9005276. However, when loaded in GlobalMapper, it shows all zeros. I have another file created similarly with smaller values (10936~17975). It loaded ok. Do you have any insights?

Thanks,

Qiao

Comments

  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited October 2013
    Qiao,

    Which version of Global Mapper are you using and can you provide a sample? I'm guessing that perhaps the values are being interpreted as 32-bit floating point and not 32-bit signed integer and the values don't look like realistic numbers so they are coming in invalid. If there is some question as to whether values are float or integer (i.e. the header doesn't say one way or the other) Global Mapper tries to guess from the values, but in some cases that guess could be wrong, although I haven't really seen data this is the case for.

    Thanks,

    Mike
    Global Mapper Guru
    geohelp@bluemarblegeo.com
    Global Mapper
  • QiaoQiao Global Mapper User Posts: 74Trusted User
    edited October 2013
    Hi Mike,

    I am currently using Global Mapper V14.2. You guess might be right. I could not find a way to say the BIL file is with "long" data in the HDR file. Do you think there is anything we can add in the HDR file to let Global Mapper know it is not "floating"? The data values are not usual elevations. They are 1D indexes of a matrix that is why I need to use "long" not "floating". If you have an FTP site I can upload my file for you to check.

    Regards,

    Qiao
  • QiaoQiao Global Mapper User Posts: 74Trusted User
    edited November 2013
    Hi Mike,

    Just wondering whether you have had chance to have a look at the problem. Any suggestion is welcome.

    Qiao
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited November 2013
    Qiao,

    Sorry I don't know why I didn't see your original reply, seems there was a few days when a lot of posts were deleted before I could see them. Can you just post the contents of one of your .hdr files here? There is a way to specify the type of the samples but it differs for each header format. Once I see the header format then I can tell you how to specify it is a 32-bit integer vs. 32-bit float.

    Thanks,

    Mike
    Global Mapper Guru
    geohelp@bluemarblegeo.com
    Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
  • QiaoQiao Global Mapper User Posts: 74Trusted User
    edited November 2013
    Thanks Mike. Here are the contents of my HDR file:

    NCOLS 3001
    NROWS 3001
    XLLCENTER -76.875
    YLLCENTER 38.125
    CELLSIZE 4.166666666667e-5
    NODATA_VALUE -10000
    BYTEORDER LSBFIRST
  • global_mapperglobal_mapper Administrator Posts: 17,238
    edited November 2013
    Try adding the following line at the end and see if that does the trick:

    DATATYPE INTEGER

    Thanks,

    Mike
    Global Mapper Guru
    geohelp@bluemarblegeo.com
    Blue Marble Geographics for Coordinate Conversion, Image Reprojection and Vector Translation
  • QiaoQiao Global Mapper User Posts: 74Trusted User
    edited November 2013
    Yes, that did do the trick. Thanks Mike!
  • aaronbarrettaaronbarrett Global Mapper User Posts: 1
    edited November 2013
    Thanks for sharing useful information.
Sign In or Register to comment.