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

Home » Public Forums » archive » Astronomys` Sixth Neighbour Needs Help
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: Astronomys` Sixth Neighbour Needs Help [message #36207 is a reply to message #36019] Mon, 11 August 2003 14:20 Go to previous messageGo to previous message
google_forums is currently offline  google_forums
Messages: 3
Registered: August 2003
Junior Member
The trick is that I need the closest point that satisfies my condition
(the closest point that has a score -- population or whatnot --
greater than the test station)....

-David


wmc@bas.ac.uk wrote in message news:<3f37b61f@news.nwl.ac.uk>...
> I come across this sometimes. The basis of the solution is usually
> something like:
>
>> lon1=data.longitude & lon1(i)=-999
>> lat1=data.latitude & lat1(i)=-999
>
>> mindist=min(sqrt((lon1-lon1(i))^2+(lat1-lat1(i)^2),j)
>
> That finds you the closest city (j), without using the inner loop, and
> so is much faster. OK, it uses distance in lat-lon space: if you care about
> the exact coordinates you can use convert_coord to get it in whatever
> map projection you are using.
>
> -W.
[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
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: HIST_ND
Next Topic: Getting the errors on the fitted parameters using mpfit2dpeak

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

Current Time: Fri Oct 10 04:10:46 PDT 2025

Total time taken to generate the page: 0.40129 seconds