Decorated symbol: Difference between revisions

From Maria GDK Wiki
Jump to navigation Jump to search
()
No edit summary
Line 196: Line 196:


[[File:decoratedcircle selected.png|none|frame|Selected symbol will show extent]]
[[File:decoratedcircle selected.png|none|frame|Selected symbol will show extent]]
== Line ==
<source lang="c#">//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());
</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:
==== Setting displayed symbol ====
The symbol is defined by <code>&lt;SymbolCode&gt;</code>. The given value must be valid in the running symbol service.
<source lang="xml"><DataTemplate>
    <DrawObjectData>
      <Fields>
        <SymbolCode>fa1534af-795f-4701-ae1d-7978ec1c3d60:P/BP</SymbolCode>
      </Fields>
    </DrawObjectData>
  </DataTemplate></source>
==== 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).
<source lang="xml"> <DataTemplate>
    <DrawObjectData>
      <DrawObjectTypeId>6A214C94-960A-4F2A-90F2-CA9A7BC1267F</DrawObjectTypeId>
      <Fields>
        <Name>DECORATED SYMBOL LINE</Name>
        <SymbolType>SymbolPoint</SymbolType>
      </Fields>
    </DrawObjectData>
  </DataTemplate></source>
==== Setting symbol to type Line ====
The decorated symbol must be set to type Line. Set <code>&lt;DecoratedSymbolRenderers&gt;</code> to <code>DecoratedLine</code>
<source lang="xml"><DataTemplate>
    <DrawObjectData>
      <Fields>
        <DecoratedSymbolRenderers>DecoratedLine</DecoratedSymbolRenderers>
      </Fields>
    </DrawObjectData>
  </DataTemplate></source>
==== 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.
<source lang="xml"> <DataTemplate>
    <DrawObjectData>
      <Fields>
        <DecoratedAngle>30</DecoratedAngle>
        <DecoratedLineLength>90000</DecoratedLineLength>
      </Fields>
    </DrawObjectData>
  </DataTemplate></source>
==== 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.
<source lang="xml"><DataTemplate>
    <DrawObjectData>
      <Fields>
        <DecoratedLineColor>200,255,0,0</DecoratedLineColor>
        <DecoratedLineThickness>1</DecoratedLineThickness>
        <DecoratedLineDashStyle>Solid</DecoratedLineDashStyle>
      </Fields>
    </DrawObjectData>
  </DataTemplate></source>
=== Examples ===
[[File:decoratedline.png|none|frame|Example of Line symbol]]
[[File:decoratedline selected.png|none|frame|Selected symbol will show length]]






[[Category:Draw objects]]
[[Category:Draw objects]]

Revision as of 14:09, 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.

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

Line

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

XML definitions

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