Re: map_set, !map, !x, !p.position (and behind this curtain, !x.*) [message #48018] |
Fri, 24 March 2006 07:48  |
K. Bowman
Messages: 330 Registered: May 2000
|
Senior Member |
|
|
In article <1143160689.240554.60510@g10g2000cwb.googlegroups.com>,
"Ed Hyer" <ejhyer@gmail.com> wrote:
> I will never use object graphics-- NEVER!
Well, until you need to do interactive 3-D graphics, in which case object
graphics are really the only solution.
I have not been a fan of the iTools, in particular, but they are improving
(although the documentation is still rather opaque).
This is pretty slick:
n = 10000
b = 1.0
eps = 0.5
x = RANDOMN(seed, n)
y = b*x + eps*RANDOMN(seed, n)
z = b*x + eps*RANDOMN(seed, n)
iPlot, x, y, z, /SCATTER, /NO_SAVEPROMPT
Real, 3-D, interactive scatterplots (among other things).
Plus, you can save the visualization as a .isv file. Anyone with IDL can open
it and view the visualization interactively.
Printing remains a real problem, though. I can capture a bitmap of the screen,
but I have never been able to create a usable Postscript file from an iTool. (I
can send it to the printer, but that is not much use for creating publications.)
Ken Bowman
|
|
|
Re: map_set, !map, !x, !p.position (and behind this curtain, !x.*) [message #48023 is a reply to message #48018] |
Thu, 23 March 2006 16:38   |
MarioIncandenza
Messages: 231 Registered: February 2005
|
Senior Member |
|
|
Matt,
It's done, at least a good throw at it:
ftp://ftp.nrlmry.navy.mil/pub/receive/hyer/map_set_hack/
NOTE1: All of you waiting to do direct graphics with the ISIN
projection, keep waiting. This implementation doesn't do GCTP
projections. At least I expect it doesn't, I haven't tested it--
honestly, it just might.
NOTE2: You can set the LIMITs in MAP_PROJ_INIT or in MAP_SET_HACK. If
you set it in both, the LIMITs given to MAP_SET_HACK will be used.
I did test it with a few different projections, and also tested the
SCALE and ISO keywords, verifying that the visual map produced is
identical to the results from MAP_SET. This means that laying data out
on the map will work, I can't say what else will and won't work. I call
it a hack because line-by-line mostly I just deleted about 100 lines
from MAP_SET.PRO. The principal complication relates to this:
IDL> lam=map_proj_init('Lambert Azimuthal',$
IDL> center_longitude=-100,center_latitude=40,limit=[30,-140,60,- 80])
IDL> print,lam.uv_box,lam.a,lam.e2
-3708024.9 -1110538.0 1913671.3 2763653.9
6370997.0 0.00000000
IDL> map_set,40,-100,/lambert,limit=[30,-140,60,-80]
IDL> print,!map.uv_box,!map.a,!map.e2
-0.58201641 -0.17431149 0.30037236 0.43378672
1.0000000 0.00000000
What's happening here is that MAP_PROJ_INIT and MAP_SET work
differently. MAP_PROJ_INIT always uses an ellipsoid with dimensions in
meters, and MAP_SET normalizes all dimensions to the radius of the
standard sphere, unless forced. Of the non-GCTP projections, only UTM
and Lambert Conic can use a specified ellipsoid, those projections work
the same with MAP_SET and MAP_PROJ_INIT.
This hack does what I needed it to do, and I learned a lot about IDL's
map geometry doing it. If it cracks for your application, post to the
group, the only thing I think cannot be fixed is support for GCTP
projections.
I will never use object graphics-- NEVER!
--Edward H.
|
|
|
Re: map_set, !map, !x, !p.position (and behind this curtain, !x.*) [message #48027 is a reply to message #48023] |
Thu, 23 March 2006 07:21   |
savoie
Messages: 68 Registered: September 1996
|
Member |
|
|
"Ed Hyer" <ejhyer@gmail.com> writes:
> Hi IDL Genii,
>
> Everything would be dandy if I could just call
>
> MAP_SET,<PROJECTION INFO>,POSITION=<POSITION>,LIMIT=<LIMIT>
>
> Searching the newsgroup for help with this, I heard someone call for
> putting a keyword into MAP_SET to take output from MAP_PROJ_INIT. Hear
> hear!!!
I don't know if it was me or not. But I speak up for wanting this
functionality.
>
> I'm sure there's a 20-line kluge to get around this, and hey-- my teams
> are all out of the tournament, what was I gonna do this weekend anyway?
>
When you get this finished, would you mind posting the answer. I've always
just done without.
Thanks
Matt
--
Matthew Savoie - Scientific Programmer
National Snow and Ice Data Center
(303) 735-0785 http://nsidc.org
|
|
|
Re: map_set, !map, !x, !p.position (and behind this curtain, !x.*) [message #48122 is a reply to message #48023] |
Tue, 28 March 2006 05:29   |
Jan Kristian Jensen
Messages: 10 Registered: February 2006
|
Junior Member |
|
|
Ed Hyer wrote:
> It's done, at least a good throw at it:
>
> ftp://ftp.nrlmry.navy.mil/pub/receive/hyer/map_set_hack/
Sorry, I missed your post (been away for a few days), and your code
seems to have gone from the ftp-server. Would you mind posting it again?
[ ... ]
> I will never use object graphics-- NEVER!
>
> --Edward H.
I started a thread some time ago about using map_set to merge my IDL
geo-referenced data with background images from WMS servers (WMS=Web
Mapping Service) around the web. This consistently failed to work (or
rather _*almost*_ worked in the center of the image, with errors
increasing progressively towards the edges). My conclusion was to give
it a try with object graphics, but other pressing affairs came to
attention and I never really got around to dig into it.
If you post your code, I will have a second try with direct graphics. If
I get it to work, I will post the recipie here.
Cheers, Jan
--
Jan Kristian Jensen
Remove the obvious from the email adress to email me.
|
|
|
Re: map_set, !map, !x, !p.position (and behind this curtain, !x.*) [message #48179 is a reply to message #48122] |
Wed, 29 March 2006 12:05  |
MarioIncandenza
Messages: 231 Registered: February 2005
|
Senior Member |
|
|
Jan,
It's back up. I don't want to post to group because it's ~350 lines
long. The file on the FTP site has all of the MAP_SET auxiliary
routines, which are unmodified, as well as the MAP_SET_HACK routine,
which is a substitute for MAP_SET. You could put just this routine into
a file, but then you have to compile MAP_SET explicitly to use
MAP_SET_HACK.
--Edward H.
|
|
|