map gps coordinates with CGI/ (java or Perl)
P Kishor
punkish at EIDESIS.ORG
Fri Jul 28 19:55:33 PDT 2006
In the spirit of "the simplest thing that could work," you could rig
up a "watch folder" where you could dump your GPS stream (or, even a
"watch file") and set up a Perl script with a constantly open file
handle that would flush the lon/lat to a Shapefile that could then be
taken over by your MapServer application. Don't have to have PostGIS,
although a database would likely make things easier for you with its
triggers and what-nots.
By the way, ogr2ogr will convert your lon/lat into a Shapefile
happily. Dunno if MapServer can read a .ovf file without the interim
conversion. I am skating on thin ice here, so I defer to the washed
masses... I am not that experienced in these tools yet.
On 7/28/06, P Kishor <punkish at eidesis.org> wrote:
> Joel,
>
> I don't have a specific suggestion for you, but I offer the following
> to think about... You asked --
>
> > > I'd like to map GPS lat/long coordinates dynamically through CGI
>
> First, what does "dynamically" mean?
>
> You will have to somehow transfer the lon/lat from the GPS to the
> computer that hosts MapServer. So, that is your first task.
>
> Then you will have to convert the lon/lat into x,y point features that
> MapServer can read. That is your second task.
>
> Then you will have to create an web app that refreshes every few
> seconds in order to be qualified as "dynamically." That is your final
> task.
>
> Your best bet might be to send the GPS stream into a PostGIS database,
> and set up a MapServer map file that reads that data source. Write an
> Ajax-y app that refreshes the map without touching the rest of the
> cruft, and you have a dynamic app.
>
> When you get it all hooked up and working, I would love to see it and
> happily plagiarize it ;-). Better yet, you can write up a nice how-to,
> and attach your app for the rest of us to benefit.
>
> Seriously, search the list archives. If I recall correctly, this kind
> of stuff has been asked, and done before.
>
> On 7/28/06, Joel Thompson <joel at rhinosystemsinc.com> wrote:
> > Hi Guys - sorry to bug you again, but can someone give me some general
> > direction?
> >
> > 1) should I try to manipulate the map file directly through the CGI env?
> > If so, what would a sample map file look like to that showed, say Cities
> > and the lat/lon coordinates that I provide to show a route...?
> >
> > 2) Or do I have to use CGI (perl, php...etc.) w/ its API into the
> > MapScript to execute this some how? Not sure at all how to do this, so a
> > simple sample would be very helpful.
> >
> > 3) or is there some other CGI type tools that does this for me already?
> > IE. Just pass in a list of lat/lon pairs and it would map it out for me?
> >
> >
> > Thanks for you help... I really appreciate it,
> > Joel
> >
> > Joel Thompson wrote:
> >
> > >
> > > Hello,
> > >
> > > I'd like to map GPS lat/long coordinates dynamically through CGI
> > > (preferred JAVA,perl, php, in that order) - I am new to MapServer...
> > > Can you help me to get in the right direction with this? is there any
> > > add-on tools that do this? or is is just done through the .map w/ html
> > > template architecture... where the CGI is used to create the HTML file???
> > > Any samples would be nice... Thanks in advanced.
> > >
> > > -Joel
> >
>
>
> --
> Puneet Kishor http://punkish.eidesis.org/
> Nelson Inst. for Env. Studies, UW-Madison http://www.ies.wisc.edu/
> Open Source Geospatial Foundation https://edu.osgeo.org/
>
--
Puneet Kishor http://punkish.eidesis.org/
Nelson Inst. for Env. Studies, UW-Madison http://www.ies.wisc.edu/
Open Source Geospatial Foundation https://edu.osgeo.org/
More information about the MapServer-users
mailing list