[mapserver-users] Asking for guidelines about a project
Brent Fraser
bfraser at geoanalytic.com
Fri Jun 17 08:19:20 PDT 2011
The database schema depends on what you want to do with the data
(display current position? A track of historical positions?), and how
much data you expect (how may objects will be tracked? how often will
they report?).
A simple schema would have one table (e.g. "vehicles"), with one row per
tracked object
Table: Vehicles
ID: Name: Position: Status: UpdateTime:
1 My Car point(51,-115) active 2011-06-16 10:23:54+02
2 Another Car point(52,-116) inactive 2010-05-15 11:13:12+02
With this schema, when a new position arrives for "My Car", an update
statement is issued to change the row's Position and UpdateTime (and
possibly Status).
The table is treated as a PostGIS point layer by mapserver.
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. You may be able to
configure OpenLayers to do a CGI request to mapserver every few seconds,
but I've never done that.
Best Regards,
Brent Fraser
On 6/16/2011 11:52 PM, Saka Royban wrote:
> Thanks a lot brent
> I checked provided link and i;m gonna give it a try.
> About ur helpful advices, i'm confused about how to save data in
> PostGIS? with what schema?
> 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 ?
> 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?)
>
> Best Regards
>
> ------------------------------------------------------------------------
> *From:* Brent Fraser <bfraser at geoanalytic.com>
> *To:* Saka Royban <sakaroyban at yahoo.com>
> *Cc:* MapServer <mapserver-users at lists.osgeo.org>
> *Sent:* Tue, June 14, 2011 7:14:08 PM
> *Subject:* Re: [mapserver-users] Asking for guidelines about a project
>
> Saka,
>
> I've had good success using PostGIS for data storage in implementing
> tracking systems. 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.
>
> There are other solutions too, like OpenGTS
> (http://opengts.sourceforge.net/index.html)
> Best Regards,
> Brent Fraser
>
> On 6/14/2011 12:08 AM, Saka Royban wrote:
>> Hi all.
>> Strictly Speaking, i have a project that i should display some moving
>> objects on a map via browser.
>> 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?
>> Any help woudbe greatly appreciated.
>>
>> Thanks in advance
>>
>>
>> _______________________________________________
>> mapserver-users mailing list
>> mapserver-users at lists.osgeo.org
>> http://lists.osgeo.org/mailman/listinfo/mapserver-users
>
>
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20110617/470d69eb/attachment.htm>
More information about the MapServer-users
mailing list