A mapping template is a two dimensional representation of a 3D geometrical object (e.g. a tunnel, rock slope etc.) that is defined to a specific axis reference system. E.g. for an axis reference system representing a section of a tunnel the mapping template can represent the tunnel walls, roof and floor. In Redbex mapping templates are used as basis for sketching geometrical characteristics of features and observations.
A mapping template consists of one or more mapping template faces and zero or more mapping template information layers.
A mapping template face is a logical part of the two dimensional representation e.g. the left wall of a tunnel. Each face in a mapping template is a set of closed polygons that together specify the geometrical boundaries of the face.
A mapping template information layer is a set of geometrical objects that are used only for visualization. These information layers may be used by clients to improve and annotate the mapping template visualization (e.g. text annotations).
Importing mapping template geometries from DXF files
The geometrical aspects of mapping templates are defined by importing a DXF file. This DXF file must conform to some syntactical and semantic rules described in the following. Since Redbex stores the geometries of mapping templates in WKT format some of the geometries found in the DXF (for example arcs) will be approximated during import.
Supported DXF Versions supported
AutoCad2000, AutoCad2004, AutoCad2007, AutoCad2010 and AutoCad2013 DXF database versions, in both text and binary format.
Reference system
The coordinate system used for the DXF File must be the same as that used for the axis underlying the axis reference system for which the mapping template is imported. I.e. the nodes of geometries in the DXF file must have real-world coordinates expressed in the projected coordinate system underlying the axis reference system.
Hidden layers
Hidden layers will not be processed by Redbex during import.
Mapping template faces
In the DXF file mapping template a face is a set of closed LwPolylines or Polyline DXF entities placed on the same DXF layer. A DXF file must contain at least one mapping template face.
Use the following pattern for the name of DXF layers for mapping faces: Face_<FaceName> e.g. Face_Left Wall.
Redbex will automatically identify DXF layers with the prefix Face_ as mapping template faces. All text after Face_ will be used as descriptive text to explain what part of the template the DXF layer contains.
During import Redbex will approximate the closed LwPolylines by first approximating arcs with straight line segments and the by reducing the number of straight line segments for each polygon by applying the Douglas-Peucker algorithm. Polylines will not be approximated but will be imported with straight line segments between the nodes of the the polyline.
All closed LwPolylines or Polylines on these layers must not be self intersecting and must conform to validation rules listed below.
The DXF layer color will be imported as the mapping template face color and will be used in visualizations.
Any other type of DXF entities on a mapping template face layer will not be imported.
Mapping template information layers
In the DXF file a mapping template information layer is sets of DXF entitites placed on the same DXF layer. A DXF file can contain zero or more mapping template information layers.
Use the following pattern for the layer name: Information_<FaceName> e.g. Information_Intersection Building Parts.
Redbex will automatically identify DXF layers with the prefix Information_ as information layers. All text after Information_ will be used as an identifying name for the mapping template information layer.
During the import following DXF entity types will be read from DXF Information layers:
•LwPolyline: Arc segments are approximated with straight line segments. The resulting polygon is simplified using Douglas-Peucker algorithm
•Polyline: Arc segments in polylines will not not approximated but will be imported with straight line segments between the nodes of the the polyline. The resulting polygon is simplified using Douglas-Peucker algorithm
•Line
•Point
•Circle: Circles are approximated by straight line segments, the resulting polygon is simplified by applying the Douglas-Peucker algorithm
•Ellipse: Ellipses are approximated by straight line segments, the resulting polygon is simplified by applying the Douglas-Peucker algorithm
•Arc: Arcs are approximated by straight line segments, the resulting polyline is simplified by applying the Douglas Peucker algorithm.
•Text: Texts is converted to a point with a label
•MText: Texts is converted to a point with a label
The DXF layer color will be imported as the information layer color and will be used in visualizations.
All other types of DXF entitites found in one of these layers will not be imported.
Validation of geometries
Not all supported DXF entities can be automatically converted to valid WKT geometries. During import all entities are checked for validity. If invalid entities are found the import will try to correct them. The result of this correction might however not result in the desired WKT geometry. It is up to the creator of the DXF file to prevent invalid entitties.
The ActionLog of the DXF import will provide more detailed information on invalid geometries.
The following situations will lead to invalid geometries:
•Not valid because point {0} is an isolated point, which is not valid in this type of object.
•Not valid because some pair of polygon edges overlap.
•Not valid because polygon ring {0} intersects itself or some other ring.
•Not valid because some polygon ring intersects itself or some other ring.
•Not valid because curve {0} degenerates to a point.
•Not valid because polygon ring {0} collapses to a line at point {1}.
•Not valid because polygon ring {0} is not closed.
•Not valid because some portion of polygon ring {0} lies in the interior of a polygon.
•Not valid because ring {0} is the first ring in a polygon of which it is not the exterior ring.
•Not valid because ring {0} lies outside the exterior ring {1} of its polygon.
•Not valid because the interior of a polygon with rings {0} and {1} is not connected.
•Not valid because of two overlapping edges in curve {0}.
•Not valid because an edge of curve {0} overlaps an edge of curve {1}.
•Not valid because some polygon has an invalid ring structure.
•Not valid because in curve {0} the edge that starts at point {1} is either a line or a degenerate arc with antipodal endpoints.
•Not valid because in curve {0} the edge that starts at point {1} is either a line or a degenerate arc with antipodal endpoints.
•Not valid, reason unknown.