Skip to main content

Resources

Resources extend LIDS in different way than plugins. They may consist of styles, tool icons, report templates or symbols. The resources for LIDS Edit are often in different format compared to both LIDS Explorer and LIDS Browser. All additional resources needed for project are copied into this metadata directory {project_folder}\lids-as\resources\.

Each resource in individual formats (except exportshp) are referenced in resource.xml. Here the different formats are bound under the common resource identifiers, which can be subsequently referenced in model.xml, thematization.xml, tool.xml or presentation.xml as common definitions.

Example: Structure of resource.xml.

<?xml version="1.0" encoding="UTF-8"?>
<ber:modelResource xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:sld="http://www.opengis.net/sld" xmlns:ber="http://www.berit.com/ber">
<ber:iconArray>
<ber:symbolFontArray>
<ber:lineStyleArray>
<ber:fillStyleArray>
<ber:customResourceArray type="dimStyle">
<ber:customResourceArray type="importDGN">
<ber:customResourceArray type="importSHP">
<ber:customResourceArray type="seedDgn">
<ber:customResourceArray type="symbolLibrary">
<ber:customResourceArray type="report">
</ber:modelResource>

dimstyle

Resource is used for definition of a dimension styles for LIDS Edit. Style is stored in DGN file (e.g. dimStyles.dgn) in {project_folder}\lids-as\resources\dimstyle. This file is referenced in resource.xml.

Example: Reference to a dimstyle file in resource.xml.

<ber:customResourceArray type="dimStyle">
<ber:customResource id="ds_1" name="ft_5031000">
<ber:formatArray>
<ber:format name="dgn" file="dimStyles.dgn" extResId="template_5031000"/>
</ber:formatArray>
</ber:customResource>
</ber:customResourceArray>

exportgeojson

Function "Export to GeoJSON" is used for exporting features into GeoJSON format. Output is ZIP archive containing JSON files - one file for one feature type. In addition to identifications of exported features, all their attribute data and a text for text features are saved to exported files.

A CSV file, which contains a table determining mapping between the property in the JSON file and feature attribute in LIDS, is also saved in the output ZIP archive for each feature type. The table has the following columns:

  • geoJsonName – name of the property in the JSON file,
  • id – identifier of the attribute in LIDS,
  • name – name of the attribute in LIDS,
  • dbName – name of the table (container) column in LIDS.

If geometry of features is of the collection type, one file is created for each type of geometric elements.

Additional files are stored here: {project_folder}\lids-as\resources\exportgeojson.

Configuration of export

The list of exported attributes can be limited by the configuration. The list of excluded attributes is stored in {project_folder}\lids-as\resources\exportgeojson\csv\attribute_exclusion.csv.

Example: attribute_exclusion.csv

at_1;at_2;at_3

It is also possible to define the names of properties in the JSON file with the aid of configuration on the application server: {project_folder}\lids-as\resources\exportgeojson\csv\attribute_name_mapping.csv. If no names are defined, then they are generated automatically during export.

Example: attribute_name_mapping.csv

at_4;District
at_5;City
at_6;Street

exportshp

Function "Export to SHP" is used for exporting features into ESRI Shapefile format. Output is ZIP archive containing DBF, SHP and SHX files - one set for one feature type. In addition to identifications of exported features, all their attribute data and a text for text features, or a symbol for point features are saved to DBF files.

A CSV file, which contains a table determining mapping between the column in the DBF file and feature attribute in LIDS, is also saved in the output ZIP archive for each feature type. The table has the following columns:

  • dbfName – name of the column in the DBF file. Because field name in dBASE table cannot be longer than 10 characters, LIDS has to shorten the longer column names. Numerical postfix is added to the name to prevent duplicate column names,
  • id – identifier of the attribute in LIDS,
  • name – name of the attribute in LIDS,
  • dbName – name of the table (container) column in LIDS.

If geometry of features is of the collection type, one set of files is created for each type of geometric elements.

Additional files are stored here: {project_folder}\lids-as\resources\exportshp.

Configuration of export

The list of exported attributes can be limited by the configuration. The list of excluded attributes is stored in {project_folder}\lids-as\resources\exportshp\csv\attribute_exclusion.csv.

Example: attribute_exclusion.csv

at_1;at_2;at_3

It is also possible to define the names of columns in the DBF file with the aid of configuration on the application server: {project_folder}\lids-as\resources\exportshp\csv\attribute_name_mapping.csv. If no names are defined, then they are generated automatically during export.

Example: attribute_name_mapping.csv

at_4;District
at_5;City
at_6;Street

