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

Home » Public Forums » archive » Re: optimization; which point falls into a polygon
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: optimization; which point falls into a polygon [message #68033 is a reply to message #68032] Wed, 23 September 2009 04:38 Go to previous messageGo to previous message
Maarten[1] is currently offline  Maarten[1]
Messages: 176
Registered: November 2005
Senior Member
On Sep 22, 11:57 pm, Klemen <klemen.zak...@gmail.com> wrote:

> I am working with geostationary satellite data and some GIS rasters.
> The satellite data do not have a regular sampling (pixel has a form of
> a parallelogram) but I know corner coordinates of each pixels.
>
> I would like to do some kind of spatial join - I would like to know
> which of my pixels in GIS rasters (regularly sampled) fall into each
> satellite pixel – I would like to create a raster where each GIS pixel
> contains an index of the corresponding satellite index.

[snip]

> Does anybody have a suggestion?

Approach from the other direction.

The IDLanROI class can do this for you. Loop over all Satellite
pixels, and create an IDLanROI object for it, using the corner
coordinates. Use the ContainsPoints method to figure out which GIS
raster point fall in this Satellite grid cell. ContainsPoints is array
aware. Use where on the result, and set the result in your destination
array to the intended value.

Caveats: Since you are geostationary, you won't have to deal with the
poles, but the dateline might be an issue. The correct way is to do
everything in Cartesian coordinates, but I never bothered.

Maarten
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Smoothing 3D array with periodic boundaries: what am I missing?
Next Topic: Re: Point Spread Function Simulation

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

Current Time: Sat Nov 29 23:57:15 PST 2025

Total time taken to generate the page: 0.63874 seconds