Re: optimization; which point falls into a polygon [message #68027] |
Wed, 23 September 2009 08:56  |
penteado
Messages: 866 Registered: February 2018
|
Senior Member Administrator |
|
|
On Sep 23, 9:11 am, Klemen <klemen.zak...@gmail.com> wrote:
> Thank you both for suggestions, I will try both.
>
>> Is there an analytic expression for the satellite pixel corners, or do
>> you really have to go from the data? I'm trying to figure out if you
>> can directly compute it...
>
> Well, I have a layer containing latitude and longitude of each center
> point - from these coordinates I estimate the corners positions.
See the help on map_proj_forward and map_proj_inverse. They may be
useful to convert between latitude/longitude and pixel values,
depending on how your GIS rasters are sampled. ROIs as suggested above
are a more general way to find if points are in polygons, and are
useful in more situations, so I do not know which way will be more
appropriate for your case.
|
|
|
|
|
|
|
Re: optimization; which point falls into a polygon [message #68212 is a reply to message #68027] |
Fri, 25 September 2009 02:13  |
Klemen
Messages: 80 Registered: July 2009
|
Member |
|
|
> See the help on map_proj_forward and map_proj_inverse. They may be
> useful to convert between latitude/longitude and pixel values,
I process already projected data (Lambert conformal projection). I am
also trying to write a shape file at the same time, so I can check
each pixel to be sure.
I have tried the suggested solutions and I think the optimal for me is
ROI way. It took 27s to get the results on a layer with 200 by 200
pixels; geostatioary image has in this case 74 * 45 pixels.
I have tried also JD's match_2d to get the closest point and then I
wanted to proceed by approach suggested by hethomas, however, it took
me 45s just to compute the closest satellite centre point (without
checking if GIS point really fits into the polygon)...
But I would have gone for such a similar approach if I hadn't asked
you for an advice before. So thank you all.
|
|
|