Hi Kurt, can you send me some example data that I can use to test the function?<br><br>Rodrigo.<br><br><div><span class="gmail_quote">On 7/1/07, <b class="gmail_sendername">Kurt Schwehr</b> <<a href="mailto:schwehr@ccom.unh.edu">
schwehr@ccom.unh.edu</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Hi All,<br><br>This is only sort of a postgis question, but I figured I'd try here
<br>in addition<br>to the postgres newsgroup.<br><br>I am pretty new to SQL and having trouble trying to formulate a query<br>from what I have been reading in a couple of books (and got a<br>suggestion from a friend that included cursors and is totally over my
<br>head).  I would really appreciate any help getting this figured out.<br><br>I am trying to group track positions from a ship into sections split<br>by gaps of no recorded position from a particular ship for a period of
<br>time (say 60 minutes).  I have a table "position_reports" something<br>like this:<br><br>key SERIAL PRIMARY KEY, ship_id INTEGER, position GEOMETRY, received<br>TIMESTAMP, received_sec INTEGER<br><br>position is a postgis POINT.  The received_sec is the seconds since
<br>the epoc from the original logs that I have converted to a TIMESTAMP.<br>Figure this query might be easier with one over the other?<br><br>The goal is to be able to generate LINESTRINGs from each ship by time<br>block that I record the ship.  Right now, I end up doing a MakeLine
<br>for each ship which joins different passes of the ship through an area<br>(which has ships flying over land quite frequently :)<br><br>1  123 someXY 2007-Jan-05 12:01<br>2  123 someXY 2007-Jan-05 12:04<br>3  123 someXY 2007-Jan-05 12:13
<br><br># more than 60 minutes gap, so split groups here<br><br>4  123 someXY 2007-Jan-05 15:23<br>5  123 someXY 2007-Jan-05 15:46<br>6  123 someXY 2007-Jan-05 15:53<br>7  123 someXY 2007-Jan-05 16:01<br><br>Thanks,<br>-Kurt
<br>_______________________________________________<br>postgis-users mailing list<br><a href="mailto:postgis-users@postgis.refractions.net">postgis-users@postgis.refractions.net</a><br><a href="http://postgis.refractions.net/mailman/listinfo/postgis-users">
http://postgis.refractions.net/mailman/listinfo/postgis-users</a><br></blockquote></div><br>