Decorated symbol: Difference between revisions

From Maria GDK Wiki
Jump to navigation Jump to search
No edit summary
No edit summary
Line 17: Line 17:
var CER_Object = drawObjectDataFactory.GetDecoratedCERSSymbol(GenerateInstanceId());
var CER_Object = drawObjectDataFactory.GetDecoratedCERSSymbol(GenerateInstanceId());
</source>
</source>
=== XML definitions ===


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


==== Setting displayed symbol ====
=== Setting displayed symbol ===


The symbol is defined by <code>&lt;SymbolCode&gt;</code>. The given value must be valid in the running symbol service.
The symbol is defined by <code>&lt;SymbolCode&gt;</code>. The given value must be valid in the running symbol service.
Line 34: Line 32:
   </DataTemplate></source>
   </DataTemplate></source>


==== Setting draw object as point object ====
=== Setting draw object as point object ===


The decorated symbol type must be properly defined. Set <code>&lt;SymbolType&gt;</code> to <code>SymbolPoint</code> and <code>&lt;DrawObjectTypeId&gt;</code> to <code>16718852-991A-45A7-97CB-FDB1CCB368E6</code> (unique CER id).
The decorated symbol type must be properly defined. Set <code>&lt;SymbolType&gt;</code> to <code>SymbolPoint</code> and <code>&lt;DrawObjectTypeId&gt;</code> to <code>16718852-991A-45A7-97CB-FDB1CCB368E6</code> (unique CER id).
Line 47: Line 45:
     </DrawObjectData>
     </DrawObjectData>
   </DataTemplate></source>
   </DataTemplate></source>
==== Setting symbol to type CER ====
 
=== Setting symbol to type CER ===


The decorated symbol must be set to type CER. Set <code>&lt;DecoratedSymbolRenderers&gt;</code> to <code>DecoratedCircles</code>
The decorated symbol must be set to type CER. Set <code>&lt;DecoratedSymbolRenderers&gt;</code> to <code>DecoratedCircles</code>
Line 59: Line 58:
   </DataTemplate></source>
   </DataTemplate></source>


==== Setting size of CER symbol ====
=== Setting size of CER symbol ===


The first (inner) circle is set by <code>&lt;DecoratedCirclesStart&gt;</code> and the distance for each following circle is set by <code>&lt;DecoratedCirclesWidths&gt;</code>. All values are in metres.
The first (inner) circle is set by <code>&lt;DecoratedCirclesStart&gt;</code> and the distance for each following circle is set by <code>&lt;DecoratedCirclesWidths&gt;</code>. All values are in metres.
Line 75: Line 74:
   </DataTemplate></source>
   </DataTemplate></source>


==== Setting individual line setups ====
=== 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.
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.
Line 89: Line 88:
   </DataTemplate></source>
   </DataTemplate></source>


==== Setting a common line setup ====
=== 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 <code>Solid</code>.
The lines can also have a common setup. The color is formatted as A,R,G,B The default line style is <code>Solid</code>.
Line 122: Line 121:
var Circle_Object = drawObjectDataFactory.GetDecoratedCircleSymbol(GenerateInstanceId());
var Circle_Object = drawObjectDataFactory.GetDecoratedCircleSymbol(GenerateInstanceId());
</source>
</source>
=== XML definitions ===


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


==== Setting displayed symbol ====
=== Setting displayed symbol ===


The symbol is defined by <code>&lt;SymbolCode&gt;</code>. The given value must be valid in the running symbol service.
The symbol is defined by <code>&lt;SymbolCode&gt;</code>. The given value must be valid in the running symbol service.
Line 139: Line 136:
   </DataTemplate></source>
   </DataTemplate></source>


==== Setting draw object as point object ====
=== Setting draw object as point object ===


The decorated symbol type must be properly defined. Set <code>&lt;SymbolType&gt;</code> to <code>SymbolPoint</code> and <code>&lt;DrawObjectTypeId&gt;</code> to <code>F92E1229-DDDD-4A53-B787-B82CF42237D6</code> (unique Circle id).
The decorated symbol type must be properly defined. Set <code>&lt;SymbolType&gt;</code> to <code>SymbolPoint</code> and <code>&lt;DrawObjectTypeId&gt;</code> to <code>F92E1229-DDDD-4A53-B787-B82CF42237D6</code> (unique Circle id).
Line 153: Line 150:
   </DataTemplate></source>
   </DataTemplate></source>


