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

Home » Public Forums » archive » Plotting 'continents' in object graphics...
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: Plotting 'continents' in object graphics... [message #41265 is a reply to message #41124] Mon, 04 October 2004 10:40 Go to previous messageGo to previous message
Rick Towler is currently offline  Rick Towler
Messages: 821
Registered: August 1998
Senior Member
George Millward wrote:

> I am plotting data on a sphere - using the 'Orb' object - and i want
> to add the continents boundaries - just like the 'continents' command
> in direct graphics. Only there isn't a continents command for
> objects. Has anyone done this / know how to do it ?

Randall Skelton wrote:

> I don't believe it is possible. I know it was on my feature request
> list that I sent them back in the IDL 5.x days...


Come on people! If there is one thing we have learned is that you can
do just about anything in OG if you are willing to waste the time :)

Someone with some mapping skills could whip up a set of verts and
connectivity given the many coastline databases on the web. It just
needs to be done once and it has probably been done already. Anybody
care to share?

Lacking said mapping skills, I chose to look for some canned geometry.
A while back I created a .dxf file from some continents geometry I
found. The file contains polygon meshes of the continents, not quite
the outlines you were looking for but it is a quick solution.

You can use it with my DXF model object which makes it a bit easier to
play with dxf files. Note that the object only handles polyline and
polygon DXF primitives (which are all I care about) but could easily be
extended if need be. For the continents, you'll have to set the colors
of the primitives manually since there is no color information in the
DXF file. Use the GetPrimitive method to get the obj references.


IDL> orb=obj_new('orb', color=[180,180,250], radius=0.99)
% Compiled module: ORB__DEFINE.
IDL> continents=obj_new('rhtgrdxfmodel','continents.dxf', $
alpha_channel=0.3)
% Compiled module: LINKEDLIST__DEFINE.
% Loaded DLM: DXF.
IDL> orb->add, continents
IDL> orb->add, continents
IDL> xobjview, orb

The DXF file is here:

http://www.acoustics.washington.edu/~towler/programs/contine nts.zip

The RHTgrDXFModel object is here:

http://www.acoustics.washington.edu/~towler/programs/rhtgrdx fmodel__define.pro


You'll need David's linkedlist__define.pro available from his website
http://www.dfanning.com.

-Rick
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Optimisation in IDL?
Next Topic: Re: RESOLVE_ROUTINE in the .sav file

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

Current Time: Fri Oct 10 07:07:56 PDT 2025

Total time taken to generate the page: 0.79692 seconds