CARIS HPD : Portrayal : Annotations : Image Annotation File
 

Image Annotation File

The image annotations file (image_annotations.xml) links features to image annotations. It also describes the display properties of the image annotation and the feature attribute that contains the file name (for example, PICREP).

This file does support filters. Filters can be used to specify different image sizes and positions for different geometric types. For example, for a built-up area (BUAARE) feature, the <PrimitiveIsEqualTo/> filter can be used to define different display properties for image annotations associated with BUAARE point or area features.

This is an example of a basic image file:

<?xml version=”1.0” encoding=”UTF-8” ?>

<AnnotationFile Version="2.0">

  <AnnotationFileInfo Name="Annotations" Description="Annotation Rules" CreationDate="10102008" CreatedBy="CARIS"/>

  <Object Acronym=”ADMARE”>

    <CreateAnnotation AnnotationType=”IMAGE” Acronym=”$image” Description=”Image for administration area” Attribute=”PICREP” XOffset=”10.0” YOffset=”10.0” HJust=”Left” VJust=”Bottom” Width=”10.0” />

  </Object>

  <Object Acronym=”AIRARE”>

    <CreateAnnotation AnnotationType=”IMAGE” Acronym=”$image” Description=”Image for airport area” Attribute=”PICREP” XOffset=”10.0” YOffset=”10.0” HJust=”Left” VJust=”Bottom” Width=”10.0” />

  </Object>

...

  <Object Acronym=”$COMPS”>

    <CreateAnnotation AnnotationType=”IMAGE” Acronym=”$image” Description=”Image for compass” Attribute=”PICREP XOffset=”10.0” YOffset=”10.0” HJust=”Left” VJust=”Bottom” Width=”10.0” />

  </Object>

  <Object Acronym=”$TEXTS”>

    <CreateAnnotation AnnotationType=”IMAGE” Acronym=”$image” Description=”Image for text” Attribute=”PICREP” XOffset=”10.0” YOffset=”10.0” HJust=”Left” VJust=”Bottom” Width=”10.0” />

  </Object>

</AnnotationFile>

The fields for the file are described in the following table.

Tag

Attribute

Attribute Description

<Object/>

Acronym

The feature acronym to which an image annotation can be assigned.

<CreateAnnotation/>

AnnotationType

The type of the annotation. In this case, an IMAGE annotation.

Acronym

The feature acronym of the image annotation. In this case, it is $image.

Description

A brief description of the image annotation.

Attribute

The feature attribute where the image file name is stored. In most cases this the pictorial representation attribute (PICREP).

XOffset

The horizontal offset, in mm, from the feature’s reference point. This can specified up to two decimal places and be a positive or negative value.

YOffset

The vertical offset, in mm, from the feature’s reference point. This can specified up to two decimal places and can be a positive or negative value.

HJust

Horizontal justification. Values are Left, Centre and Right.

VJust

Vertical justification. Values are Top, Centre and Bottom.

Width

Width of the image in mm. The Width attribute can used without the Height attribute. In this case, an aspect ratio is applied to calculate the best height.

Use either Height or Width. Using both can lead to image distortion

Height

Height of the image in mm. The Height attribute can used without the Width attribute. In this case, an aspect ratio is applied to calculate the best width.

Use either Height or Width. Using both can lead to image distortion