IMapShapes

Description

interface Tinman.Terrain.Mapping.IMapShapes
<TShape ref : IMapShape>

Base interface for maps that perform on-the-fly rasterization of map shapes.

A map shape consists of a vector shape (i.e. a IShape object) and additional information regarding rasterization (which is provided by implementing classes). If the geo-reference of a map shape does not match the geo-reference of the raster of this object (see IGeorefInfo.Georef), on-the-fly projection will be performed during rasterization (see #1 below). Alternatively, the ShapePrepare method may be used to transform the map shape to the geo-reference of this object (see #2 below).

Public / Methods

Shape​Add


public method ShapeAdd → (2)

shape in : TShape

[not-null]
The map shape to add.

transform opt : bool = false

true to transform the given shape to the coordinate system of this object,
false to use the coordinate system of the given shape.

returns → TShape

The added map shape or null if empty (after preparation).

Adds a map shape.

Shape rasterization is performed in the coordinate system of this IMapShapes object. The given shape in may have a different coordinate system (see IMapShape.MapShape). In this case, an on-the-fly transformation is applied during rasterization.

It may be necessary to perform some preparation on the given shape in before it can be used by this map object. The ShapePrepare method can be used to prepare shapes in the background to avoid lengthy computations here.

Shape​Prepare


[ThreadSafe]
public method ShapePrepare → (2)

shape in : TShape

[not-null]
The map shape to prepare.

transform opt : bool = false

true to transform the given shape to the coordinate system of this object,
false to use the coordinate system of the given shape.

returns → TShape

The prepared map shape or null if empty.

Prepares the given map shape for being used by this object.

The following preparations and computations may be performed of the given shape in:

Calling this method on the returned map shape will never perform any computations. If transform opt is false, implementations may still perform non-transforming computations, such as IShapeOps.Compile.

Shape​Remove


public method ShapeRemove → (1)

shape in : TShape

[not-null]
The map shape to remove (as returned by ShapeAdd resp. ShapePrepare.

Removes a map shape.

Public / Attributes

Shape​Accuracy


public attribute ShapeAccuracy → (get,set)

value : float64

[>=0]
The maximum allowed error, specified in the coordinate system of this map (see Raster.Coordinates).

The accuracy to use for edge subdivision when transforming shapes in subsequent calls to ShapeAdd resp. ShapePrepare.

Set to 0 to disable edge subdivision. Defaults to 0.

Shapes


public attribute Shapes → (get)

value : IVectorConst<TShape>

[not-null]
The list of map shapes (as returned by ShapeAdd).

The map shapes.