Map Window Overview
Map Window Overview
Introduction
MapWindow is a "Programmable Geographic Information System" that supports manipulation,
analysis, and viewing of geospatial data and associated attribute data in several standard GIS
data formats. Developed by a team of programmers, engineers, and scientists at Utah State
University, MapWindow is a mapping tool, a GIS modeling system, and a GIS application
programming interface (API) all in one convenient redistributable package. MapWindow was
developed to address the need for a GIS programming tool that could be used in engineering
research and project software, without requiring end users to purchase a complete GIS system or
become GIS experts.
For example, a researcher or company may want to deploy a tool that lets users build and interact
with maps of GPS data overlaid on USGS quad maps. One approach is to build the tool as an
extension to a popular GIS software and then require users to purchase that software to run the
extension. Alternatively, the company could use MapWindow as a platform and build a
specialized application that does the needed function and then give it directly to end users with
no need for third party software purchases.
The basic MapWindow graphical user interface (GUI) looks like this:
By default, the layout includes a map area (white box at the right), a legend pane, and a preview-
map pane. Additionally, built-in toolbar buttons allow you to create, save and open MapWindow
project files (collections of data layers), print, and navigate around the map. Navigation tools
include pan, zoom-in, zoom-out, zoom-to-selected-layer, zoom-to-selected-shapes, zoom-to-full-
extents, etc. A tool bar button for adding and removing data layers from the map, as well as a
"selection" tool, are also included in the default layout. The MapWindow GUI also includes
dockable windows and editable menus.
MapWindow Plug-ins
MapWindow has an extensible architecture that allows for plug-ins to add functionality using
Visual Basic .NET or C#. Plug-ins included with the base MapWindow installation include:
In addition to these, a variety of plug-ins have been developed or are currently under
development at USU for specific hydrologic and environmental modeling applications such as
watershed delineation, analysis of instream flows and fish habitat, development of Watershed
Information Systems, development of analysis modeling systems and decision support systems,
as well as other custom data analysis.
There are many cases where it may be useful for users to write their own plug-ins. For example,
users may want to write a plug-in to:
A standard plug-in interface has been developed for users to create their own plug-ins for
MapWindow, and this interface enables the seamless integration of these plug-ins with the
MapWindow application. Custom plug-ins can be packaged with the MapWindow application
and datasets in a software installation to provide users with custom GIS functionality and data
analysis.
The MapWinGIS.ocx ActiveX control can be used by programmers wherever a GIS map or low
level access to spatial datasets is needed within a custom application. For example, a
programmer can add the core MapWindow component to a form where spatial data is displayed
according to input from the user. An example of this is shown below – the map responds to
changes in inputs supplied by the user.
Another use of the MapWinGIS.ocx ActiveX control is providing low level access to spatial
datasets for modeling purposes. For example, the ActiveX control can be used to open spatial
datasets such as grids in code and then the programmer can manipulate the values within the grid
or create a new grid based on the old grid (i.e., create a slope grid based on an elevation grid).
MapWindow provides three basic ways to build and deploy a custom GIS application:
1. Use the core GIS ActiveX component in your own programming language and build an
application from scratch. This would be particularly useful in cases where you have no
need for the full legend or layer management, or you do not want to support plug-ins in
your application.
For example, a State Quarters Map Viewer could be built that uses a hard-coded shapefile
of the United States, and allows users to click on a state and find out all kinds of useful
information about the state, and to look at an image of the State Quarter. A drop-down
list of the years that quarters are release could be somewhere on the form with the map,
and when a user selects a date from the list, all of the states with quarters released that
year are highlighted. Once the software is built, the developer just needs to build an
install package that includes the MapWinGIS.ocx ActiveX component and the needed
GIS data layers.
2. Use the MapWindow application, but edit the configuration file and project file to deploy
a basic GIS data viewer - no programming required. This is the right approach when you
have data layers you want someone to look at, with no particular additional functionality.
For example, you may have several GIS data layers that resulted from an engineering
contract project, and you want to deliver them to your client along with the report. To do
this, you would edit the configuration file to change the title bar, icon, splash screen and
about-box information. Then you edit the project file to include the list of data you want
to be visible along with your chosen color schemes, etc. Finally you burn it all to a CD
with the installation for the MapWindow application and glue it in the back of your
project report.
3. Do #2, but include some pre-built plug-ins to enhance your application. This approach
could be used to deliver a streamflow data analyst, a spatially-referenced photo viewer, or
some other application that could be built by bringing together MapWindow, data, and
existing plug-ins.
With a shape file layer loaded in the map, the user can navigate the map using the left and right
mouse buttons to zoom-in and zoom-out. The MapWindow core component can be more
interesting when you add a few layers of data to it and provide other means for navigation. For
example, with just a few lines of code, the project above can be extended to display this:
The code for the above applicaton is:
These are very basic demonstrations, but they demonstrate some of what the control can do and
how it can be used. Additional functions of the core component ActiveX control include:
• Open, create, edit, and save geo-referenced image, grid, shapefile, and dbf (shape
attribute) data directly
• View, label, color, highlight, shape file data in the map
• Perform spatial queries on the data
• Search for features with specific attributes
• Dynamically edit the spatial data and immediately see the changes in the map
• Interact with the data through the map
• Build TINs from Grids, Images from Grids, Shape files from TINs and Grids, Grids from
Shape files, etc.
• Much, much, more...