Everything Java Apache Geospatial Open Source. Hello Shinning Stars!!! Vincent Massol, Raphael Luta, Santiago Gala, Carsten Z.

Thursday, December 01, 2005

I've been studying the data access methods used by MapServer and in theory any ODBC connection can be used to obtain data from a relational database. That's probably what we want. Afterwords all we need is a nifty car icon to indicate the direction that the car is travelling (the direction part may be tricky). MapServer uses SYMBOLS to label geo features using an icon image.

MapServer supports four categories of data access. The first is the basic file method. It can access files of type shape, arcinfo, mapinfo, us census tiger, csv, etc. These are read only methods of accessing data. Other sources could update these files and MapServer would get the updates. This wouldn't be a good idea because there could be a io conflict.

ODBC can be used to access relational databases (SQL Server, Oracle, MySQL, and company)

The third category of data access is not applicable to our work. MapServer can access data provided by a Spatial database engine like ArcSDE, Oracle Spatial, or PostGIS. These solutions provide spatial indexing and special geographic types. I think this is out of our scope. It would take longer to set up, it is more complex to install. I would suggest exploring this option if you expect to address larger clients.

The last thing that I want to tell you about is MapScript. MapServer exposes their application programing interface so that hackers and integraters can do custom things with MapServer in the language of their choice (Java,PHP,Perl,Ruby). We are not using it but It can be used to create maps and plot data, as well as query data. I will deliver you an example that I found on the net.

And lastly, I looked at your database and the GPSActive table looks like it could be plotted on the Map using the ODBC solution. There were duplicates in the table but they had the same latitude and longitude. MapServer will plot all data from the table. If we want to get fancy and label each car with their own icon we will have to read the database using PHP and plot using MapScript. Give me some more thoughts on what you need.

No comments: