Map Symbol Brewer - Help
Using the Map Symbol Brewer online
The application consists of 3 parts, ordered as follows:
- the File Upload (upload of your data)
- the DiaML Generation (generation of the map symbol description)
- the Map Export (export of the map symbol layer or the symbol description)
File Upload
In this application part you can upload your own data or use a given dataset (map and data of Europe). For more information about the needed file structure read the help points "Structuring Files for Upload", "Structuring Map Information Files" and "Structuring DiaML Files". If you want to use your own data you should upload in minimum your file containing the data and a map information file (or fill the form fields for the corner coordinates) and press the "Upload" button. If you just want to check the functionality of the prototype and play a little bit with the parameters, use the form on the right hand side and press the button "Use test data". If something goes wrong, an error message appears in the status bar. Else, the "DiaML Generation" button becomes active in the main menu.
DiaML Generation
On the left hand side you can see a preview area. You cannot change anything there! Use the menu on the right hand side to choose your options.
The inactive tabs become active, if the options are chosen in the current menu.
The tabs follow a specific order. First, you have to choose the type of the symbol (simple symbol for 1 data value, diagram for more data values). Secondly, you have to choose a primitive and set the primitive attributes. In a third step, the arrangement principle needs to be defined. Step number 4 defines the colors for each part of the map symbol. In the fifth step, select guides for your map symbol (for some symbols this point is not allowed). Here, also interactivity can be added to your map symbol.
Map Export
In the sixth step the generated map symbol description can be downloaded as DiaML file in the XML format. As second export option, you can export the whole map in the SVG format. If you selected interactivity for your map and want to use it offline, you should download the ECMAScript file too and adapt the location of the script to your needs. As alternative, you can export only a SVG group and insert it in your own map.
Generally, you have to click on the links to open the generated files in a new browser window. Note, that the file is shown as text in the new window (for browser compatibility reasons). Just remove the file extension ".txt" from URL, and you can see the code in XML or SVG.
Using the Map Symbol Brewer offline
An offline version of the Map Symbol Brewer is planned, but currently not available. The workflow is the same as in the online version.
Structuring Files for Upload
For the generation of map symbols in the Map Symbol Brewer application the following data file structure (without headline!) is necessary:
coordinateX coordinateY id data1 data2 data3 ... datax
The coordinate entries determine the reference point of the map symbol. They should be stored as numbers in integer or float format. The id is a unique identification number of the appropriate map symbol. Here, place names or number-letter-combinations can be used. The id's should be stored in the text format. Note, that id's must not contain special characters. Furthermore, it is not allowed to start with a number. The data columns can contain your data values for the appropriate point of reference. The entries should be stored as numbers.
The Map Symbol Brewer can import text files with the extensions *.thm, *.txt, *.csv. As separators tabulators, commas and blanks can be used. You can create these text files with a standard text editor, OpenOffice Calc or Microsoft Excel. Also XML files (*.xml) can be read. The XML file should use the following structure:
<data>
<dataset x="-400000" y="-2300000" id="BE" pop0_14="" pop15_24="410.2"
pop25_34="1320.5" pop35_44="1352" pop45_54="978.6" pop55_64="271.2"
pop65_plus="32.5" />
<dataset x="-50000" y="-2900000" id="DK" pop0_14="" pop15_24="445.3"
pop25_34="701.4" pop35_44="709.1" pop45_54="668.4" pop55_64="314.7"
pop65_plus="15.9" />
...
</data>
Determine Corner Coordinates
Look at the following graphic:
The upper left coordinate is the origin point of your map. The lower right coordinate is the destination point of your map. With these coordinates the the extent (width and height) and the area of the map can be calculated. The area is used to adapt the symbol size to the map extent.
Structuring Map Information Files
A map information file contains the X- and Y-coordinates of the map origin and destination point (corner coordinates, see help point "Determine Corner Coordinates" for more information). These points determine the extent of the map. As alternative you can type the coordinates directly in the appropriate form fields. See this example (used for the test data) to understand the structure of a map information file:
<mapinfo xmlns="https://www.oschnabel.carto.net/mapsymbolbrewer"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.oschnabel.carto.net/mapsymbolbrewer
https://www.oschnabel.carto.net/mapsymbolbrewer/schemas/mapinfo.xsd">
<originX>-2576785</originX>
<originY>-5200370</originY>
<destX>3397005</destX>
<destY>-10400660</destY>
</mapinfo>
Structuring DiaML Files
DiaML (Diagram Markup Language) is a XML based language for the description of map symbols. A DiaML file contains all necessary information and attributes to create map symbols, but no data or graphical objects will appear there! See this example (proportional circle) to understand the structure of a DiaML description:
<symbol xmlns="https://www.oschnabel.carto.net/mapsymbolbrewer"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="https://www.oschnabel.carto.net/mapsymbolbrewer
https://www.oschnabel.carto.net/mapsymbolbrewer/schemas/diaml.xsd">
<style id="s1">
<fill>yellow</fill>
<stroke>black</stroke>
<stroke-width unit="pixel">1</stroke-width>
</style>
<primitive id="p1">
<circle proportional="area">
<r scale="dataValue">1</r>
</circle>
</primitive>
<simpleSymbol minSize="2" areaRatio="10.0">
<simpleArrangement>
<centered/>
</simpleArrangement>
<simpleRelation>
<dataRef>YOUR_COLUMN_NAME</dataRef>
<primitiveRef>p1</primitiveRef>
<styleRef>s1</styleRef>
</simpleRelation>
<guides></guides>
<labelData>yes</labelData>
</simpleSymbol>
</symbol>
The same structure is used for diagrams (instead of simpleSymbol, simpleRelation and simpleArrangement diagram, diagramRelation and diagramArrangement will be used.). Validate your DiaML file with the following schema:
More about the Theory behind this Tool
In general, map symbols consist of primitives (e.g. pie sectors). Each primitive is constructed and scaled using data values. These primitives can be arranged with arrangement principles (e.g. around a point of reference). Furthermore, guides like background objects or lines can be added to support the message transported with the symbol. Also graphical properties like colors, patterns and strokes can be applied to the primitives. The result is a layer of map symbols, reflecting the theme in a cartographic way.