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

Home » Public Forums » archive » weird behavior of Triangulate
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
weird behavior of Triangulate [message #81286] Fri, 31 August 2012 21:08 Go to previous message
envi35@yahoo.ca is currently offline  envi35@yahoo.ca
Messages: 48
Registered: March 2005
Member
Hi, I'm trying to use GRIDDATA to convert two sets of regular grids
(lat/lon) to a projected grid (Equal Area). The first set of lat/lon
has dimensions of 180 and 720, and spacing of 0.5 deg, with values of
the following:
lat1: 0.25,0.75,1.25, ....89.75;
lon1: -179.750, -179.250, -178.750, ....179.75

The second set of lat/lon has dimensions of 120 and 480, and spacing
of 0.75 deg, with values of:
lat2: 0.75, 1.50, 2.25,...90.0
lon2: -180, -179.25, -178.5, -177.75, ....179.25

The first set works fine, however, I got co-linear error for the
second set. which is weird, as the two sets of lat/lon look similar to
me. (I did try to remove lat=90.0 in the secod set but with no luck!).
Does anybody know why? Here is part of my code:

ysize = Size(lat, /DIMENSION)
xsize = Size(lon, /DIMENSION)
print,xsize,ysize
lats = Rebin(Reform(lat, 1, ysize), xsize, ysize)
lons = Rebin(lon, xsize, ysize)

mapStruct = Map_Proj_Init(111,semimajor_axis=6371228,$
semiminor_axis=6371228,CENTER_LONGITUDE=0.0,
center_latitude=90.0)

xy = Map_Proj_Forward(lons, lats, MAP_STRUCTURE=mapStruct)
x = Reform(xy[0,*], xsize, ysize)
y = Reform(xy[1,*], xsize, ysize)

Triangulate, x ,y, triangles, TOLERANCE=1.0

Thanks,
Jenny
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: how to smooth a data set with proper window
Next Topic: Re: how to smooth a data set with proper window

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

Current Time: Wed Oct 08 17:00:28 PDT 2025

Total time taken to generate the page: 0.00469 seconds