[Mapserver-users] MapInfo to Mapserver with additional data from MySQL

Homme Zwaagstra hrz at geodata.soton.ac.uk
Wed Jan 14 03:37:52 PST 2004


> I am new to the GIS/Mapping field and am researching solutions for a project
> that requires a map-based navigation system to display UK Ordnance Survey
> (OS) grid points on top of maps that originate from MapInfo.

We have built a similar system using OS data but using Mapserver
3.5; my points may not apply to Mapserver 4...

> 
> I downloaded and installed Mapserver with PHP/Mapscript and was impressed by
> the demo set-ups.
> 
> >From what I have read so far, my instinct is that the solution we need is
> achievable using Mapserver.  However, before I spend time in getting to know
> Mapserver and Mapscript in detail, could someone tell me if what I am aiming
> to achieve is possible with the combination of technology that we have
> below, please?

This is achievable. 

> 
> Technology Available:
> 
> 1. MySQL 4.0 (Containing OS Grid points for locations that need to be
> plotted).
> 2. MapInfo  (Contains the map with several different boundary types defined
> - forests, parishes, counties etc.)  The maps are at two scales (1:25,000
> and 1:10,000).
> 3. Mapserver/Mapscript/PHP
> 4. PHP (latest version)
> 5. Apache running on Red Hat Linux 7.2
> 
> 
> System to be developed:
> 
> 1. We need to be able to take the maps from MapInfo and get them into a
> format that can be handled by Mapserver.  Is this possible, and if so, what
> is the best way to do it?

If this data is in vector form then you can use the TAB files directly
in mapserver (through the GDAL OGR driver). I don't think this is the
case with mapinfo rasters; you'd have to convert them to a
georeferenced TIFF or another raster format supported by GDAL.

> 
> 2. We need to be able to plot OS Grid Points stored in the MySQL database
> onto the maps when they are produced in MapServer.  (Is it possible to do
> this, or does map server only display data from the MapInfo export?)

If using MySQL I believe you'll have to use mapscript to extract the
points from the database, convert these points to relative image
coordinates and draw each point onto the image. If you have data in a
different projection to the map projection you will have to reproject
the point data before drawing it.  MySQL 4.1 includes some interesting
support for OpenGIS
(http://www.mysql.com/doc/en/Spatial_extensions_in_MySQL.html) but I
don't think this is accessible from Mapserver yet. PostgreSQL,
however, when spatially enabled using the PostGIS extension can be
used directly as a datasource for Mapserver. This saves the hassle
currently involved with MySQL and points and is well worth a look.

> 
> 3. The user of the web application will then be able to browse the map and
> click on a point that has been plotted against an OSGR and be taken to the
> full details of that location.
> 

This will use mapscript again. If you use a valid datasource
(e.g. PostGIS) you can use the querying functions of Mapserver to
detect whether a point has been clicked on and retrieve associated
attributes. Otherwise I think you'd have to reverse the procedure in
step 2.

> 
> Will it be possible to achieve the required solution with the technology
> available?  If so, any advice/tips/tutorials to assist with achieving the
> solution would be greatly appreciated.
> 
> Thank you in anticipation of your time and help.
> 
> Kind regards,
> 
> Roland



More information about the MapServer-users mailing list