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

Home » Public Forums » archive » Basic cgMap and cgMapPlotS tutorial
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Basic cgMap and cgMapPlotS tutorial [message #81402] Mon, 17 September 2012 10:26 Go to previous message
Brian Daniel is currently offline  Brian Daniel
Messages: 80
Registered: July 2009
Member
I've never worked much with maps in IDL, so now that I need to, I thought I'd start with the Coyote tools. From the documentation, the cgMapPlotS object seems like exactly what I need, which is to plot specific lat/lons onto a map with continents or other shapefiles on top.

Here's my code:

center_lat = 36.099510
center_lon = -5.3362050
latXRange = [35.905270, 36.171590]
lonYRange = [-5.6205900, -5.0512100]

; Create cgMap object
oMap = Obj_New('cgMap', 'UTM', /LatLon_Ranges, $
Center_Latitude=center_lat,Center_Longitude=center_lon,$
XRange=latXRange,YRange=lonYRange, /Window,$
Position=[0.05,0.95,0.05,0.95],Title='cgMap Test',Land_Color='brown')

print, latXRange, lonYRange

The above code prints:
4669305.1 4713144.8
-801136.78 -722963.25

So latRange and lonRange's values were changed, I'm assuming to be in units of meters. center_lat/lon values are unchanged. Then, I attempt to create a cgMapPlotS object to plot the center_lat and center_lon position with a symbol:

oMapPlotS = Obj_New('cgMapPlotS', oMap, color='red', Lats=center_lat, Lons=center_lon, PSym=1 )

I get the following error:

CGMAPPLOTS::INIT--> CGCONTAINER::INIT: Incorrect number of arguments.

The only argument asked of cgMapPlotS is that of a cgMap object, which I provided. What am I missing?

Thanks in advance!
-Brian
[Message index]
 
Read Message
Read Message
Read Message
Previous Topic: Re: Managing several object instances
Next Topic: star symbol in labels??

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

Current Time: Wed Oct 08 19:02:51 PDT 2025

Total time taken to generate the page: 0.00544 seconds