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

Home » Public Forums » archive » Re: Q: Lat/Lon to gridpoint interpolation
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: Q: Lat/Lon to gridpoint interpolation [message #4083] Tue, 25 April 1995 00:00
paul is currently offline  paul
Messages: 22
Registered: June 1991
Junior Member
In article <3ngi2i$6m8@spool.cs.wisc.edu>, Liam Gumley <liamg@ssec.wisc.edu> writes:
|> Hey folks,
|>
|> I have two arrays, one is latitude and the other longitude. These
|> lat/lons correspond to satellite sensor fields-of-view on the earth
|> surface, and are irregularly spaced. I am trying to come up with a method
|> of finding the array indices closest to a given lat/lon, without having to
|> do a search of the lat/lon arrays. This is so that I can lay a coastline over
|> an un-resampled satellite image. I have already found a couple of ways to
|> do it by array searching, and it's a bit cumbersome.
|>
|> I can't figure out how to do it using a simple fitting algorithm. What I want
|> to do is this:
|>
|> lat is an x by y real array
|> lon is an x by y real array
|>
|> I want to find the fractional x, y corresponding to a given lat, lon.
|>
|> Any suggestions?
|>

POLYWARP can be used to find polynomial fit coefficients which will take lat
and lon as inputs and return ix and iy, the satellite sample and line
indecies.

The call to polywarp goes like,

polywarp,xi,yi,lon,lat,degree,kx,ky

where lon and lat are your satellite longitude and latitude fields and
xi and yi are the satellite sample and line indecies they correspond to,
degree is the degree of the polynomial fit (try 2) and kx and ky are the
polynomial coefficients such that

ix=poly_2d(alon,alat,kx)
iy=poly_2d(alon,alat,ky)

This whole procedure will work fine as long as your lat and lon fields aren't
too distorted. You'll have trouble near the geographic poles.


--

____________________________________________________________ _______________
Paul Ricchiazzi email: paul@icess.ucsb.edu
Institute for Cumputational Earth System Science
University of California, Santa Barbara


If I have seen farther than | If I have not seen as far as
others, it is by standing on | others, it is because giants
the shoulders of giants. | were standing on my shoulders.
|
Isaac Newton | Hal Abelson

____________________________________________________________ _______________
[Message index]
 
Read Message
Previous Topic: Ada replacement for Pvwave?
Next Topic: Re: Passing > 64Kb arrays to IDL DLL's

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

Current Time: Sun Nov 30 15:04:37 PST 2025

Total time taken to generate the page: 0.08140 seconds