% Template GRASS newsletter - Article
% Language: Latex

\title{Introducing the MapWindow GIS Project}
\author{by Daniel P. Ames, Christopher Michaelis and Ted Dunsford}

\maketitle

\section{Introduction}
\label{sec:label_of_your_section}

MapWindow is an open source geographic information system (GIS) and an application programming interface (API) distributed under the Mozilla Public License (MPL), built upon the Microsoft Dot Net Framework 2.0. The project is maintained by an active group of international developers who regularly release updates and bug fixes through the \url{MapWindow.org} web site.\footnote{MapWindow web site: \url{http://www.mapwindow.org}}

In 2005, the United States Environmental Protection Agency adopted MapWindow as the core GIS platform for its BASINS watershed analysis and modeling software which is used by environmental professionals at all levels of U.S. government and internationally. This was followed by adoption at the United Nations University and many other governmental, non-profit, and commercial entities throughout the world. Indeed, from November 2006 through July 2007 the software was downloaded over 60,000 times and has over 7,000 members on the opt-in mailing list. There are also currently 630 subscribers to source code commit notification mailing lists, and 43 regular source code committers.

The MapWindow components and end user application support manipulation, analysis and viewing of geospatial data in many standard GIS data formats. Hence, MapWindow is a mapping tool, a GIS modeling system, and a GIS API, in a redistributable open source form that is appealing for its simplicity of use and for running on Microsoft Windows. This paper presents the project history, current status, key elements and future plans. 

\section{Project Background }
\label{sec:label_of_your_section}

In 1998, researchers at Utah State University in Logan, Utah, USA were using MapObjects LT 1.0 from Environmental Systems Research Institute (ESRI) as a GIS component in several research projects. However, restrictive redistribution licenses and the inability to edit vector or attribute data files or display and interact with raster data became significant barriers to use of this component.

\begin{figure*}[htbp]
   \centering
   \includegraphics[scale=0.8]{./project_spotlight/ames/MapWindowFigure1.png}
   \caption{Basic MapWindow interface with Shapefile Editor enabled.}
   \label{fig:label_of_your_image}
\end{figure*}

Indeed, dynamic and interactive functions that require low level access to spatial data were not well-supported in freely distributable Windows-based GIS programming components at that time. An alternative approach for these projects was to move to a proprietary desktop GIS system (e.g. ArcView 3.1), writing the needed tools as extensions. However, many applications in environmental science and engineering are more suited to a standalone environment due to the need to distribute the tool to individuals who do not own a desktop GIS or are not GIS experts.

The core MapWinGIS component was developed to meet this need for an alternative to existing proprietary GIS components. MapWinGIS is an ActiveX control that gives full ability to display, query, manipulate, and use spatial data. Because of the engineering-oriented nature of the projects that necessitated its development, MapWinGIS was particularly optimized for rapid display of data and is intended to be a fully functional model interface, not simply a map viewer. Development focuses included high-speed image and raster display, limiting the amount of re-drawing, and including APIs for low-level access to spatial data.


The MapWindow GIS desktop application wraps all of the MapWinGIS ActiveX functionality, providing end users with a common legend, toolbar and a consistent interface that can be extended by adding plug-ins or a customized configuration file. In short, MapWinGIS ActiveX was built to add GIS functionality to custom end user applications and MapWindow GIS desktop was built to help users deploy GIS-enabled applications assembled from pre-built plug-ins and datasets.

\section{Project Description}

\subsection{MapWindow GIS Application}

The MapWindow application is a lightweight spatial data viewer with an intentionally slim default interface intended to simplify its use and improve adaptability to specific uses. The main GUI and functionality can be extended through plug-ins and scripts which add capabilities as needed. Also the default application itself can be customized to change the look, feel and even its title-bar name at runtime.
By default, the MapWindow layout includes a map, a legend, and a preview-map. Built-in toolbar buttons allow one to manage project files (collections of data layers), to print, and to navigate the map. Figure 1 shows the MapWindow interface with the Shapefile Editor plug-in enabled and with the title bar customized for a specific project. Both open source and commercial plug-ins have been developed by users worldwide for a variety of applications; many of these are available for download from the MapWindow.org web site.

\begin{figure}[htbp]
   \centering
   \includegraphics[scale=0.7]{./project_spotlight/ames/MapWindowFigure2.png}
   \caption{A Simple Mapping Application}
   \label{fig:label_of_your_image}
\end{figure}


In addition to building plug-ins, one can customize the look and feel of the MapWindow application by changing the included \textit{default.mwcfg} XML configuration file. Changes to this file can affect title bar, splash screen, about box, plug-in loading and window layout settings, among others.
An XML project file allows users to save a list of loaded data layers and session settings. The \textit{Newton Reservoir Information System} project in Figure 1 is an example project included in the MapWindow installation package. All of the data loaded into MapWindow and all settings (e.g. symbology, loaded plug-ins, and project projection), are saved to the project file.

\subsection{MapWindow Plug-ins }

MapWindow has an extensible architecture that allows developers to write plug-ins to add functionality using Dot Net compatible languages such as VB.Net or C\#.  This is done by implementing a specific plug-in interface in a custom DLL file which is placed in the application directory and automatically detected at runtime.  Plug-ins can also be written and compiled directly in the MapWindow plug-in editor eliminating the need for an external development environment. 
The MapWindow plug-in interface provides extensive capabilities allowing the developer to use as little or as much as needed to accomplish a particular goal. Default plug-ins packaged with MapWindow include tools for editing shapefiles and attributes, identifying features and performing common geoprocessing tasks. 
Plug-in developers retain all copyright and licensing rights for their work and hence can redistribute their products as proprietary, open source, or otherwise as needed.  

\begin{figure}[htbp]
   \centering
   \includegraphics[scale=1]{./project_spotlight/ames/MapWindowFigure3.png}
   \caption{MapWindow 5 Component Diagram}
   \label{fig:label_of_your_image}
\end{figure}

\subsection{MapWindow ActiveX Control}

The core MapWindow component is an ActiveX control, \textit{MapWinGIS.ocx} that can be used in Visual Basic or any language that supports ActiveX (e.g. C\#, Microsoft Access, Microsoft Excel). MapWinGIS  has been optimized for fast image and raster display, limiting the amount of redrawing, and including APIs for low-level access to spatial data.  A simple Visual Basic program using the control and just a few lines of code is shown in Figure 2.



\section{Ongoing Development and Future Plans}
\label{sec:label_of_another_section}

Development plans for MapWindow include a component structure upgrade in version 5.0. This version focuses on incorporating the Geospatial Data Access Library (GDAL) and OGR Simple Feature Library for additional data format support, and Net Topology Suite (NTS) for topological support. Version 5.0 also targets OGC compliance and improved modularization. An ASP.Net-based web component for performing online mapping and geoprocessing has also been introduced. 

Version 5.0 also introduces an interface layer around every component. By doing this, any given component (e.g., MapWindow.Data) may be replaced with a third-party component if needed. Indeed any code that implements the specified interfaces will be compatible with other MapWindow 5.0 components. 

Finally, MapWindow 5.0 components are designed and written entirely in Microsoft Dot Net code (Managed C $++$, C\#, and VB.Net) except for linked-in components (GDAL and OGR) which are maintained in their native form. This eliminates many long-standing problems with COM registration on the Windows platform. An overview diagram of the planned MapWindow 5.0 components and linkages is shown in Figure 3.



\section{Conclusion}

The MapWindow GIS project is a dynamic and active effort to build and distribute open source GIS tools that integrate tightly with the Microsoft Windows operating system.  Supported by a large number of commercial and non-commercial funding sources, volunteer developers, and student research activities, this project is expected to grow in the foreseeable future and continue to be a model of a successful open source for geoinformatics software development and use. 


\address{Daniel P. Ames\\
Idaho State University\\
\url{http://www.hydromap.com/}\\
\email{dpames AT gmail.com}}

\address{Chris Michaelis\\
Idaho State University\\
\url{http://www.happysquirrel.com/}\\
\email{cmichaelis AT happysquirrel.com}}

\address{Ted Dunsford\\
Idaho State University\\
\url{http://www.MapWindow.org/}\\
\email{hadunsford AT mapwindow.org}}

%%% Local Variables: 
%%% mode: latex
%%% TeX-master: main_document.tex
%%% End: 

