Vector data is stored in a FeatureModel in LuciadRIA. A FeatureModel stores Feature instances, which consist of:

  • The shape or geometry of the object

  • A number of properties for the object

  • An optional ID

Program: Creating a city feature
//First create the geometry of the city,
//using the createPoint method of the ShapeFactory module
const reference = getReference("CRS:84");
const location = createPoint(reference, [50.8798, 4.7005]);

//Create the Feature with the geometry and some properties
const city = new Feature(location, {
  name: "Leuven",
  country: "Belgium"
});

Supported geometries

The table below contains an overview of all supported geometries or shapes. Shape instances must be created using the factory methods available in the ShapeFactory module.

Table 1. Supported shapes
Shape Description Instantiated with

Point

A single point

createPoint

Polyline

A single line, consisting of connected points

createPolyline

Polygon

A single closed area, defined by a set of points

createPolygon

Complex polygon

A polygon with holes, consisting of one polygon defining the outer edge and other polygons defining the holes

createComplexPolygon

Circle by Center Point

Defined by a center point and a radius

createCircleByCenterPoint

Circle by 3 Points

Defined by three points on the circumference

createCircleBy3Points

Circular Arc By Center Point

Defined by a center point, radius, start azimuthal angle, and sweep azimuthal angle

createCircularArcByCenterPoint

Circular Arc by 3 points

Defined by a start point, intermediate point, and end point

createCircularArcBy3Points

Circular Arc by Bulge

Defined by two points and a bulge

createCircularArcByBulge

Elliptical arc

Defined by an ellipse, start azimuthal angle, and sweep azimuthal angle

createArc

Arc band

An arc band, defined by a center point, minimum and maximum range, start azimuthal angle, and arc azimuthal angle

createArcBand

Sector

An arc band where the minimum range is 0

createSector

GeoBuffer

An area around a given shape, adding a fixed width to the shape

createGeoBuffer

Extruded shape

A 3D volume created by extruding a 2D line or area with a minimum and maximum height

createExtrudedShape

Shape list

Composite shapes

createShapeList

Bounds

A 3D axis-aligned box

createBounds