IMapShapes
Description
- Derived from
- Extended by
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).
-
Cubemap raster (Raster.RasterType == MapType.Cube)
#1:
During preparation, no transformations are applied to the map shape.
During rasterization, the input raster coordinates are transformed to cubemap face coordinates (see CoordinateOperationMethod.Face), by applying a scale and a translation. The cubemap face coordinates are then transformed to output coordinates in the geo-reference of the map shape, using CoordinateSystemTransform.TransformScale.
#2:
During preparation, the map shape is transformed to cubemap face coordinates with IMapShapeGeneric.MapShapeCubemap.
During rasterization, only the scale / translation transformation (see above) is applied to input raster coordinates, in order to obtain output coordinates in the geo-reference of the map shape. -
Rectangular raster (Raster.RasterType == MapType.Rect)
#1:
During preparation, no transformations are applied to the map shape.
During rasterization, input raster coordinates are transformed to map coordinates with IRasterTransform.RasterToMap. These are then transformed to output coordinates in the geo-reference of the map shape, using CoordinateSystemTransform.TransformScale.
#2:
During preparation, the map shape is transformed to map coordinate space, using IMapShapeGeneric.MapShapeCoordinateSystem.
During rasterization, input raster coordinates are transformed to map coordinates with IRasterTransform.RasterToMap, which are in the geo-reference of the map shape.
Public / Methods
ShapeAdd
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.
- See also
ShapePrepare
Prepares the given map shape for being used by this object.
The following preparations and computations may be performed of the given shape in:
-
If transform opt is
true
and this map shapes object is a cubemap:
The vector shape (see IMapShape.MapShape) is transformed to cubemap via IShapeOps.TransformCubemap, using the current accuracy. -
If transform opt is
true
and this map shapes object is rectangular:
The vector shape (see IMapShape.MapShape) is transformed to the coordinate system via IShapeOps.TransformCoordinateSystem, using the current accuracy. -
If necessary, default rasterization settings will be applied, for example by calling PixelPyramidShape.Rasterizer for pixel pyramid shapes.
-
As final step, IShapeOps.Compile is used to obtain an optimized vector shape object for subsequent rasterization.
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.
- See also
Public / Attributes
ShapeAccuracy
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
.