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

Home » Public Forums » archive » [Q] PLOTS/POLYFILL clipping in map
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
[Q] PLOTS/POLYFILL clipping in map [message #6654] Thu, 01 August 1996 00:00
Iarla Kilbane-Dawe is currently offline  Iarla Kilbane-Dawe
Messages: 7
Registered: May 1995
Junior Member
Hello,

does anyone have any experience of using the clip keyword with
plot and polyfill when a map projection is in use which has been
restricted using the limits keyword? We don't seem to be able to get
things to plot inside the chosen region if any of the vector lies outside
it. Equally, we haven't been able to get the routines to clip filled
polygons at the edge of the region.

Does anyone have any advice please?

Many thanks in advance.

Iarla.

____________________________________________________________ _________

Iarla Kilbane-Dawe Email: iarla@atm.ch.cam.ac.uk
Centre for Atmospheric Science Phone: ++44 (01223) 336524
Cambridge University Fax: ++44 (01223) 336473
____________________________________________________________ _________
Re: [Q] PLOTS/POLYFILL clipping in map [message #6748 is a reply to message #6654] Thu, 01 August 1996 00:00 Go to previous message
Robert.M.Candey is currently offline  Robert.M.Candey
Messages: 23
Registered: June 1995
Junior Member
In article
<Pine.SOL.3.91.960801125009.23811K-100000@Cacofonix.atm.ch.cam.ac.uk>,
Iarla Kilbane-Dawe <iarla@atm.ch.cam.ac.uk> wrote:

> Hello,
>
> does anyone have any experience of using the clip keyword with
> plot and polyfill when a map projection is in use which has been
> restricted using the limits keyword? We don't seem to be able to get
> things to plot inside the chosen region if any of the vector lies outside
> it. Equally, we haven't been able to get the routines to clip filled
> polygons at the edge of the region.
>
> Does anyone have any advice please?
>
> Many thanks in advance.
>
> Iarla.

I haven't found the clip keyword to work either, I think since the edge of
a polygon that goes over the side of the plot on one side is often still
in bounds on the other side. I use the following to check each polygon
(in this case using triangles returned from triangulate) and not plot if
the polygon is large in normalized coordinates:

pAll = convert_coord(Lon, Lat, /data, /to_normal)
pLon = pAll(0,*) & pLat = pAll(1,*)
for i=0L,n_elements(triangles(0,*))-1 do begin
tri1 = triangles(*,i)
Lon3 = Lon(tri1) & Lat3 = Lat(tri1)
Zb1 = Zb(tri1(0))
if (total(abs(pLon(tri1)-shift(pLon(tri1),1))) lt 0.1) and $
(total(abs(pLat(tri1)-shift(pLat(tri1),1))) lt 0.1) then $
polyfill, Lon3, Lat3, color=Zb1(0), noclip=0
endfor

This is for full polar plots and may not be the solution for restricted regions.

--
Robert.M.Candey@gsfc.nasa.gov
NASA Goddard Space Flight Center, Code 632
Greenbelt, MD 20771 USA 1-301-286-6707
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: /T3D with TV command
Next Topic: Re: changing colors

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

Current Time: Sat Oct 11 07:07:41 PDT 2025

Total time taken to generate the page: 0.64137 seconds