fillstyle

Resource is used for definition of a fill styles. Style is stored in XML file (e.g. fs_demo.xml) in {project_folder}\lids-as\resources\fillstyle.

There is also a reference to the particular style in resource.xml.

Example: Definition of a fill style.

<ber:hatchPattern id="fs_hatch_1">
<ber:lines>
<ber:distance>5</ber:distance>
<ber:rotation>45</ber:rotation>
</ber:lines>
<ber:lineSymbolizer>
<se:Stroke>
<se:GraphicStroke>
<se:Graphic>
<se:ExternalGraphic>
<se:OnlineResource xlink:href="resource.xml#ls_3"/>
<se:Format/>
</se:ExternalGraphic>
</se:Graphic>
</se:GraphicStroke>
<se:SvgParameter name="stroke-width">2</se:SvgParameter>
</se:Stroke>
</ber:lineSymbolizer>
</ber:hatchPattern>
<ber:hatchPattern id="fs_hatch_2">
<ber:lines>
<ber:distance>0.5</ber:distance>
<ber:rotation>45</ber:rotation>
</ber:lines>
<ber:lineSymbolizer>
<se:Stroke>
<se:GraphicStroke>
<se:Graphic>
<se:ExternalGraphic>
<se:OnlineResource xlink:href="resource.xml#ls_2"/>
<se:Format/>
</se:ExternalGraphic>
</se:Graphic>
</se:GraphicStroke>
<se:SvgParameter name="stroke-width">1</se:SvgParameter>
</se:Stroke>
</ber:lineSymbolizer>
</ber:hatchPattern>

Example: Reference to the style in a resource.xml.

<ber:fillStyleArray>
<ber:fillStyle id="fs_hatch_1" name="Hatch pattern">
<ber:formatArray>
<ber:format name="xml" file="fs_demo.xml"/>
</ber:formatArray>
</ber:fillStyle>
...
</ber:fillStyleArray>

icon

Resource is used for storing icons for tool.xml. Icons are stored in {project_folder}\lids-as\resources\icon. They are divided into subfolders according to the format of the icon. This format (for example “bmp16x16”) is also specified in resource.xml.

The following formats can be used:

_16x16
_32x32
_64x64
bmp
bmp16x16
bmp32x32
bmp64x64
gif
gif16x16
gif32x32
gif64x64
jpg
jpg16x16
jpg32x32
jpg64x64
png
png16x16
png32x32
png64x64

Example: Reference to the icon files in a resource.xml.

<ber:iconArray>
<ber:icon id="ic_e" name="ic_e">
<ber:formatArray>
<ber:format file="ic_e.bmp" name="bmp16x16"/>
</ber:formatArray>
</ber:icon>
...
</ber:iconArray>

Example: Use of the icon in tool.xml.

<ber:toolBoxArray>
...
<ber:toolBox id="Tb_ele" name="Electro">
<ber:description>Tools for electro objects including cross-sections</ber:description>
<ber:icon xlink:href="resource.xml#ic_e"/>
<ber:subToolArray>
<ber:tool refId="ti_e_route0"/>
<ber:tool refId="ti_e_route1"/>
<ber:tool refId="ti_e_route2"/>
<ber:tool refId="ti_e_route3"/>
<ber:tool refId="ti_e_route4"/>
<ber:tool refId="ti_e_pcs1"/>
<ber:tool refId="ti_e_pcs2"/>
<ber:tool refId="csr_1"/>
<ber:tool refId="csr_2"/>
<ber:tool refId="ti_parallelDA3"/>
<ber:tool refId="reduction_route"/>
<ber:tool refId="rel_showRelated3"/>
<ber:tool refId="rel_showRelated_route"/>
<ber:tool refId="rel_showRelated_route_browse"/>
<ber:tool refId="rel_showRelated_cables_browse"/>
</ber:subToolArray>
</ber:toolBox>
...
</ber:toolBoxArray>

importdgn

Resource is used for importing CAD data. Configuration XML files are stored in {project_folder}\lids-as\resources\importdgn. All XML files are subsequently referenced in resource.xml.

Example: XML file used for importing DGN data.

