Large 32-bit integer data values in BILformat
Qiao
Global Mapper UserTrusted User
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
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
-
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 -
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 -
Hi Mike,
Just wondering whether you have had chance to have a look at the problem. Any suggestion is welcome.
Qiao -
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 -
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 -
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 -
Yes, that did do the trick. Thanks Mike!
-
Thanks for sharing useful information.
Categories
- 12.7K All Categories
- 5.6K Features Discussion
- 342 Downloading Imagery
- 1.3K Elevation Data
- 380 Georeferencing Imagery Discussion
- 628 GM Script Language
- 53 User Scripts
- 113 GPS Features
- 414 Projection Questions
- 819 Raster Data
- 1.3K Vector Data
- 6.6K Support
- 177 Announcement and News
- 908 Bug Report
- 558 SDK
- 1.2K Suggestion Box
- 3.7K Technical Support
- 562 Other Discussion
- 129 GIS Data Sources
- 27 Global Mapper Showcase
- 233 How I use Global Mapper
- 107 Global Mapper Forum Website