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

Home » Public Forums » archive » CGMAP_GSHHS: problem with land/water colors
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: problem with land/water colors [message #85520 is a reply to message #85515] Wed, 14 August 2013 12:38 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Matteo writes:

> I noticed using CGMAP_GSHHS.PRO that if no ocean waters are present on a map, the LAND keyword for the land color does not work properly. Here's a snippet code that reproduces the problem (note that it is very similar to the one included in the examples of the CGMAP_GSHHS header). Just set your PATH to include the CGxxx routines and the correct directory for the gshhs.b file.

Well, it appears your observation is correct, but your explanation is
wrong. :-)

I have a bit of code in here to speed things up:

xy = Convert_Coord(lon, lat, /Data, /To_Normal)
check = ((xy[0,*] GE !X.Window[0]) AND (xy[0,*] LE !X.Window[1])) AND $
((xy[1,*] GE !Y.Window[0]) AND (xy[1,*] LE !Y.Window[1]))
usePolygon = Max(check)

Your particular example appears to be a perverse one, because no land
polygons ever set the usePolygon flag to 1, so land polygons are not
filled.

If you set usePolygon=1 just after this code and run your program, you
will see it does the right thing, but takes a LONG time to run. (I used
the intermediate resolution file. You seem to be using the high
resolution file, which I wouldn't recommend. That will take an EXTREMELY
long time to run!)

So, the problem is to understand why these land polygons aren't being
drawn. I presume it is because they have one or more vertices outside
the map boundary. I'll have to see what I can do about this. I don't
know how many polygons there are, but the term "millions" comes to mind.
I'll see if I can find the 3-4 I am looking for. It may be awhile before
I get back in touch. :-(

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.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Not IDL Related Question
Next Topic: copying text to the system clipboard

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

Current Time: Sat Oct 11 09:41:22 PDT 2025

Total time taken to generate the page: 0.48211 seconds