Bug in GSHHS Data Files? [message #64451] |
Wed, 24 December 2008 18:17 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Folks,
I am a big fan of the GSHHS Coastline data set for drawing
coastlines on map projections in IDL:
http://www.dfanning.com/map_tips/gshhs.html
But the other day I downloaded the latest version of the
software (gshhs_1.10.zip) from this page:
ftp://ftp.soest.hawaii.edu/pwessel/gshhs/
When I used the intermediate resolution data file (gshhs_I.b), as
I did in the article above, my mapping program failed.
You can find the mapping program here:
http://www.dfanning.com/programs/map_gshhs_shoreline.pro
As it happens, the header structure has changed for newer
versions of the GSHHS data. The old header was 40 bytes
in size; the new header is 32 bytes in size, with some of
the previous information packed into a single long integer.
So, I modified the header structure definition in my code to
conform to the new 32 byte header. But, unfortunately, not all
of my problems went away. :-(
I eventually discovered, after a GREAT deal of effort, that
while all the various resolutions of data in the zip file all
appear to use the new structure, the structure is still packed
into 40 bytes for *some* of the files, and into 32 bytes for
others. As you can imagine, this causes great difficulties
reading the data.
I've alerted the author, but have yet to hear from him.
(Huh!? Am I the only person working on Christmas Eve!)
So, anyway, I have updated the MAP_GHSSS_SHORELINE program
to use the new structure definition, but at the moment I
can only use the program to read the gshhs_h.b file. I have
to add 8 bytes of junk to the header to successfully
read the gshhs_I.b file.
It's a big of a dog's dish at the moment (to use one of
my favorite English expression). I hope to have it sorted
out soon.
OK, I have to go wrap packages. Happy Holidays!
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
|
|
|