comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: Bug in GSHHS Data Files?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
Re: Bug in GSHHS Data Files? [message #64437] Sun, 28 December 2008 18:11
TonyL is currently offline  TonyL
Messages: 14
Registered: November 2008
Junior Member
On Dec 25, 1:17 pm, David Fanning <n...@dfanning.com> wrote:
> 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.")

Thanks for checking that out, David. I use the GSHHS data a lot but
tend to not update the data very often. Hopefully the data files will
revert to their earlier formats in terms of header structure so that
we don;t have to change any programs that use pre-existing readers.

Tony
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Re: What is the simplest way to communicate between IDL and MATLAB?
Next Topic: Re: mosaic routine?

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Thu Oct 09 12:30:52 PDT 2025

Total time taken to generate the page: 0.47745 seconds