omoa object model

A map is a map is a map… An omoa Map is a central controller / dispatcher object too. Maps usually consist of layers of images and symbols that visualize geographic data or statistics. The omoa Map is the place where all of these elements, visual or not, come together: MapFrames, Layers and Models…

The thing that actually draws a map on the screen is called MapFrame. A Map may have multiple MapFrames. There is common cartographic technique called “small multiples”, where multiple maps are drawn side by side (for example to allow for comparison of time series data). Omoa supports this technique by design, so think of a simple, single map as a special case, a “not-so-multiple” map.

Map --(has one or many)-- MapFrame

Even simple maps display a number of spatial data models: Administrative boundaries, rivers, lakes, elevation maps… These models are usually stored in files or databases. The omoa Map can load these data models and store a reference to it. Omoa knows about SpaceModels for geographic data and DataModels for statistics.

Map --(has one or many)-- SpaceModel 

Map --(has one or many)-- DataModel 

Within a MapFrame we use Layers to organize the map display. If you show multiple maps or visualize multiple data sets, many map layers usually look exactly the same. This is the reason why the Map object manages the layers regardless of there visualization. Can you see the advantage? You can reuse a Layer across MapFrames.

Map --(has one or many)-- Layer
MapFrame --(uses one or many)-- Layer

A Layer visualizes exactly one SpaceModel, though there may be several layers in a MapFrame that use the same SpaceModel. Since these models are managed by the map, they are loaded only once.

Layer --(uses one)-- SpaceModel

At the moment there are two basic kinds of Layers in omoa: A SymbolLayer and an ImageLayer. An ImageLayer displays an image file in a rectangular geographic bounding box. You can use this for any kind of raster data like shaded relief maps.

A SymbolLayer is a bit more complex though. It visualizes “real” SpaceModels that store vector data. It does this through the use of Symbols.

SymbolLayer --(uses one or many)-- Symbol

 A Symbol may visualize the geometry of a point coordinate, lines or a polygon feature in any way. Symbols have SymbolProperties like fill color, size, line width, number-of-stripes, whobbly-bobbly-shape, nozzle transparency, finger length, goo viscosity or whatever…

Symbol --(has one or many)-- SymbolProperty

These properties would be useless, if you weren’t able to manipulate them. Now I am sure you will be amazed to find out that Omoa has a concept of PropertyManipulators.

Symbol --(has one)-- PropertyManipulator --(for any)-- SymbolProperty

 In the most simple incarnation such a PropertyManipulator stores a value. This means: Assigning a value of 5 to the property width eventually results in a line width of 5 pixels.

mySymbol.setProperty( mySymbol.WIDTH, new Value( 5 ));

Sounds trivial. And trivial it is. It gets interesting when you think about dynamically assigning colors or sizes based on statistical data. There are other PropertyManipulators that implement certain cartographic and statistical classification routines. One example: The SquarerootClassification queries a value from a statistical DataModel, based upon a “query” string and the actual SpaceModel entity. If it finds a value it calculates the square root and sets the SymbolProperty to the resulting Value.

      new SquarerootClassification("*.females.2011.EMPLOYMENT")

This should be enough knowledge for you to take a look at the examples. However, if you miss something: Please contact us.

todo: development objectives, constraints, runtime behaviour, relationship to Flash display list.