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

Home » Public Forums » archive » "TRUE" map projections
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
"TRUE" map projections [message #3431] Tue, 24 January 1995 13:34 Go to next message
afl is currently offline  afl
Messages: 51
Registered: December 1994
Member
How can one obtain (for example) a "true" Mercator map
projection in IDL? Sounds rather academic, doesn't it?
But in a given window if one issues

IDL> map_set, /merc, /cont, /grid, /usa, limit=[15,-130,50,-60]

vs.

IDL> map_set, /merc, /cont, /grid, /usa, limit=[15,-180,50,-30]

I guaranteee you the "shape" of the geographical boundaries
will be different. There must be a single, proper aspect ratio for
a map to be called a "true" Mercator projection. Is IDL capable
of producing "true" map projections, or is one able to arbitarily
re-shape the projection into any form he wishes such that the
specification of the projection is all but pointless? Does one
simply say "hmmmm, looks good to me" and move onto the next task?

--

Andrew F. Loughe email: afl@cdc.noaa.gov
University of Colorado, CIRES voice: (303) 492-0707
Campus Box 449 fax: (303) 497-7013
Boulder, CO 80309-0449 USA
Re: "TRUE" map projections [message #3473 is a reply to message #3431] Tue, 31 January 1995 05:54 Go to previous message
Serdar Manizade is currently offline  Serdar Manizade
Messages: 15
Registered: December 1994
Junior Member
afl@bjerknes.NoSubdomain.NoDomain (Andy Loughe) wrote:
>
> In article <3gjeud$t4g@post.gsfc.nasa.gov>, Serdar Manizade <manizade@osb1.wff.nasa.gov> writes:
> |> afl@bjerknes.NoSubdomain.NoDomain (Andy Loughe) wrote:
> |> > ...
> |> > than I--> "Use the /ISO keyword in your map_set call."
> |> > Is the ISO keyword a documented feature in IDL?
> |> > "No comment."
> |> ...
> |> I tried it. I did not find iso mentioned in the on-line documentation
> |> for map_set. (I am running: IDL. Version 3.6 (sunos sparc).)
> |> ...

> I am running IDL Version 3.6.1a (sunos sparc), and the /ISO
> keyword works with map_set. I cannot vouch for earlier versions.

Thanks to Andy Loughe and Marion Legg. I updated to 3.6.1a and
now have the /iso keyword to map_set. Now if only I had some
documentation to understand what it does...

Serdar
EG&G/ NASA Wallops Flight Facility, Virginia, USA
Re: "TRUE" map projections [message #3479 is a reply to message #3431] Mon, 30 January 1995 14:54 Go to previous message
afl is currently offline  afl
Messages: 51
Registered: December 1994
Member
In article <3gjeud$t4g@post.gsfc.nasa.gov>, Serdar Manizade <manizade@osb1.wff.nasa.gov> writes:
|> afl@bjerknes.NoSubdomain.NoDomain (Andy Loughe) wrote:
|> > ...
|> > than I--> "Use the /ISO keyword in your map_set call."
|> >
|> > Is the ISO keyword a documented feature in IDL?
|> >
|> > "No comment."
|>
|> Perhaps you are speaking tongue-in-cheek, but I am gullible, so
|> I tried it. I did not find iso mentioned in the on-line documentation
|> for map_set. (I am running: IDL. Version 3.6 (sunos sparc).)
|>
|> IDL> map_set
|> % Compiled module: MAP_SET.
|> IDL> map_set,/iso
|> % Keyword ISO not allowed in call to: MAP_SET
|> % Execution halted at $MAIN$ .
|>
|>



I am running IDL Version 3.6.1a (sunos sparc), and the /ISO
keyword works with map_set. I cannot vouch for earlier versions.

--

Andrew F. Loughe email: afl@cdc.noaa.gov
University of Colorado, CIRES voice: (303) 492-0707
Campus Box 449 fax: (303) 497-7013
Boulder, CO 80309-0449 USA
Re: "TRUE" map projections [message #3483 is a reply to message #3431] Mon, 30 January 1995 11:33 Go to previous message
Serdar Manizade is currently offline  Serdar Manizade
Messages: 15
Registered: December 1994
Junior Member
afl@bjerknes.NoSubdomain.NoDomain (Andy Loughe) wrote:
> ...
> than I--> "Use the /ISO keyword in your map_set call."
>
> Is the ISO keyword a documented feature in IDL?
>
> "No comment."

Perhaps you are speaking tongue-in-cheek, but I am gullible, so
I tried it. I did not find iso mentioned in the on-line documentation
for map_set. (I am running: IDL. Version 3.6 (sunos sparc).)

IDL> map_set
% Compiled module: MAP_SET.
IDL> map_set,/iso
% Keyword ISO not allowed in call to: MAP_SET
% Execution halted at $MAIN$ .
Re: "TRUE" map projections [message #3495 is a reply to message #3431] Fri, 27 January 1995 09:32 Go to previous message
zawodny is currently offline  zawodny
Messages: 121
Registered: August 1992
Senior Member
In article <3gb5au$o3i@post.gsfc.nasa.gov> Serdar Manizade <manizade@osb1.wff.nasa.gov> writes:
> I repost my note since subject was missing. Apologies.
> Serdar Manizade <manizade@osb1.wff.nasa.gov> wrote:
>>
>> zawodny@arbd0.larc.nasa.gov (Joseph M Zawodny) wrote:
>>> possible I use "circular" map projections and the SET_ISOXY routine. But,
>>
>> Where is the SET_ISOXY routine?
>>
>> When I produce a map, I have to pull out my ruler and measure the
>> latitude and longitude scales to see if I got the scaling right. I
>> make adjustments whenever I change my output map aspect ratio or the
>> coordinates of the map. Especially important at high latitudes.
>

This is my version of the routine set_isoxy. It was part of a system of
routines writen by the original author. I hacked it a bit to work by
itself without the need for the other routines. It works for what I use it
for but it may nolonger function as the original author intended. I make
no claims of functionality for either myself or the original author. Look
it over, try it out and hack it further to suit your needs.


PRO SET_ISOXY, XMN0, XMX0, YMN0, YMX0
;+
;----------------------------------------------------------- -------
; Name: SET_ISOXY.PRO
; Purpose: Set XY isotropically (equal x and y scale).
; Category: Graphics.
; Calling sequence: SET_ISOXY, XMN, XMX, YMN, YMX
; Inputs:
; XMN = minimum data x. in.
; XMX = maximum data x. in.
; YMN = minimum data y. in.
; YMX = maximum data y. in.
; Optional input parameters:
; Outputs:
; Optional output parameters:
; Common blocks: ISOXY_COMMON = what parts of data window to lock in place.
; Side effects:
; Restrictions:
; Routines used:
; Procedure:
; Modification history:
; 3 Sep, 1986. R. Sterner. Johns Hopkins U APL
; Jun 14, 1990. J.M. Zawodny NASA LaRC modified for standalone to V-2.0
;----------------------------------------------------------- -------
;-
COMMON ISOXY_COMMON, X_LOCK, Y_LOCK

IF N_PARAMS(0) EQ 0 THEN BEGIN
PRINT,'SET_ISOXY, XMN, XMX, YMN, YMX
PRINT,' XMN, XMX = desired min and max X.
PRINT,' YMN, YMX = desired min and max Y.
PRINT,' Either XMN, XMX or YMN,YMX will be adjusted to force equal scaling in
PRINT,' X and Y in the set screen window. At least the specified range will
PRINT,' be covered in both X and Y, but a greater range will be covered in one.
RETURN
ENDIF

IF N_ELEMENTS(X_LOCK) EQ 0 THEN X_LOCK = 'XMD' ; defaults.
IF N_ELEMENTS(Y_LOCK) EQ 0 THEN Y_LOCK = 'YMD'
XMN = XMN0 ; copy so changing values
XMX = XMX0 ; won't change them in caller.
YMN = YMN0
YMX = YMX0

; if !p.position not set default to largest area possible
m=where(!p.position ne 0.,count)
if(count eq 0) then !p.position=[0.,0.,1.,1.]

IDX = (!p.position(2)-!p.position(0))*!d.x_vsize ; plot position
IDY = (!p.position(3)-!p.position(1))*!d.y_vsize ; side lengths
DX = FLOAT(XMX - XMN) ; data window side lengths.
DY = FLOAT(YMX - YMN)
YMD = .5*(YMN + YMX) ; data window midpoint.
XMD = .5*(XMN + XMX)
IF (DX/DY) GE (IDX/IDY) THEN BEGIN ; adjust Y range.
DY2 = .5*DX*IDY/IDX ; half new Y range.
DX2 = .5*DX ; half old X range.
ENDIF ELSE BEGIN ; adjust X range.
DX2 = .5*DY*IDX/IDY ; half new X range.
DY2 = .5*DY ; half old Y range.
ENDELSE
;--------- lock window -----------------
CASE X_LOCK OF ; lock x.
'XMN': XMX = XMN + DX2 + DX2 ; lock x min.
'XMD': BEGIN ; lock x mid.
XMN = XMD - DX2
XMX = XMD + DX2
END
'XMX': XMN = XMX - DX2 - DX2 ; lock x max.
ENDCASE
CASE Y_LOCK OF ; lock y.
'YMN': YMX = YMN + DY2 + DY2 ; lock y min.
'YMD': BEGIN ; lock y mid.
YMN = YMD - DY2
YMX = YMD + DY2
END
'YMX': YMN = YMX - DY2 - DY2 ; lock y max.
ENDCASE

!x.range=[XMN, XMX]
!y.range=[YMN, YMX]

RETURN
END

--
Joseph M. Zawodny (KO4LW) NASA Langley Research Center
Internet: j.m.zawodny@larc.nasa.gov MS-475, Hampton VA, 23681-0001
TCP/IP: ko4lw@ko4lw.ampr.org Packet: ko4lw@n4hog.va.usa.na
Re:"TRUE" map projections [message #3496 is a reply to message #3431] Fri, 27 January 1995 08:00 Go to previous message
Serdar Manizade is currently offline  Serdar Manizade
Messages: 15
Registered: December 1994
Junior Member
I repost my note since subject was missing. Apologies.
Serdar Manizade <manizade@osb1.wff.nasa.gov> wrote:
>
> zawodny@arbd0.larc.nasa.gov (Joseph M Zawodny) wrote:
>> possible I use "circular" map projections and the SET_ISOXY routine. But,
>
> Where is the SET_ISOXY routine?
>
> When I produce a map, I have to pull out my ruler and measure the
> latitude and longitude scales to see if I got the scaling right. I
> make adjustments whenever I change my output map aspect ratio or the
> coordinates of the map. Especially important at high latitudes.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Again.....plot interrupt?
Next Topic: IDL causes color table flashing on SGI with Irix 6.0.1

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

Current Time: Wed Oct 08 19:42:31 PDT 2025

Total time taken to generate the page: 0.00513 seconds