One way to implement WebGIS is to use Common Gateway Interface (CGI) technology. On the server side, the CGI application is used to connect the WebServer and the GIS spatial database. The client only needs to use a browser to query and analyze the spatial data. MapServer, a well-known open source GIS server tool, uses CGI technology.
MapServer is the main open source web mapping tool used in this book. The main MapServer site is at https://www.mapserver.org/.
Compared to many WebGIS solutions provided by commercial enterprises, MapServer is an open source project. This means that MapServer is free to use and has the right to modify, copy, and redistribute itself. It’s important to note that MapServer is evolving as an open source project; however, the functions have been relatively perfect and the updates have been relatively small in recent years.
Today’s mainstream Linux operating systems such as Debian, Ubuntu, and other band MapServer versions are 7.0 or older. This book is based on a later version of MapServer 7.0. Newer versions tend to have new features and discard unreasonable designs. There is no MapServer in Redhat Linux, Centos, and needs to be compiled and installed.
This chapter explains the installation and configuration of MapServer to understand basic usage and related tools, how to generate map pictures, and how to access it over the Web. Once you have established MapServer, you need to tell it where all resources are located and ensure that all permissions are set correctly. This book will try to keep the application simple, easy to explain, and easy to debug when errors occur.
MapServer’s core program is used to generate maps based on geospatial data, configuring the capabilities that use CGI, and giving it the capabilities of WebGIS. MapServer supports several standards of the OGC Association, supporting distribution and interoperability. Whether you set up MapServer MapScript using the MapServer CGI module or service-side scripting language, dynamic interaction symmanobes on the service side with the customer’s browser can be achieved.