<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
    <title></title>
  </head>
  <body text="#000000" bgcolor="#ffffff">
    The database schema depends on what you want to do with the data
    (display current position?&nbsp; A track of historical positions?), and
    how much data you expect (how may objects will be tracked?&nbsp; how
    often will they report?).<br>
    <br>
    A simple schema would have one table (e.g. "vehicles"), with one row
    per tracked object<br>
    <br>
    Table: Vehicles<br>
    <br>
    <tt>ID:&nbsp;&nbsp;&nbsp; Name:&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp; Position:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Status:&nbsp;&nbsp; UpdateTime:<br>
      1&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; My Car&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; point(51,-115)&nbsp; active&nbsp;&nbsp;&nbsp; 2011-06-16
      10:23:54+02<br>
      2&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Another Car&nbsp;&nbsp; point(52,-116)&nbsp; inactive&nbsp; </tt><tt>2010-05-15
      11:13:12+02</tt><br>
    <tt><br>
    </tt>With this schema, when a new position arrives for&nbsp; "My Car", an
    update statement is issued to change the row's Position and
    UpdateTime (and possibly Status).<br>
    <br>
    &nbsp; The table is treated as a PostGIS point layer by mapserver.<br>
    <br>
    &nbsp; In my implementations, the position data was updated every 30 to
    60 minutes (they were ships and construction vehicles), so there was
    no need to ask mapserver to regenerate a graphic every second; an
    updated map was shown whenever a user did a pan or zoom.&nbsp; You may be
    able to configure OpenLayers to do a CGI request to mapserver every
    few seconds, but I've never done that.<br>
    <br>
    <pre class="moz-signature" cols="72">Best Regards,
Brent Fraser</pre>
    <br>
    On 6/16/2011 11:52 PM, Saka Royban wrote:
    <blockquote cite="mid:433062.77447.qm@web121619.mail.ne1.yahoo.com"
      type="cite">
      <style type="text/css"><!-- DIV {margin:0px;} --></style>
      <div style="font-family: times new roman,new york,times,serif;
        font-size: 12pt;">
        <div>Thanks a lot brent<br>
          I checked provided link and i;m gonna give it a try.<br>
          About ur helpful advices, i'm confused about how to save data
          in PostGIS? with what schema? <br>
          I mean i have to keep track of each paced point by moving
          objects. Should i record each point as a record, so it means
          one table per moving object ?<br>
          Also for displaying these varaiant data, there should some
          sort of plan. I don't think i'm able to say to MapServer CGI
          at each second connect to PostGIS and read the new data, then
          i have to use MapScript. Am i right? (Can this process be done
          via OpenLayers?)<br>
          <br>
          Best Regards<br>
        </div>
        <div style="font-family: times new roman,new york,times,serif;
          font-size: 12pt;"><br>
          <div style="font-family: times new roman,new york,times,serif;
            font-size: 12pt;"><font face="Tahoma" size="2">
              <hr size="1"><b><span style="font-weight: bold;">From:</span></b>
              Brent Fraser <a class="moz-txt-link-rfc2396E" href="mailto:bfraser@geoanalytic.com">&lt;bfraser@geoanalytic.com&gt;</a><br>
              <b><span style="font-weight: bold;">To:</span></b> Saka
              Royban <a class="moz-txt-link-rfc2396E" href="mailto:sakaroyban@yahoo.com">&lt;sakaroyban@yahoo.com&gt;</a><br>
              <b><span style="font-weight: bold;">Cc:</span></b>
              MapServer <a class="moz-txt-link-rfc2396E" href="mailto:mapserver-users@lists.osgeo.org">&lt;mapserver-users@lists.osgeo.org&gt;</a><br>
              <b><span style="font-weight: bold;">Sent:</span></b> Tue,
              June 14, 2011 7:14:08 PM<br>
              <b><span style="font-weight: bold;">Subject:</span></b>
              Re: [mapserver-users] Asking for guidelines about a
              project<br>
            </font><br>
            <meta http-equiv="x-dns-prefetch-control" content="off">
            <title></title>
            Saka,<br>
            <br>
            &nbsp; I've had good success using PostGIS for data storage in
            implementing tracking systems.&nbsp; While you'll need to create
            your own code for updating the positions in the database,
            mapserver can read points from PostGIS and can render the
            points into a map image for use with the OpenLayers client.<br>
            <br>
            <span> &nbsp; There are other solutions too, like OpenGTS (<a
                moz-do-not-send="true" target="_blank"
                href="http://opengts.sourceforge.net/index.html">http://opengts.sourceforge.net/index.html</a>)</span><br>
            <pre class="moz-signature">Best Regards,
Brent Fraser</pre>
            <br>
            On 6/14/2011 12:08 AM, Saka Royban wrote:
            <blockquote type="cite">
              <div style="font-family: times new roman,new
                york,times,serif; font-size: 12pt;">
                <div>Hi all.<br>
                  Strictly Speaking, i have a project that i should
                  display some moving objects on a map via browser.<br>
                  Generally, i don't know how to start? i mean how
                  should i save these time-based objects in DB and how
                  to retrieve and display them via Mapserver? where
                  should i use client side scripting like OpneLayers?<br>
                  Any help woudbe greatly appreciated.<br>
                  <br>
                  Thanks in advance<br>
                </div>
              </div>
              <pre><fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
mapserver-users mailing list
<a moz-do-not-send="true" rel="nofollow" class="moz-txt-link-abbreviated" ymailto="mailto:mapserver-users@lists.osgeo.org" target="_blank" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><span>
<a moz-do-not-send="true" target="_blank" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
</span></pre>
            </blockquote>
            <meta http-equiv="x-dns-prefetch-control" content="on">
          </div>
        </div>
      </div>
      <pre wrap="">
<fieldset class="mimeAttachmentHeader"></fieldset>
_______________________________________________
mapserver-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a>
<a class="moz-txt-link-freetext" href="http://lists.osgeo.org/mailman/listinfo/mapserver-users">http://lists.osgeo.org/mailman/listinfo/mapserver-users</a>
</pre>
    </blockquote>
  </body>
</html>