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 #85523 is a reply to message #85522] Wed, 14 August 2013 13:33 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
David Fanning writes:

> I think I would have
> used cgMap_Continents instead, and used the GSHHS data for just the
> inland waterways, if I needed that much detail. In other words, I think
> this is a wrong tool for the job kind of problem. (Unless, of course,
> you have a coffee machine nearby and you don't really care now long it
> all takes.)

Here is how I would have written this code. It works with either of your
two map limits.

PRO test_gshhs

datafile='C:\IDL\data\gshhs\gshhs_2.2\gshhs\gshhs_i.b'

; include some water
map_limits = [29.,-95.,34.,-88]
; land only
;map_limits = [31.,-95.,34.,-88]

cgDisplay, 500, 350, /free
pos = [0.1,0.1, 0.9, 0.8]

; set map projection
cgmap_set, limit = map_limits, /mercator, position=pos

cgColorFill, Position=pos, Color='tg5'
cgMap_Continents, color='tan', /continents, /fill

; issue CGMAP_GSHHS
cgMap_GSHHS, datafile, Fill=1, Level=2, Color='black', $
Water_color='blu4'

; overdraw state borders
cgMap_Continents, /usa, color='yellow'

cgPolygon, Position=pos, Color='black'
END

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: Fri Oct 10 15:52:41 PDT 2025

Total time taken to generate the page: 1.12392 seconds