map projection / poly fill bug [message #4021] |
Wed, 19 April 1995 00:00  |
Ian E. Sprod
Messages: 12 Registered: February 1995
|
Junior Member |
|
|
I have found a bug in IDL when plotting polygons onto
a map projection. If the polygon is on the edge of the
map then streaks of color are drawn from the edge of
the map to the edge of the screen Clearly the coordinate
mapping has gone awry in this case.
the following code demonstrates the problem :
-------------------------------------
pro poly_plot
; set co-ords for polygon in degrees
lat = [0,10,0,-10,0]
lon = [-10,0,10,0,-10]
map_set,10,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
stop
end
---------------------------------------
Note I posted this one about 18 months ago and got a few replies
with ideas to filter out the "edge" polygons and not plot them.
This is not really a fix as the edge of the Earth on some
tilted Orthographic plots is not a simple meridian but some
ill-defined line I would rather not have to calculate.
Anyone else hit this problem?
Any answers? RSI?
Thanks,
Ian Sprod
|
|
|
Re: map projection / poly fill bug [message #4125 is a reply to message #4021] |
Tue, 02 May 1995 00:00  |
Ian E. Sprod
Messages: 12 Registered: February 1995
|
Junior Member |
|
|
stevep@rsinc.com (Steve Penton) wrote:
>
> In article <3n3clr$ng3@post.gsfc.nasa.gov> "Ian E. Sprod"
> <Ian.Sprod@gsfc.nasa.gov> writes:
>> I have found a bug in IDL when plotting polygons onto
>> a map projection. If the polygon is on the edge of the
>> map then streaks of color are drawn from the edge of
>> the map to the edge of the screen Clearly the coordinate
>> mapping has gone awry in this case.
>> Anyone else hit this problem?
>>
>> Any answers? RSI?
>>
> Yes, We are here.
>
> Indeed this is a problem. IDL4.0 gets around this polyfill
> limitation with a horizon clipping algorithm added to
> map_continents (maps in IDL4 include continents as polygons).
>
> Steve Penton
> stevep@rsinc.com
Well this is one IDL user eagerly awaiting his CDROM in the mail
with IDL 4.0 on it!
Could you post a list of _all_ the bug-fixes in IDL 4.0?
ian
|
|
|