SVG Topobase Linked by ID Attribute

Consider an example of a topobase where the link with the territories is based on values of the ID attribute.

<svg version="1.1" xmlns:fs="http://www.fsight.ru" width="800px" height="600px" xmlns="http://www.w3.org/2000/svg">

<g fs:ItemType="Layer" id="Root">

<g fs:ItemType="Layer" id="Regions">

<g id="O1" style="fill: #0000FF; stroke: #FF0000; stroke-width: 1;">

<path d="M255.3767,316.2664 249.8184,318.5767 ... Z" />

</g>

<g id="O2" style="fill: #0000FF; stroke: #FF0000; stroke-width: 1;">

<path d="M396.2842,92.87696 396.4967,93.01862 ... Z" />

</g>

...

</g>

</g>

<fs:MetaInfo>

<fs:Attributes>

<fs:Attribute Name="IdMapping" Type="int">

<fs:Data Id="Regions" Value="100" />

<fs:Data Id="City" Value="1000" />

<fs:Data Id="O1" Value="1" />

<fs:Data Id="O2" Value="2" />

...

</fs:Attribute>

</fs:Attributes>

</fs:MetaInfo>

</svg>

Description

The map has a root layer and a layer with the Regions identifier. Shapes that represent territories are created in the Regions layer. An identifier in the O<ID> format is defined for each shape. The IdMapping attribute is specified in map metadata to define custom values of the identifiers to be assigned to map territories on converting.

Other attributes are not specified, thus on converting territory names and descriptions are not defined, and a default value is assigned to the rest of the attributes.

To use such a map in user applications, load the file to the repository by selecting the following context menu item in the object navigator: New > Other > Map. Select the Convert Topobase item in the context menu of the created object. The map is converted into other formats. Territory dimension of data sources must have an integer attribute with the TERRID identifier. Values of this attribute must match the values specified in the Value attribute of the <fs:Data> element.

On connecting the map in an express report, the link is established automatically.

On connecting the map in a regular report, the attributes must be specified on setting up data adapter.

See also:

Examples