<div dir="ltr"><div>Hi,</div><div>I'm trying to resolve a not easy (for me) problem.</div><div>We are developing a GPS tracking system based on android phones.</div><div>The waypoints transmitted by the devices are stored in a Postgis table called "waypoint_sessione".</div>
<div>The table has this structure.</div><div><br></div><div>TABLE waypoint_sessione</div><div> gid bigserial </div><div> sessione_id bigint number of the session opened by the device (depends by user, truck, device)</div>
<div> time_dataora bigint (unix timestamp)</div><div> elevazione double precision</div><div> direzione double precision</div><div> velocita double precision (speed)</div><div> pdop double precision</div><div> precisione integer</div>
<div> the_geom geometry</div><div> </div><div>My scope is to discover for each session if a user have spent a lot of time, more than 10 minutes, stopped whitin a 150 m buffer from known point.</div><div>When a device is stopped his speed is not zero, so I need to use a speed threshold, tipically 7 Km/h.</div>
<div><br></div><div>I've thought to proceed in this way:</div><div>- Create a buffer form the known point</div><div>- Select the waypoints in the buffer grouping them by sessione_id</div><div><br></div><div>Here is the first doubt.</div>
<div>If the user, it's easy, pass through the buffer more than one time for each session I've to group the waypoints non only by session_id but also for each passage.</div><div>I can't use the gid column because in waypoint_sessione are stored datas from al large number of devices that are transmitting simultaneous. </div>
<div>I could create a polyline for each session and then trim it by the buffer and select the waypoints that are the same of the node of the polyline for each part.</div><div>Is there a simpler way?</div><div><br></div><div>
The step forward is, for each group of waypoints, to discover if I have a consecutive period of more than 10 minutes during wich the speed is below the threshold of 7 Km/h.</div><div>Discover these periods is my goal.</div>
<div><br></div><div>Thanks.</div><div>lorenzo</div><div><br></div><div><div dir="ltr">Lorenzo Perone<div><div>photoblog: <a href="http://lorenzoperone.wordpress.com" target="_blank">http://lorenzoperone.wordpress.com</a></div>
<div>website: <a href="http://blog.spaziogis.it/" style="color:rgb(17,85,204)" target="_blank">http://blog.spaziogis.it</a><br></div>GEO+ <font color="#000000"><span style="line-height:18px">geomatica in Italia </span></font><font color="#1155cc"><span style="line-height:18px"><u><a href="http://bit.ly/GEOplus" style="color:rgb(17,85,204)" target="_blank">http://bit.ly/GEOplus</a></u></span></font><br>
</div></div></div>
</div>