Prev: function error
Next: matpower
From: Brian on 5 May 2010 22:13 I'm playing with loading some medium and high res map files and getting an "Invalid Greenwich crossing flag" error with this code: filename = unzip([directory 'gshhs_c.zip'], tempdir); world = gshhs(filename{1}); Error details: ??? Error using ==> gshhs>attribError at 324 Invalid attribute header in file "C:\DOCUME~1\BSCHIE~1\LOCALS~1\Temp\gshhs_c.b". Invalid Greenwich crossing flag: 28. Error in ==> gshhs>validateHeader at 724 attribError(FileID, 'invalidGreenwichCrossFlag', errorMsg) Error in ==> gshhs>readAttributes at 315 validateHeader(header, FileID) Error in ==> gshhs>gshhsRead at 390 A = readAttributes(FileID); Error in ==> gshhs at 140 S = gshhsRead(FileID,latlim,lonlim,subset); Error in ==> areaMapExample at 23 world = gshhs(filename{1}); ------------------------------------ I downloaded the GSHHS file from http://www.ngdc.noaa.gov/mgg/shorelines/data/gshhs/version2.0/ and unzipped it on a WindowsXP box using WinZip. Is there a file incompatibility on Windoz boxes that causes the unzip to fail? THANKS for any tips! -Brian
From: Brian on 6 May 2010 12:47 Perhaps someone has an example of a working mapping call which uses gshhs? "Brian " <bschieber(a)SPAMBITES.spg.ucsd.edu> wrote in message <hrt8jh$7b$1(a)fred.mathworks.com>... > I'm playing with loading some medium and high res map files and getting an "Invalid Greenwich crossing flag" error with this code: > > filename = unzip([directory 'gshhs_c.zip'], tempdir); > world = gshhs(filename{1}); > > Error details: > > ??? Error using ==> gshhs>attribError at 324 > Invalid attribute header in file "C:\DOCUME~1\BSCHIE~1\LOCALS~1\Temp\gshhs_c.b". > Invalid Greenwich crossing flag: 28. > > Error in ==> gshhs>validateHeader at 724 > attribError(FileID, 'invalidGreenwichCrossFlag', errorMsg) > > Error in ==> gshhs>readAttributes at 315 > validateHeader(header, FileID) > > Error in ==> gshhs>gshhsRead at 390 > A = readAttributes(FileID); > > Error in ==> gshhs at 140 > S = gshhsRead(FileID,latlim,lonlim,subset); > > Error in ==> areaMapExample at 23 > world = gshhs(filename{1}); > > ------------------------------------ > > I downloaded the GSHHS file from http://www.ngdc.noaa.gov/mgg/shorelines/data/gshhs/version2.0/ > and unzipped it on a WindowsXP box using WinZip. > > Is there a file incompatibility on Windoz boxes that causes the unzip to fail? > THANKS for any tips! > -Brian
From: Brian on 6 May 2010 15:19 Aha! Seems I missed this little detail in the GSHHS help: gshhs Read Global Self-Consistent Hierarchical High-Resolution Shoreline Syntax S = gshhs(filename) S = gshhs(filename, latlim, lonlim) indexfilename = gshhs(filename, 'createindex') Description S = gshhs(filename) reads GSHHS version 1.3 and earlier vector data for the entire world from filename. It appears GSHHS is not up to date with handling the 2.0 version of the data. I test 1.3 which works as described. -Brian "Brian " <bschieber(a)SPAMBITES.spg.ucsd.edu> wrote in message <hrt8jh$7b$1(a)fred.mathworks.com>... > I'm playing with loading some medium and high res map files and getting an "Invalid Greenwich crossing flag" error with this code: > > filename = unzip([directory 'gshhs_c.zip'], tempdir); > world = gshhs(filename{1}); > > Error details: > > ??? Error using ==> gshhs>attribError at 324 > Invalid attribute header in file "C:\DOCUME~1\BSCHIE~1\LOCALS~1\Temp\gshhs_c.b". > Invalid Greenwich crossing flag: 28. > > Error in ==> gshhs>validateHeader at 724 > attribError(FileID, 'invalidGreenwichCrossFlag', errorMsg) > > Error in ==> gshhs>readAttributes at 315 > validateHeader(header, FileID) > > Error in ==> gshhs>gshhsRead at 390 > A = readAttributes(FileID); > > Error in ==> gshhs at 140 > S = gshhsRead(FileID,latlim,lonlim,subset); > > Error in ==> areaMapExample at 23 > world = gshhs(filename{1}); > > ------------------------------------ > > I downloaded the GSHHS file from http://www.ngdc.noaa.gov/mgg/shorelines/data/gshhs/version2.0/ > and unzipped it on a WindowsXP box using WinZip. > > Is there a file incompatibility on Windoz boxes that causes the unzip to fail? > THANKS for any tips! > -Brian
From: Kelly Luetkemeyer on 7 May 2010 10:13 Hi Brian, Yes the GSHHS function does not yet support version 2.0 of the dataset. You can also try reading the shapefiles that are located at http://www.ngdc.noaa.gov/mgg/shorelines/data/gshhs/version2.0/shapefiles/ Use the function SHAPEREAD. Thanks for your post -- we'll look into upgrading the function in a later release. -Kelly Brian wrote: > Aha! Seems I missed this little detail in the GSHHS help: > gshhs > > Read Global Self-Consistent Hierarchical High-Resolution Shoreline > Syntax > > S = gshhs(filename) > S = gshhs(filename, latlim, lonlim) > indexfilename = gshhs(filename, 'createindex') > Description > > S = gshhs(filename) reads GSHHS version 1.3 and earlier vector data for > the entire world from filename. > > It appears GSHHS is not up to date with handling the 2.0 version of the > data. I test 1.3 which works as described. -Brian > > > "Brian " <bschieber(a)SPAMBITES.spg.ucsd.edu> wrote in message > <hrt8jh$7b$1(a)fred.mathworks.com>... >> I'm playing with loading some medium and high res map files and >> getting an "Invalid Greenwich crossing flag" error with this code: >> >> filename = unzip([directory 'gshhs_c.zip'], tempdir); >> world = gshhs(filename{1}); >> >> Error details: >> >> ??? Error using ==> gshhs>attribError at 324 >> Invalid attribute header in file >> "C:\DOCUME~1\BSCHIE~1\LOCALS~1\Temp\gshhs_c.b". >> Invalid Greenwich crossing flag: 28. >> >> Error in ==> gshhs>validateHeader at 724 >> attribError(FileID, 'invalidGreenwichCrossFlag', errorMsg) >> >> Error in ==> gshhs>readAttributes at 315 >> validateHeader(header, FileID) >> >> Error in ==> gshhs>gshhsRead at 390 >> A = readAttributes(FileID); >> >> Error in ==> gshhs at 140 >> S = gshhsRead(FileID,latlim,lonlim,subset); >> >> Error in ==> areaMapExample at 23 >> world = gshhs(filename{1}); >> >> ------------------------------------ >> >> I downloaded the GSHHS file from >> http://www.ngdc.noaa.gov/mgg/shorelines/data/gshhs/version2.0/ >> and unzipped it on a WindowsXP box using WinZip. >> Is there a file incompatibility on Windoz boxes that causes the unzip >> to fail? THANKS for any tips! >> -Brian
|
Pages: 1 Prev: function error Next: matpower |