==== Setting symbol to type Circle ====
=== Setting symbol to type Circle ===


The decorated symbol must be set to type Circle. Set <code>&lt;DecoratedSymbolRenderers&gt;</code> to <code>DecoratedCircle</code>
The decorated symbol must be set to type Circle. Set <code>&lt;DecoratedSymbolRenderers&gt;</code> to <code>DecoratedCircle</code>
Line 165: Line 162:
   </DataTemplate></source>
   </DataTemplate></source>


==== Setting size of Circle symbol ====
=== Setting size of Circle symbol ===


The size of the circle is set by <code>&lt;DecoratedCircleRange&gt;</code> in metres.
The size of the circle is set by <code>&lt;DecoratedCircleRange&gt;</code> in metres.
Line 177: Line 174:
   </DataTemplate></source>
   </DataTemplate></source>


==== Setting line setup ====
=== 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.
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.
Line 211: Line 208:
var Line_Object = drawObjectDataFactory.GetDecoratedLineSymbol(GenerateInstanceId());
var Line_Object = drawObjectDataFactory.GetDecoratedLineSymbol(GenerateInstanceId());
</source>
</source>
=== XML definitions ===


The Line symbol is defined in the resource file <code>TARGET SYMBOL LINE.xml</code>. The most important sections of the definition is as follows:
The Line symbol is defined in the resource file <code>TARGET SYMBOL LINE.xml</code>. The most important sections of the definition is as follows:


==== Setting displayed symbol ====
=== Setting displayed symbol ===


The symbol is defined by <code>&lt;SymbolCode&gt;</code>. The given value must be valid in the running symbol service.
The symbol is defined by <code>&lt;SymbolCode&gt;</code>. The given value must be valid in the running symbol service.
Line 228: Line 223:
   </DataTemplate></source>
   </DataTemplate></source>


==== Setting draw object as point object ====
=== Setting draw object as point object ===


The decorated symbol type must be properly defined. Set <code>&lt;SymbolType&gt;</code> to <code>SymbolPoint</code> and <code>&lt;DrawObjectTypeId&gt;</code> to <code>6A214C94-960A-4F2A-90F2-CA9A7BC1267F</code> (unique Line id).
The decorated symbol type must be properly defined. Set <code>&lt;SymbolType&gt;</code> to <code>SymbolPoint</code> and <code>&lt;DrawObjectTypeId&gt;</code> to <code>6A214C94-960A-4F2A-90F2-CA9A7BC1267F</code> (unique Line id).
Line 254: Line 249:
   </DataTemplate></source>
   </DataTemplate></source>


==== Setting length and angle of Line symbol ====
=== Setting length and angle of Line symbol ===


The length of the Line is set by <code>&lt;DecoratedLineLength&gt;</code> in metres and the angle by <code>&lt;DecoratedAngle&gt;</code> in degrees.
The length of the Line is set by <code>&lt;DecoratedLineLength&gt;</code> in metres and the angle by <code>&lt;DecoratedAngle&gt;</code> in degrees.
Line 267: Line 262:
   </DataTemplate></source>
   </DataTemplate></source>


==== Setting line setup ====
=== 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.
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.
Line 280: Line 275:
     </DrawObjectData>
     </DrawObjectData>
   </DataTemplate></source>
   </DataTemplate></source>
=== Examples ===
=== Examples ===


Line 301: Line 297:
var Rectangle_Object = drawObjectDataFactory.GetDecoratedRectangleSymbol(GenerateInstanceId());
var Rectangle_Object = drawObjectDataFactory.GetDecoratedRectangleSymbol(GenerateInstanceId());
</source>
</source>


The Rectangle symbol is defined in the resource file <code>TARGET SYMBOL RECTANGLE.xml</code>. The most important sections of the definition is as follows:
The Rectangle symbol is defined in the resource file <code>TARGET SYMBOL RECTANGLE.xml</code>. The most important sections of the definition is as follows:
Line 356: Line 351:
     </DrawObjectData>
     </DrawObjectData>
   </DataTemplate></source>
   </DataTemplate></source>
=== Setting line setup ===
=== Setting line setup ===



