1

I am trying to convert a .bin file of sea ice concentration to a GeoTIFF by following these directions from NSIDC: https://nsidc.org/support/how/how-do-i-convert-nsidc-0051-sea-ice-concentration-data-binary-geotiff

What I am running in terminal looks like this:

MacBook-Air-2:converting rbex$ gdal_translate -of GTiff -a_srs '+proj=stere +lat_0=90 +lat_ts=70 +lon_0=-45 +k=1 +x_0=0+y_0=0 +a=6378273 +b=6356889.449 +units=m +no_defs' -a_nodata 255 -A_ullr -3850000.0 5850000.0 3750000.0 -5350000.0 nt_20160101_f17_v1.1_n.bin nt_20160101_f17_v1.1_n.tif

However, when I run the provided code, it returns:

ERROR 4: `nt_20160101_f17_v1.1_n.bin' not recognized as a supported file format.

I suspect this is because the binary file, nt_20160101_f17_v1.1_n.bin, has a zipper icon on it and so is a zipped file of some sort? I can not find any documentation anywhere on how to unzip the .bin file, or any other kind of trouble shooting to do.

Update:

I did write a header, formatted like this:

ENVI
description = {nt_20160101_f17_v1.1_n.bin}
samples = 304
lines   = 448
bands   = 1
header offset = 300
file type = ENVI Standard
data type = 1
interleave = bsq
byte order = 0
map info = {Polar Stereographic, 1, 1, -3850000, 5850000, 25000, 25000} projection info = {31, 6378273, 6356889.449, 70, -45, 0, 0, Polar Stereographic} coordinate system string = {PROJCS["Stereographic_North_Pole",GEOGCS["GCS_unnamed ellipse",DATUM["D_unknown",SPHEROID["Unknown",6378273,298.279411123064]],PRIMEM["Greenwich",0],UNIT["Degree",0.017453292519943295]],PROJECTION["Stereographic_North_Pole"],PARAMETER["standard_parallel_1",70],PARAMETER["central_meridian",-45],PARAMETER["false_easting",0],PARAMETER["false_northing",0],UNIT["Meter",1]]}
​band names = {Band 1}

The naming for the header is nt_20160101_f17_v1.1_n.bin.hdr , it is saved in the same folder as the .bin file, and that file is the directory in my terminal.

I tried using Stuffit Expander on nt_20160101_f17_v1.1_n.bin, but the expander says "unable to determine the file type." When I try unpacking using my mac, it creates a file that ends in .bin.cpgz

My data is coming from: https://daacdata.apps.nsidc.org/pub/DATASETS/nsidc0051_gsfc_nasateam_seaice/final-gsfc/north/daily/2015/ (this requires an earth data account to access)

4
  • There should be a .hdr with a .bin gdal.org/frmt_various.html#GenBin. So is the file a .bin that your OS thinks is a Zip or is it a Zip that contains a .bin + .hdr (+ possibly .prj, .xml, .rrd, .ovr etc.)? What does Mac use to unzip files? It could be a zip file as binary format isn't compressed already so the advantage is to zip when sending/downloading over the internet, also that would keep the files together.. however, you'd get the same error message if you downloaded just the bin file and not the required header. Commented Dec 4, 2017 at 1:18
  • @MichaelStimson, there is no header, the directions tell the user how to create one.
    – user2856
    Commented Dec 4, 2017 at 1:22
  • Ah @Luke, that could be the problem! If the instructions were not fully understood there would be no header therefore an unrecognized image format. Commented Dec 4, 2017 at 1:30
  • I've got VRT examples here for this format: github.com/mdsumner/NSIDC-seaice
    – mdsumner
    Commented Dec 4, 2017 at 2:10

1 Answer 1

1

You have a non-printing non-ascii character at the beginning of the last line before band names = {Band 1}. If you paste it into an ascii only text editor you'd see something like:

?band names = {Band 1}

The character is ​ (zero width space) and it's present in the directions web page.

enter image description here

Delete that and your .hdr file will work and your .bin will be recognized by GDAL.

Even better, use the VRT's suggested by @mdsumner.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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