Decorated symbol

From Maria GDK Wiki
Revision as of 15:08, 1 August 2019 by Mbu (talk | contribs) ()
Jump to navigation Jump to search

A decorated symbol is a point object (IGeoPoint) which displays both a symbol and extra decoration. There are several decorated symbols with different decorations.

CER

Collateral Effects Radius (CER) is used in connection with the Collateral Damage Estimate (CDE) process.

How to create a CER object:

//Available factory method to create a CER object
public interface IDrawObjectDataFactory : IDisposable
{
   ...
   IDrawObjectData GetDecoratedCERSSymbol(string newInstanceId = null);
   ...
}

//creating a CER object
var drawObjectDataFactory = new DrawObjectDataFactory();
var CER_Object = drawObjectDataFactory.GetDecoratedCERSSymbol(GenerateInstanceId());

XML definitions

The CER symbol is defined in the resource file TARGET SYMBOL CERS.xml. The most important sections of the definition is as follows:

Setting displayed symbol

The symbol is defined by <SymbolCode>. The given value must be valid in the running symbol service.

<DataTemplate>
    <DrawObjectData>
      <Fields>
        <SymbolCode>fa1534af-795f-4701-ae1d-7978ec1c3d60:P/BP</SymbolCode>
      </Fields>
    </DrawObjectData>
  </DataTemplate>

Setting draw object as point object

The decorated symbol type must be properly defined. Set <SymbolType> to SymbolPoint and <DrawObjectTypeId> to 16718852-991A-45A7-97CB-FDB1CCB368E6 (unique CER id).

 <DataTemplate>
    <DrawObjectData>
      <DrawObjectTypeId>16718852-991A-45A7-97CB-FDB1CCB368E6</DrawObjectTypeId>
      <Fields>
        <Name>DECORATED SYMBOL CERS</Name>
        <SymbolType>SymbolPoint</SymbolType>
      </Fields>
    </DrawObjectData>
  </DataTemplate>

Setting symbol to type CER

The decorated symbol must be set to type CER. Set <DecoratedSymbolRenderers> to DecoratedCircles

<DataTemplate>
    <DrawObjectData>
      <Fields>
        <DecoratedSymbolRenderers>DecoratedCircles</DecoratedSymbolRenderers>
      </Fields>
    </DrawObjectData>
  </DataTemplate>

Setting size of CER symbol

The first (inner) circle is set by <DecoratedCirclesStart> and the distance for each following circle is set by <DecoratedCirclesWidths>. All values are in metres.

The example below defines a CER which starts at 60000m and has 5 outer circles at 75000m, 90000m, 130000m, 146000m and 166000m.

 <DataTemplate>
    <DrawObjectData>
      <DrawObjectTypeId>16718852-991A-45A7-97CB-FDB1CCB368E6</DrawObjectTypeId>
      <Fields>
        <DecoratedCirclesStart>60000</DecoratedCirclesStart>
        <DecoratedCirclesWidths>15000,15000,40000,16000,20000</DecoratedCirclesWidths>
      </Fields>
    </DrawObjectData>
  </DataTemplate>

Setting individual line setups

The line thickness, color and style can be set individually. The colors are formatted as A,R,G,B and each color is separated with semicolon. Valid line styles are Solid, Dash, Dot, DashDot and DashDotDot.

<DataTemplate>
    <DrawObjectData>
      <Fields>
        <DecoratedCirclesLinesThickness>1,1,5,1,10,3</DecoratedCirclesLinesThickness>
        <DecoratedCirclesLineColors>255,0,255,0;255,0,0,255;255,0,255,255;255,0,155,50;255,100,255,100;255,255,255,100</DecoratedCirclesLineColors>
        <DecoratedCirclesDashStyles>Solid,Solid,Solid,Solid,Dot,DashDotDot</DecoratedCirclesDashStyles>
      </Fields>
    </DrawObjectData>
  </DataTemplate>

Setting a common line setup

The lines can also have a common setup. The color is formatted as A,R,G,B The default line style is Solid.

<DataTemplate>
    <DrawObjectData>
      <Fields>
        <DecoratedCirclesLineColor>200,255,0,0</DecoratedCirclesLineColor>
        <DecoratedCirclesLineThickness>4</DecoratedCirclesLineThickness>        
      </Fields>
    </DrawObjectData>
  </DataTemplate>

Examples

CER symbol with different line setups
Selected symbol will show inner and outer extent

Circle

//Available factory method to create a Circle object
public interface IDrawObjectDataFactory : IDisposable
{
   ...
   IDrawObjectData GetDecoratedCircleSymbol(string newInstanceId = null);
   ...
}

//creating a CER object
var drawObjectDataFactory = new DrawObjectDataFactory();
var Circle_Object = drawObjectDataFactory.GetDecoratedCircleSymbol(GenerateInstanceId());

XML definitions

The Circle symbol is defined in the resource file TARGET SYMBOL CIRCLE.xml. The most important sections of the definition is as follows:

Setting displayed symbol

The symbol is defined by <SymbolCode>. The given value must be valid in the running symbol service.

<DataTemplate>
    <DrawObjectData>
      <Fields>
        <SymbolCode>fa1534af-795f-4701-ae1d-7978ec1c3d60:P/BP</SymbolCode>
      </Fields>
    </DrawObjectData>
  </DataTemplate>

Setting draw object as point object

The decorated symbol type must be properly defined. Set <SymbolType> to SymbolPoint and <DrawObjectTypeId> to F92E1229-DDDD-4A53-B787-B82CF42237D6 (unique Circle id).

 <DataTemplate>
    <DrawObjectData>
      <DrawObjectTypeId>F92E1229-DDDD-4A53-B787-B82CF42237D6</DrawObjectTypeId>
      <Fields>
        <Name>DECORATED SYMBOL CIRCLE</Name>
        <SymbolType>SymbolPoint</SymbolType>
      </Fields>
    </DrawObjectData>
  </DataTemplate>

Setting symbol to type Circle

The decorated symbol must be set to type Circle. Set <DecoratedSymbolRenderers> to DecoratedCircle

<DataTemplate>
    <DrawObjectData>
      <Fields>
        <DecoratedSymbolRenderers>DecoratedCircle</DecoratedSymbolRenderers>
      </Fields>
    </DrawObjectData>
  </DataTemplate>

Setting size of Circle symbol

The size of the circle is set by <DecoratedCircleRange> in metres.

 <DataTemplate>
    <DrawObjectData>
      <Fields>
        <DecoratedCircleRange>60000</DecoratedCircleRange>
      </Fields>
    </DrawObjectData>
  </DataTemplate>

Setting line setup

The line thickness, color and style can be set. The color is formatted as A,R,G,B. Valid line styles are Solid, Dash, Dot, DashDot and DashDotDot.

<DataTemplate>
    <DrawObjectData>
      <Fields>
        <DecoratedCircleLineColor>200,255,0,0</DecoratedCircleLineColor>
        <DecoratedCircleLineThickness>1</DecoratedCircleLineThickness>
        <DecoratedCircleLineDashStyle>Solid</DecoratedCircleLineDashStyle>
      </Fields>
    </DrawObjectData>
  </DataTemplate>

Examples

Example of Circle symbol
Selected symbol will show extent