Mapserver: Difference between revisions

From Wildsong
Jump to navigationJump to search
Brian Wilson (talk | contribs)
mNo edit summary
Brian Wilson (talk | contribs)
mNo edit summary
Line 22: Line 22:
Here is a doc on [http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?MapServerCompilation MapServerCompilation]
Here is a doc on [http://mapserver.gis.umn.edu/cgi-bin/wiki.pl?MapServerCompilation MapServerCompilation]


== Components ==
== Server ==


'''Web application API'''
I built a special Web server to run MapServer for two reasons.
 
I build a special Web server to run MapServer for two reasons.
First, I generally run MySQL not PostgreSQL due to the requirements of  
First, I generally run MySQL not PostgreSQL due to the requirements of  
other packages that I use. I might think PostgreSQL is better than MySQL
other packages that I use. I might think PostgreSQL is better than MySQL
Line 35: Line 33:
my other software packages won't work when used with the CGI version of PHP.
my other software packages won't work when used with the CGI version of PHP.


So I build a special version of [http://www.php.net/ PHP] 4.3.9
I use Trustix Secure Linux 2.1 on the map server. I find it to be easy to maintain and
and run it on a dedicated Linux / Apache server.
not bloated like recent versions of Redhat. The support from the Trustix team is excellent.
 
Relevant installed packages with TSL 2.1 include
 
'''Apache 2.0.51''' -- installed from '''apache''' TSL package
 
'''PostgreSQL 7.4.5''' -- installed from '''postgresql'''
and '''postgresql-devel''' TSL packages


GD 2.0.27 Boutell's graphics library (The version with Redhat 1.8.4 is too old. Remove it.)
'''GD 2.0.27''' Boutell's graphics library is not available through Trustix.
[http://httpd.apache.org/ Apache] Web server 2.0.51
The Redhat version is outdated too -- you need GD version 2.  
So I built it myself. I had to install the '''zlib-devel''' package to get it to compile on TSL.


'''PHP''' As mentioned above I have to build [http://www.php.net/ PHP] 4.3.9
as a CGI -- the TSL version is a module. Building PHP required installing these TSL packages: '''flex''',


(Newer versions are available for both Apache and PHP but these work for me.)
The options I used for the PHP configure script are:


'''Projections'''
<pre>
./configure \
        --with-pear \
        --with-regex=system \
        --with-zlib \
        --with-gettext \
        --with-xml \
        --with-pgsql
</pre>


[http://proj.maptools.org/ PROJ] 4.4.8 installed from RPM for Redhat.
This is a bit minimal for me. Usually I build in a lot more features but
then again, normally I load PHP as a SAPI module so it does not matter if it's a bit
bulky. To run it as a CGI I want it to load as fast as possible so I leave nifty
extra features like internal support for JPEG's and PNG's turned off. Maybe I should
turn off XML support too...


This package offers commandline tools and a library for performing respective
Projections - [http://proj.maptools.org/ PROJ] 4.4.8 installed from RPM for Redhat.
forward and inverse transformation of cartographic data to or from cartesian
Proj includes a library for performing respective forward and inverse transformation of cartographic data to or from cartesian data with a wide range of selectable projection functions.
data with a wide range of selectable projection functions.


'''Raster support'''
Map file support -- Raster and Vector files


[http://www.gdal.org/ GDAL] 1.2.3<br>
[http://www.gdal.org/ GDAL] 1.2.3<br>
Line 58: Line 77:
GDAL is a translator library for [http://www.gdal.org/formats_list.html raster geospatial data formats].
GDAL is a translator library for [http://www.gdal.org/formats_list.html raster geospatial data formats].


I built it with './configure; make'.
[http://ogr.maptools.org/ OGR] The OGR library is a subcomponent of GDAL so you don't need to worry about it if you install GDAL.  The OGR Simple Features Library allows MapServer users to display several types of vector data files in their native formats. For example, MapInfo Mid/Mif and TAB data do not need to be converted to ESRI shapefiles when using OGR support with MapServer.


'''Vector support'''
I built the entire GDAL package with './configure; make'.


[http://ogr.maptools.org/ OGR] The OGR library is a subcomponent of GDAL so you don't need to worry about it if you install GDAL.  The OGR Simple Features Library allows MapServer users to display several types of vector data files in their native formats. For example, MapInfo Mid/Mif and TAB data do not need to be converted to ESRI shapefiles when using OGR support with MapServer.


PostGIS
PostGIS


[http://www.postgresql.org/ PostgreSQL] 7.4.5-2 installed from RPMs for RH-9
[http://www.postgresql.org/ PostgreSQL] 7.4.5-2 installed from RPMs for RH-9

Revision as of 02:49, 4 October 2004

MapServer web site

MapServer is for building Web-based GIS applications.

What can I do with MapServer? It can act as a WMS. It can act as a WFS.

What is a WMS? An OGC-compliant "Web Map Server"

What is a WFS? An OGC-compliant "Web Feature Server" allows WFS clients to access feature sets from the WFS instead of entire maps.

You can combine it with other components to enhance its functionality. This page documents my set up at http://mapserver.seafloor.org/

Installation

The INSTALL file has this text in it: "Visit http://mapserver.gis.umn.edu/ for full documentation and installation instructions." It took me a good 30 minutes to find any useful documentation at the UMN site!

Look in their MapServerWiki. Here is a doc on MapServerCompilation

Server

I built a special Web server to run MapServer for two reasons. First, I generally run MySQL not PostgreSQL due to the requirements of other packages that I use. I might think PostgreSQL is better than MySQL but the other packages don't support it.

Second, the current version of MapServer requires that PHP be run as a CGI instead of as a loadable Apache module. For MapServer this is not a big deal but again some of my other software packages won't work when used with the CGI version of PHP.

I use Trustix Secure Linux 2.1 on the map server. I find it to be easy to maintain and not bloated like recent versions of Redhat. The support from the Trustix team is excellent.

Relevant installed packages with TSL 2.1 include

Apache 2.0.51 -- installed from apache TSL package

PostgreSQL 7.4.5 -- installed from postgresql and postgresql-devel TSL packages

GD 2.0.27 Boutell's graphics library is not available through Trustix. The Redhat version is outdated too -- you need GD version 2. So I built it myself. I had to install the zlib-devel package to get it to compile on TSL.

PHP As mentioned above I have to build PHP 4.3.9 as a CGI -- the TSL version is a module. Building PHP required installing these TSL packages: flex,

The options I used for the PHP configure script are:

./configure \
        --with-pear \
        --with-regex=system \
        --with-zlib \
        --with-gettext \
        --with-xml \
        --with-pgsql

This is a bit minimal for me. Usually I build in a lot more features but then again, normally I load PHP as a SAPI module so it does not matter if it's a bit bulky. To run it as a CGI I want it to load as fast as possible so I leave nifty extra features like internal support for JPEG's and PNG's turned off. Maybe I should turn off XML support too...

Projections - PROJ 4.4.8 installed from RPM for Redhat. Proj includes a library for performing respective forward and inverse transformation of cartographic data to or from cartesian data with a wide range of selectable projection functions.

Map file support -- Raster and Vector files

GDAL 1.2.3
GDAL is the "Geospatial Data Abstraction Library". GDAL is a translator library for raster geospatial data formats.

OGR The OGR library is a subcomponent of GDAL so you don't need to worry about it if you install GDAL. The OGR Simple Features Library allows MapServer users to display several types of vector data files in their native formats. For example, MapInfo Mid/Mif and TAB data do not need to be converted to ESRI shapefiles when using OGR support with MapServer.

I built the entire GDAL package with './configure; make'.


PostGIS

PostgreSQL 7.4.5-2 installed from RPMs for RH-9