Re: cgmap_gshhs.pro minarea issue [message #86622 is a reply to message #86621] |
Sat, 23 November 2013 21:15  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
pvelissariou@fsu.edu writes:
> 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
OK, I'm going to assume you can make more sense of that documentation
than I can. ;-)
I'll check this in tomorrow with the other changes. Thanks for your
help.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
|
|
|