<?xml version="1.0" encoding="utf-8"?>
<ber:elementClassification xmlns="http://www.berit.com/ber" xmlns:ber="http://www.berit.com/ber">
<ber:attributesDefinitionArray>
<ber:attributeDefinition id="attdef_01" name="Hydrant">
<ber:Description>Atributes - Hydrant</ber:Description>
<ber:attribute refId="at_5011002" importType="constant">
<ber:parametersArray>
<ber:parameter name="constantValue" value="1"/>
</ber:parametersArray>
</ber:attribute>
</ber:attributeDefinition>
...
</ber:attributesDefinitionArray>
<ber:graphicsElementClassification xmlns:ber="http://www.berit.com/ber">
<!-- Green line-->
<ber:elementClass typeID="ft_5075000">
<ber:classFields>
<ber:level>Level 2</ber:level>
<ber:graphicType>4</ber:graphicType>
</ber:classFields>
</ber:elementClass>
...
</ber:graphicsElementClassification>
</ber:elementClassification>

Example: Reference to the import files in resource.xml.

<ber:customResourceArray type="importDGN">
<ber:customResource id="idgn_1" name="DGN Import water with DA">
<ber:formatArray>
<ber:format name="xml" file="WaterWithDA.xml"/>
</ber:formatArray>
</ber:customResource>
<ber:customResource id="idgn_2" name="DGN Import various ftypes">
<ber:formatArray>
<ber:format name="xml" file="demo_1009.xml"/>
</ber:formatArray>
</ber:customResource>
</ber:customResourceArray>

importshp

Resource is used for configuring SHP data import. Configuration XML files are stored in {project_folder}\lids-as\resources\importshp. All XML files are subsequently referenced in resource.xml.

Example: XML file used for import.

<?xml version="1.0" encoding="utf-8"?>
<ber:elementClassification xmlns="http://www.berit.com/ber" xmlns:ber="http://www.berit.com/ber">
<ber:attributesDefinitionArray>
<ber:attributeDefinition id="attdef_01" name="Definition 1">
<ber:Description>Attributes - contant</ber:Description>
<ber:attribute refId="at_5080003" importType="constant">
<ber:parametersArray>
<ber:parameter name="constantValue" value="SHP"/>
</ber:parametersArray>
</ber:attribute>
<ber:attribute refId="at_5080002" importType="dbf">
<ber:parametersArray>
<ber:parameter name="columnName" value="ftid"/>
</ber:parametersArray>
</ber:attribute>
</ber:attributeDefinition>
</ber:attributesDefinitionArray>
<ber:graphicsElementClassification>
<ber:elementClass typeID="ft_5083000">
<ber:classFields>
<ber:graphicType>polygon</ber:graphicType>
</ber:classFields>
<ber:attributeDefinition refId="attdef_01"/>
</ber:elementClass>
</ber:graphicsElementClassification>
</ber:elementClassification>

Example: Reference to the import files in resource.xml.

<ber:customResourceArray type="importSHP">
<ber:customResource id="ishp_1" name="SHP Import I">
<ber:formatArray>
<ber:format name="xml" file="demo_03.xml"/>
</ber:formatArray>
</ber:customResource>
</ber:customResourceArray>

linestyle

Resource is used for storing information about line styles.

For more details see chapter User Line Style

report

Resource is used for storing report files (JRXML) and additional files (e.g. XSL or XLSX). Files are stored in {project_folder}\lids-as\resources\report. Reports from this directory are referenced in presentation.xml (for more information see chapter 18).

Example: Reference to the report in presentation.xml.

<ber:reportArray>
<!-- Default dynamic portrait report. Possible output formats: pdf, html, xls, csv, rtf -->
<ber:dynamicReport id="rp_1" name="Default Portrait" orientation="portrait" default="true">
<ber:description>Default Portrait Report Template</ber:description>
<ber:outputFormatArray>
<ber:outputFormat default="true">pdf</ber:outputFormat>
<ber:outputFormat>html</ber:outputFormat>
<ber:outputFormat>csv</ber:outputFormat>
<ber:outputFormat>xls</ber:outputFormat>
</ber:outputFormatArray>
<ber:inputParameterArray>
<ber:inputParameter id="TITLE" name="Report Title">
<ber:description>The report title</ber:description>
<ber:defaultValue>Feature Report</ber:defaultValue>
</ber:inputParameter>
<ber:inputParameter id="MODEL_NAME" name="Model Name">
<ber:description>The name of the project (footer note)</ber:description>
<ber:defaultValue>LIDSdemo</ber:defaultValue>
</ber:inputParameter>
</ber:inputParameterArray>
<ber:templateName>default.template.jrxml</ber:templateName>
<ber:attributeTemplateName>default.template.xsl</ber:attributeTemplateName>
</ber:dynamicReport>
...
</ber:reportArray>

seeddgn

Resource is used for storing seed files for LIDS Edit (used for creating active system file and DGN export) and LIDS Explorer (used for DGN export). Files are stored in {project_folder}\lids-as\resources\seeddgn. Seed files are referenced in resource.xml.

