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

Home » Public Forums » archive » Re: map projection polygon problem
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: map projection polygon problem [message #1862] Wed, 23 March 1994 10:53
andy is currently offline  andy
Messages: 31
Registered: November 1993
Member
In article <2mptha$7i5@paperboy.gsfc.nasa.gov>, ian@denali.gsfc.nasa.gov (Ian Sprod) writes:
> I wish to plot little polygons on a map projection using "polyfill".
> This works fine except at the edges of the plot where everything
> goes haywire. When half the polygon is "around the back" of the planet
> the co-ordinates do not get transformed correctly and the polygon
> streaks across to the edge of the screen.
>
> To see the problem try this simple program :
>
> --------------------------------------------
>
> pro poly_plot
>
> ; set co-ords for polygon
>
> lat = [0,10,0,-10,0]
> lon = [-10,0,10,0,-10]
>
> map_set,0,0,/ortho,/cont,/noborder
> loadct,5
>
> ; plot polygon
> polyfill,lon,lat,color=50
>
> ; now put polygon at edge of plot
>
> lon = lon + 85.0
>
> polyfill,lon,lat,color=100
>
> end
>
> ------------------------------------------------
>
> If someone has an _uncontrived_ solution please post or e-mail it to me.
>
> Thanks
>
> Ian
> ian@denali.gsfc.nasa.gov


Ian,

Have you tried using the !map.out system variable?
You might be able to keep your polygons within
the proper bounds once you have these values defined.

lonmin = !map.out(2)
lonmax = !map.out(3)
latmin = !map.out(4)
latmax = !map.out(5)

I hope this helps.

Andy

--
,__o Andrew F. Loughe (Code 971)
-\_<, NASA Goddard Space Flight Center phone: (301) 286-5899
(*)/'(*) Greenbelt, MD 20771 email: andy@toto.gsfc.nasa.gov
[Message index]
 
Read Message
Previous Topic: Re: Structures and Call_External
Next Topic: Re: IDL - RPC? IDL - AVS?

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

Current Time: Sat Oct 11 08:31:51 PDT 2025

Total time taken to generate the page: 0.31866 seconds