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

Home » Public Forums » archive » cgmap_gshhs.pro minarea issue
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: cgmap_gshhs.pro minarea issue [message #86621 is a reply to message #86594] Sat, 23 November 2013 20:03 Go to previous messageGo to previous message
pvelissariou is currently offline  pvelissariou
Messages: 4
Registered: November 2013
Junior Member
On Thursday, November 21, 2013 7:09:28 PM UTC-5, pvelis...@fsu.edu wrote:
> Apparently, in the recent versions (>= 2.2) of gshhs database
>
> the units of the header.area changed from 1/10 km^2 to 1/10 m^2.
>
> For cgmap_gshhs to work properly the line:
>
> polygonArea = header.area * 0.1 (ok for gshhs < 2.2)
>
> should be changed to:
>
> polygonArea = header.area * 1.0e-7 (for gshhs >= 2.2)

David,

I think the following changes are required:

the line: river = ISHFT(f, -25) AND 255B
should be: river = ISHFT(f, -25) AND 1B

also, header.area is of type LONG and 10^magnitude is of type INT
therefore the calculated polygonarea is wrong, I have modified the
following lines as:

from:
IF version LE 8 THEN BEGIN
polygonArea = header.area * 0.1 ; km^2
ENDIF ELSE BEGIN
polygonArea = header.area / 10^magnitude ; km^2
ENDELSE
to:
IF version LT 9 THEN BEGIN
polygonArea = Double(header.area) * 0.1 ; km^2
ENDIF ELSE BEGIN
polygonArea = Double(header.area) / 10.0^magnitude ; km^2
ENDELSE
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: IDL 8.2, read pixel value along a surface
Next Topic: Exelis code library down - someone has G

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

Current Time: Wed Oct 08 19:55:42 PDT 2025

Total time taken to generate the page: 0.00446 seconds