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

Home » Public Forums » archive » Re: how to use map_set in object graphics programming
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: how to use map_set in object graphics programming [message #45767] Wed, 05 October 2005 09:29 Go to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
shengbaojun wrote:

> Could you please tell me Where can I find IMap tool?

iMap is one of the iTools that shipped with IDL 6.1. If you have IDL
6.1 or newer there is information regarding it in the documentation.


> I hope I can use map_set to draw a background map in
> IDLWidgetContro when IDLWidgetControl's Graphics_Level is set to 2.
> But I can not sucess.

As Mark mentioned you can not use MAP_SET and object graphics. Either
you develop your application using the direct graphics system
(GRAPHICS_LEVEL=1) and use MAP_SET *or* you use the object graphics
system (GRAPHICS_LEVEL=2) and the MAP_PROJ_* functions.


> IF the above idea is not fillfull,It means I must use Map_proj* and
> IDLgr* to draw map,Could you please give me something advice.

Again, as Mark said, the MAP_PROJ_* functions operate at a lower level
and require you to do more coding to get your map on the screen. Check
out the IDL documentation for MAP_PROJ_FORWARD for some example code.

The basic steps will be:

You will read in your coastline data.

use MAP_PROJ_INIT to set up your projection

use MAP_PROJ_FORWARD to convert your coastline data from lat/lon to
cartesian coordinates X,Y.

At the very least pass X,Y to IDLgrPolyline and plot as a collection of
points. If you want to plot the coastline as lines, you may need to
generate the connectivity which tells IDLgrPolyline how to connect your
vertices X,Y into lines. Read the documentation on IDLgrPolyline.

add your IDLgrPolyline object to an IDLgrModel

use XOBJVIEW to view the IDLgrModel to verify that things worked as
expected.


Once you have done this then you can work on doing it using the ActiveX
control.


As I mentioned, you will still have one other issue to contend with.
I'm guessing that your are contouring with a 2d array of Z values. When
you try to overlay your coastline on your contour it will most likely
not line up correctly (in fact you will probably not even see it). You
will need to use the [XYZ]COORD_CONV keywords of IDLgrContour and
IDLgrPolyline to plot your data in the same place in the object graphics
coordinate system.


-Rick
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Easy question?
Next Topic: idl6.2 and if statemente

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

Current Time: Wed Oct 08 15:53:08 PDT 2025

Total time taken to generate the page: 0.00468 seconds