Basic cgMap and cgMapPlotS tutorial [message #81402] |
Mon, 17 September 2012 10:26  |
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
|
|
|