Introduction to MapServer Web GIS development environment (c# mapscript tutorial, part 1)

Posted by on July 2, 2006

What is MapServer?

According to MapServer official site:

MapServer is an Open Source development environment for building spatially-enabled internet applications. MapServer is not a full-featured GIS system, nor does it aspire to be. Instead, MapServer excels at rendering spatial data (maps, images, and vector data) for the web.

MapServer was originally developed by the University of Minnesota (UMN) ForNet project in cooperation with NASA and the Minnesota Department of Natural Resources (MNDNR). Presently, the MapServer project is hosted by the TerraSIP project, a NASA sponsored project between the UMN and consortium of land management interests.
The software is maintained by a growing number of developers (nearing 20) from around the world and is supported by a diverse group of organizations that fund enhancements and maintenance.

MapServer main features

The MapServer’s main features are:

    Advanced cartographic output

  • Scale dependent feature drawing and application execution
  • Feature labeling including label collision mediation
  • Fully customizable, template driven output
  • TrueType fonts
  • Map element automation (scalebar, reference map, and legend)
  • Thematic mapping using logical- or regular expression-based classes
    Support for popular scripting and development environments

  • PHP, Python, Perl, Ruby, Java, and C#
    Cross-platform support

  • Linux, Windows, Mac OS X, Solaris, and more
  • A multitude of raster and vector data formats
  • TIFF/GeoTIFF, EPPL7, and many others via GDAL
  • ESRI shapfiles, PostGIS, ESRI ArcSDE, Oracle Spatial, MySQL and many others via OGR
  • Open Geospatial Consortium (OGC) web specifications
  • WMS (client/server), non-transactional WFS (client/server), WMC, WCS, Filter Encoding, SLD, GML, SOS
    Map projection support

  • On-the-fly map projection with 1000s of projections through the Proj.4 library

A good starting point to get other useful informations about MapServer is here.

How to develop with MapServer

MapServer can be used in two ways, with the CGI Interface or with the MapScript API.
Here I will discuss how to implement a MapServer site with MapScript API, accessed by C# MapScript.

MapScript provides a scripting interface for MapServer for the development of Web (ie: ASP :NET, J2EE, PHP, etc…) and stand-alone applications (ie: Windows .NET, Java, etc…). MapScript is used independently of CGI MapServer (in fact we won’t even install the CGI modality), it is a loadable module that adds MapServer capability to your favorite scripting language. MapScript currently exists in Php, Perl, Python, Ruby, Tcl, Java, and C# flavors.

All of these MapScript API where created by SWIG.

SWIG is a software development tool that connects programs written in C and C++ with a variety of high-level programming languages. SWIG is used with different types of languages including common scripting languages such as Perl, PHP, Python, Tcl, Ruby and PHP. The list of supported languages also includes non-scripting languages such as C#, Common Lisp (CLISP, Allegro CL, CFFI, UFFI), Java, Modula-3 and OCAML. Also several interpreted and compiled Scheme implementations (Guile, MzScheme, Chicken) are supported. SWIG is most commonly used to create high-level interpreted or compiled programming environments, user interfaces, and as a tool for testing and prototyping C/C++ software. SWIG can also export its parse tree in the form of XML and Lisp s-expressions. SWIG may be freely used, distributed, and modified for commercial and non-commercial use.

For more information about MapScript’s SWIG API independent language you should consult the Reference.

Share and Enjoy:
  • Digg
  • Sphinn
  • del.icio.us
  • Facebook
  • Mixx
  • Google
  • Furl
  • LinkedIn
  • Reddit
  • StumbleUpon
0 Comments on Introduction to MapServer Web GIS development environment (c# mapscript tutorial, part 1)

Closed