Revision as of 14:21, 1 August 2019

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. The CERS symbol consists of several circles with independent setups.

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());

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

The circle symbol is defined by width and line setup.

//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());

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

Line

The line symbol is defined by length, angle and line setup.

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

//creating a Line object
var drawObjectDataFactory = new DrawObjectDataFactory();
var Line_Object = drawObjectDataFactory.GetDecoratedLineSymbol(GenerateInstanceId());

The Line symbol is defined in the resource file TARGET SYMBOL LINE.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 6A214C94-960A-4F2A-90F2-CA9A7BC1267F (unique Line id).

 <DataTemplate>
    <DrawObjectData>
      <DrawObjectTypeId>6A214C94-960A-4F2A-90F2-CA9A7BC1267F</DrawObjectTypeId>
      <Fields>
        <Name>DECORATED SYMBOL LINE</Name>
        <SymbolType>SymbolPoint</SymbolType>
      </Fields>
    </DrawObjectData>
  </DataTemplate>

Setting symbol to type Line

The decorated symbol must be set to type Line. Set <DecoratedSymbolRenderers> to DecoratedLine

<DataTemplate>
    <DrawObjectData>
      <Fields>
        <DecoratedSymbolRenderers>DecoratedLine</DecoratedSymbolRenderers>
      </Fields>
    </DrawObjectData>
  </DataTemplate>

Setting length and angle of Line symbol

The length of the Line is set by <DecoratedLineLength> in metres and the angle by <DecoratedAngle> in degrees.

 <DataTemplate>
    <DrawObjectData>
      <Fields>
        <DecoratedAngle>30</DecoratedAngle>
        <DecoratedLineLength>90000</DecoratedLineLength>
      </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>
        <DecoratedLineColor>200,255,0,0</DecoratedLineColor>
        <DecoratedLineThickness>1</DecoratedLineThickness>
        <DecoratedLineDashStyle>Solid</DecoratedLineDashStyle>
      </Fields>
    </DrawObjectData>
  </DataTemplate>

Examples

Example of Line symbol
Selected symbol will show length

Rectangle

The rectangle symbol is defined by length, angle and line setup.

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

//creating a Rectangle object
var drawObjectDataFactory = new DrawObjectDataFactory();
var Rectangle_Object = drawObjectDataFactory.GetDecoratedRectangleSymbol(GenerateInstanceId());

The Rectangle symbol is defined in the resource file TARGET SYMBOL RECTANGLE.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 E5F2CDC9-496E-49F1-A1FE-C5CF5FF54851 (unique Rectangle id).

 <DataTemplate>
    <DrawObjectData>
      <DrawObjectTypeId>E5F2CDC9-496E-49F1-A1FE-C5CF5FF54851</DrawObjectTypeId>
      <Fields>
        <Name>DECORATED SYMBOL RECTANGLE</Name>
        <SymbolType>SymbolPoint</SymbolType>
      </Fields>
    </DrawObjectData>
  </DataTemplate>

Setting symbol to type Rectangle

The decorated symbol must be set to type Rectangle. Set <DecoratedSymbolRenderers> to DecoratedRectangle

<DataTemplate>
    <DrawObjectData>
      <Fields>
        <DecoratedSymbolRenderers>DecoratedRectangle</DecoratedSymbolRenderers>
      </Fields>
    </DrawObjectData>
  </DataTemplate>

Setting size and angle of Rectangle symbol

The size of the Rectangle is set by <DecoratedRectangleHeight> and <DecoratedRectangleWidth> in metres and the angle by <DecoratedAngle> in degrees.

 <DataTemplate>
    <DrawObjectData>
      <Fields>
       <DecoratedAngle>20</DecoratedAngle>
        <DecoratedRectangleHeight>60000</DecoratedRectangleHeight>
        <DecoratedRectangleWidth>180000</DecoratedRectangleWidth>
      </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>
        <DecoratedRectangleLineColor>200,255,0,0</DecoratedRectangleLineColor>
        <DecoratedRectangleLineThickness>1</DecoratedRectangleLineThickness>
        <DecoratedRectangleLineDashStyle>Solid</DecoratedRectangleLineDashStyle>
      </Fields>
    </DrawObjectData>
  </DataTemplate>

Examples

Example of Rectangle symbol
Selected symbol will show width and height extent