Example: Reference to the seed file in resource.xml.

<ber:customResourceArray type="seedDgn">
<ber:customResource id="seed_1" name="Project seed">
<ber:formatArray>
<ber:format name="dgn" file="seedDEMO.dgn"/>
</ber:formatArray>
</ber:customResource>
</ber:customResourceArray>

symbolfont

Resource is used for storing information about symbol styles. Configuration XML files for LIDS Explorer and Browser (e.g. ber_LIDSdemo77.ttf) are stored in {project_folder}\lids-as\resources\symbolfont\ttf. Style files for LIDS Edit (e.g. fonts.rsc) are stored in {project_folder}\lids- as\resources\symbolfont\rsc. Fonts are subsequently referenced inresource.xml, thematization.xmlandmodel.xml.

Example: Reference to the font in resource.xml.

<ber:symbolFontArray>
<ber:symbolFont id="ber_LIDSdemo" name="ber_LIDSdemo">
<ber:formatArray>
<ber:format file="ber_LIDSdemo.ttf" name="ttf"/>
</ber:formatArray>
</ber:symbolFont>
...
<ber:symbolFont id="ber_LIDSdemo77" name="ber_LIDSdemo77">
<ber:formatArray>
<ber:format file="ber_LIDSdemo77.ttf" name="ttf"/>
<!--Following definition:
- assigns symbol font ber_LIDSdemo77 to source RSC font "Font77" from "fonts.rsc", when reading DGN file
- tells to use RSC font "font77" from "fonts.rsc", when symbol font ber_LIDSdemo77 is used during DGN export-->
<ber:format extResId="font77" file="fonts.rsc" name="rsc"/>
</ber:formatArray>
</ber:symbolFont>
...
</ber:symbolFontArray>

Example: Reference to the symbol in thematization.xml.

<ber:featureTypeStyleArray>
...
<ber:featureTypeStyle id="st_t_rcont_1" name="Rack Contact">
<ber:description>Dynamic color</ber:description>
<se:FeatureTypeName>ft_telco_contact</se:FeatureTypeName>
<ber:combinedRule id="st_t_rcont_1_1" name="None">
<ber:pointSymbolizer>
<se:Graphic>
<se:ExternalGraphic>
<se:OnlineResource xlink:href="resource.xml#ber_LIDSdemo/35/center-center"/>
<se:Format/>
</se:ExternalGraphic>
</se:Graphic>
<ber:rgbColor>
<ber:directLookup fallbackValue="#2AFF00">
<se:LookupValue>
<ogc:PropertyName>at_telco_color</ogc:PropertyName>
</se:LookupValue>
</ber:directLookup>
</ber:rgbColor>
</ber:pointSymbolizer>
</ber:combinedRule>
</ber:featureTypeStyle>
...
</ber:featureTypeStyleArray>

Example: Reference to the symbol in model.xml.

<ber:graphicTypeArray>
...
<ber:graphicType id="freegt_02" name="Scheme">
...
<ber:graphicTypeComponent id="freegt_02_03" name="Point full">
<ber:pointGraphicType>
<ber:symbology>
<ber:pointSymbolizer>
<se:Graphic>
<se:ExternalGraphic>
<se:OnlineResource xlink:href="resource.xml#ber_LIDSdemo/35"/>
<se:Format/>
</se:ExternalGraphic>
</se:Graphic>
<ber:rgbColor>#CC0000</ber:rgbColor>
</ber:pointSymbolizer>
</ber:symbology>
</ber:pointGraphicType>
</ber:graphicTypeComponent>
...
</ber:graphicTypeArray>

symbollibrary

Resource is used for storing symbols for LIDS Edit. There are two types of library – cell library is stored in {project_folder}\lids-as\resources\symbollibrary\dgn, block library is stored in {project_folder}\lids-as\resources\symbollibrary\dwg. Libraries are subsequently referenced inresource.xml.

Example: Reference to the library in resource.xml.

<ber:customResourceArray type="symbolLibrary">
<ber:customResource id="block_demo1" name="Block library from DEMO font 1">
<ber:formatArray>
<ber:format name="dwg" file="block_demo1.dwg"/>
</ber:formatArray>
</ber:customResource>
...
<ber:customResource id="berLIDSDemo" name="DGN Cell library berLIDSDemo.ttf">
<ber:formatArray>
<ber:format name="dgn" file="berLIDSDemo.cel"/>
</ber:formatArray>
</ber:customResource>
...
</ber:customResourceArray>