1 / 34

MapWindow 6.0: An Extensible Architecture for Cartographic Symbology

FOSS4G Conference October, 2009. MapWindow 6.0: An Extensible Architecture for Cartographic Symbology. Ted Dunsford. Ted Dunsford Graduate Research Assistant Idaho State University with Dr. Dan Ames, in collaboration with U.S. Environmental Protection Agency,

sari
Download Presentation

MapWindow 6.0: An Extensible Architecture for Cartographic Symbology

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. FOSS4G Conference October, 2009 MapWindow 6.0: An Extensible Architecture for Cartographic Symbology • Ted Dunsford

  2. Ted Dunsford Graduate Research Assistant Idaho State University with Dr. Dan Ames, in collaboration with U.S. Environmental Protection Agency, AQUA TERRA Consultants, and CUAHSI

  3. Overview • MapWindow 6.0 & Component Architecture • Extensibility & Interfaces • Extensible Symbology Architecture

  4. MapWindow 4 ActiveX Control The Map Window 4 project is a windows project that started with the idea of an ActiveX control. • Very easy to use. • Drag and drop files to open them. • Built in zooming an panning. • Works with a large number of languages.

  5. MapWindow 4 Application • Strictly 2D • Requires ActiveX • Supports one plug-in interface that controls the entire application. • Fast C++ drawing but limited symbology • Slow data manipulation

  6. The Curent Project: • MapWindow 4.x • Our Legacy Open Source project wrapping an ActiveX control • MapWindow 5.x • Our Dot Net Web Mapping Tools • Community Code • No ActiveX control dependencies • Modular • Extendable • Versatile

  7. Components Component Based Architecture Lets you…

  8. Drag and Drop a New GIS! • Tool Strip • Pre-Loaded Buttons • Status Strip • Handles Progress Messages

  9. Drag and Drop a Map

  10. Drag’n Drop a Legend

  11. Wire Controls Together • Properties Right on the Controls allow them to link together.

  12. Even Plug-in Management!

  13. Interfaces Original Object Interface Color Width Height

  14. Extensibility Interface Unknown Object Color ??? Width Height

  15. MapWindow Defines Interfaces MapWindow Interface Plug-in Color Width Height Plug-ins provide new code that satisfies standardized interfaces.

  16. Interfaces Define the Plug-in MapWindow Application MapWindow Interfaces www.ioffer.com MapWindow searches for classes that implement specific interfaces by using System.Reflection

  17. Managers Wrangle Plugins • Plugins do the work: • Loading data • Performing a process • Handle events • Managers decide which provider gets used. deutsch.istockphoto.com

  18. Feature Symbology Feature Layer Symbolizer (default) Symbology Feature Scheme Categories Feature Category Collection [0] Feature Category 0 Symbolizer [1] Feature Category 1 Symbolizer FeatureSet

  19. Point Symbolizers GetColor() Point Category Point Symbolizer Symbols Filter Expression [1] Character Symbol List<ISymbol> [0] Your Symbol

  20. Symbolizers Stack Symbols

  21. Built In Point Symbols

  22. Simple Point Symbols • Simple Symbols: • Color • Shape • Symbols • Size • Offset • Angle • Outline Symbols • Outline Color • Outline Width • Use Outline

  23. Character Point Symbols • Character Symbols: • Character • FontFamilyName • Color • Style • Symbols • Size • Offset • Angle * True Type fonts are scalable vectors, and many are symbolic.

  24. Picture Point Symbols • Picture Symbols: • Image • ImageFilename • Opacity • Symbols • Size • Offset • Angle • Outline Symbols • Outline Color • Outline Width • Use Outline

  25. Multiple Layers in Action

  26. Point Categories • Symbolizer • Selection Symbolizer • Filter Expression

  27. Filter Expressions PointCategory smallSize = newPointCategory(Color.Blue, PointShapes.Rectangle, 4); smallSize.FilterExpression = "[Area] < .01"; smallSize.LegendText = "Small Cities"; PointCategory largeSize = newPointCategory(Color.Yellow, PointShapes.Star, 16); largeSize.FilterExpression = "[Area] >= .01"; largeSize.LegendText = "Large Cities";

  28. Multiple Categories

  29. Make Your Own ISymbol • Step 1: Implement ISymbol • public class Symbol :ISymbol • Step 2: Draw • public void Draw(Graphics g, doublescale) • { • Rectanglebounds = new Rectangle(-5, -5, 10, 10); • g.DrawEllipse(Pens.Black, bounds); • }

  30. UI for Custom Symbols • Property Grid • Built in to .Net • Customizable Editors • Adapts to Any Object • Reflection • Use System.Reflection • More Design Control • Much more effort

  31. Save and Load Custom Symbols using MapWindow.Serialization; Add Reference Add an Attribute Tag [Serialize("PointShapes")] publicPointShapes PointShape { get { return _pointShape; } set { _pointShape = value; } }

  32. XML File Saves Object Definition • Object Types Cached At The Top • Types are re-used <item key="16" value="MapWindow.Drawing.SimpleSymbol, MapWindow, Version=6.0.0.0, Culture=neutral, PublicKeyToken=ca60e6823c3a6ee5" /> <item type="16"> <member name="XmlColor" type="17" value="#227A9A" /> <member name="Opacity" type="18" value="1" /> <member name="PointShapes" type="19" value="Star" />

  33. Upcomming Goals • File-based Vector Formats • OGR Feature Providers • Large scale raster & image handling

  34. Thanks to the U.S. Environmental Protection Agency AQUA TERRA Consultants CUAHSI HIS And Dr. Daniel P. Ames Thanks!

More Related