<div>Please bare with my explanation below:</div><div><br></div><div>-------------------------------- </div><div>| | | | </div><div>| 1 | 2 | | <--- 4 </div>
<div>| | | |</div><div>--------------------------------</div><div><br></div><div>Look at the ascii diagram we assume #4 is the large area of the earth described by lat/lon points. #1 and #2 are subsets contained within it. Note that there is no #3.</div>
<div><br></div><div>If I have a table of source data in the following form (just an example):</div><div><br></div><div>id (integer) event_time (timestamp) lat_lon (polygon)<br>3497 1977-01-01 00:00:00 ((-64.997,45.975),(,(-64.9981,<u></u>45.975),(-64.8981,45.875),(-<u></u>64.9978,45.9751))<br>
3431 2007-06-06 01:00:00 ((-64.971,45.982),(-64.921,45.<u></u>982),(-64.972,45.982),(-64.<u></u>973,45.98209),(-64.97,45.<u></u>98237))<br>3498 1977-01-01 00:00:00 ((-64.97838,45.9778),(-64.<u></u>9783,45.97767),(-64.978,45.<u></u>977),(-64.9781,45.97728),(-64.<u></u>9781,45.97714),(-64.977,45.<u></u>976))<br>
...</div><div><br></div><div>What I want to do is pick out the latest event for any paticular area of lat/lon points.</div><div>For example if we assume each number in the ascii daigram is a set of points and the event time is a year we will have:</div>
<div>2007 4</div><div>2002 1</div><div>2003 2</div><div><br></div><div>Thus to return the latest points for this data it would simply be #4's lat_lon points.</div><div><br></div><div>If it were this instead:</div><div>
<div>2007 1</div><div>2002 4</div><div>2003 2</div></div><div><br></div><div>We would return #1,#2, and the part of #4 that is still visible (doesn't intersect #1 and #2). We would thus be generating a new set of points for #4. I believe this is the trickiest part.</div>
<div><br></div>Any help would be greatly appreciated,<div>Dave</div><div><br><div><br>
</div></div>