Simply trying to construct an if statement asking whether a longitude/latitude coordinate for an image is located within a rectangular section.
for i = 1:number_of_images if (im_lat(i) > lat_D && im_lat(i) < lat_A) && (im_lon(i) > lon_A && im_lon(i) < lon_B) ... end end
Where A is the top left corner of the rectangle, B is the top right, and D is the bottom left. I'm curious if there is an easy way of revising this statement. There may also be functions that do this, such as inpolygon; however, I'm not sure how to integrate anything like this with my current format. I greatly appreciate any information you are able to provide.
Best Answer