Class TLcdHasGeometryAnnotation

java.lang.Object
com.luciad.util.TLcdHasGeometryAnnotation
All Implemented Interfaces:
ILcdAnnotation
Direct Known Subclasses:
TLcdHasAShapeAnnotation

public class TLcdHasGeometryAnnotation extends Object implements ILcdAnnotation

Types with this annotation expose their geometry through their data properties.

The supported geometry property types in LuciadLightspeed are ILcdShape for vector data and ALcdImage for image data.

Uses

  • create geospatial domain objects that do not implement ILcdShape or ALcdImage
  • access the geometry of the above mentioned domain objects

Example

To access a domain object's geometry, you can make use of the following convenience functions:

To create a has-a-geometry data type, add the annotation right after creating the data model.
The following snippet defines a point-based domain object:


 TLcdDataModelBuilder builder = new TLcdDataModelBuilder("http://www.mydomain.com/datamodel/myDataModel");

 TLcdDataTypeBuilder hasAShapeType = builder.typeBuilder("HasAShapeType");
 hasAShapeType.addProperty("Point", TLcdShapeDataTypes.POINT_TYPE);
 // add other properties here
 // ...

 TLcdDataModel dataModel = builder.createDataModel();

 TLcdDataType type = dataModel.getDeclaredType("HasAShapeType");
 type.addAnnotation(new TLcdHasGeometryAnnotation(type.getProperty("Point")));

The fundamentals samples show how to define and use has-a-shape domain objects.
Since:
2015.0
  • Constructor Details

    • TLcdHasGeometryAnnotation

      public TLcdHasGeometryAnnotation(TLcdDataProperty aGeometryProperty)
      Creates a new has-geometry annotation that indicates that the geometry can be accessed using the given data property.
      Parameters:
      aGeometryProperty - the geometry property if the geometry is encoded in a single property, or null if the geometry property is not known, or if the geometry is encoded in several properties.
  • Method Details

    • getGeometryProperty

      public TLcdDataProperty getGeometryProperty()
      Returns the property using which the geometry can be accessed. The returned property can be null if the geometry property is not known, or if the geometry is encoded in several properties.
      Returns:
      the property using which the geometry can be accessed.