Skip to main content

AMW Use Case - Merge of geographical data (GML) with election statistics into SVG

AMW Logo

This use case presents a weaving model used to define a merge operation of a metamodel with geographical information (an extension of GML) and a metamodel with statistical data into a graphical representation (SVG).


Consider the two metamodels Gs and Es from the figure below. Gs contains generic address information plus geographical coordinates. The coordinates are created based on GML (Geographical Markup Language). GML is a standard defined by W3C to represent geographical information. Es contains statistical information about the results of elections, such as the number of voters, absentees, and percentage by candidate.

The goal is to merge these two metamodels into a graphical representation, to able to visualize the election results for every precinct, as shown below. The format choosen is SVG (Scalable Vector Graphics).

Merge overview

This scenario has a particularity: the two input models and the output model conform to different metamodels. This constraint does not enable to directly apply generic algorithms that assume that all models conform to the same metamodel. Thus, we specify the merge operations through declarative weaving models. We illustrate below a weaving model between Gs, Es and a target SVG metamodel. The selected link indicates that the attributes address and city should be concatenated into a location attribute in the SVG metamodel. The SVG metamodel is extended to save the statistical data as well.

Weaving model loaded between GML, Election metamodel and SVG

The third panel is added without any modification on the plug-in code. This is possible because the UI adapts to support several woven models, according to the weaving metamodel extensions. We show below the metamodel extension that supports three metamodels. It has three different references (leftModel, rightModel, targetModel). Each reference corresponds to a different metamodel, and thus a different panel is created.

Weaving metamodel extension with three woven panels

It is possible to have different implementations for each panel. The panels are configured in the third page of the wizard (see below). The user must do the following steps:
  • select the reference (e.g., leftModel)
  • set up the panel implementation (AMW provides a couple of standard implementations based on threes).
  • set up the WModelRef. This element specifies the identification mechanism used in the woven models, for instance XMI IDs or XPointer.
  • select the woven metamodels and/or models.

Configuration of the three metamodels

Download and examples


This example contains a weaving model that specifies the merge of the election metamodel and GML.

Example HowTo

This document contains step-by-step instructions explaining how to execute the example.

Related use cases


Matching is the generic process that creates weaving models. This use case gives a general overview of the matching process, and how it is handled by AMW and ATL.

Tool interoperability

This use case shows how weaving models are used to capture the semantic heterogeneities between different tools' metamodels. We use two well known bug tracking tools, Mantis and Bugzilla.

Metamodel comparison

This use case demonstrates how weaving models are used to compare different metamodels and to produce executable model transformations (we use two metamodels used to define embedded software in the avionics industry).

Bridge between SQL and KM3

This use case shows how weaving models and model transformations are used to translate SQL-DDL (Data Definition Language) into KM3 (a modeling technical space) and to translate KM3 into SQL.

Relational DB to XML

This use case shows how weaving models can be used to perform the data mapping between relational DBs and XML.

Bridge between DSL and UML Profiles

This use case shows how AMW and ATL are used to produce a bridge between Domain Specific Languages (DSLs) and UML profiles.

Back to the top