Writer Directives

The additional directives that are processed by the GeoConcept writer are listed below. The suffixes shown are prefixed by the current <WriterKeyword>_ in a mapping file. By default, the <WriterKeyword> for the GeoConcept writer is GEOCONCEPT.

DATASET

The GeoConcept writer processes the DATASET directive as described in the GeoConcept Reader, under the Reader Directives section.

DEF

The GeoConcept writer processes the DEF directive as described in the GeoConcept Reader, under the Reader Directives section. It does not make use of the IDs directive.

Additionally, the GeoConcept writer has a DEF parameter GCM_DIMENSION, and its legal values are 2D, 3D, 3DMONO and AUTO_DETECT.

In GeoConcept, a subclass is either 2D, 3D, or 3DMONO. The latter is used only for lines and polygons, and it means a 3D line or polygon in which the entire geometry is at some specific height/altitude. A 3DMONO geometry takes the Z-value from the first coordinate and stores the rest of the coordinates as 2D with the understanding that they are really 3D with the same Z-value as the first coordinate. It is impossible to write a 3D geometry to a 2D subclass, where the Z-value is retained. However, it is possible to write a 2D geometry to a 3D subclass (where the Z-value is undefined). The value of this parameter determines whether the constructed subclass is 2D or 3D. If set to AUTO_DETECT the subclass will be determined by the geometry of the first feature read.

The Workbench DEF line parameter is “Subclass geometry type?” and the default is set to AUTO_DETECT.

The example shows a DEF line with this parameter for a feature with no user attributes.

GEOCONCEPT_DEF newType  \
	gcm_type gcm_point  \
     GCM_DIMENSION 3D 

USE_CLASS_SUBCLASS_NAMES

Required/Optional: Required

This directive controls the strings that will be used for the creation of the class and subclass definitions in the output GeoConcept map. If it is set, the format attributes gcm_class_name and gcm_subclass_name will be used for the GeoConcept class and subclass definitions respectively. In a GeoConcept to GeoConcept translation, this will be set to YES by default, and for all other translations, it will be set to NO by default.

For non GeoConcept to GeoConcept translations, this directive can be set to YES, but the format attributes gcm_class_name and gcm_subclass_name must be exposed on the destination feature type definitions, and appropriate values be assigned. It is imperative that each feature type receive a combination of class and subclass values (via the format attributes) that is unique. For example, setting these attributes to the same value for both a feature type that only supports polygon geometry, and a feature type that only supports point geometry will result in a failed translation, since each combination of class and subclass supports only a single geometry type. Even if the geometries of two feature types agree in value, if their attributes are different, the result can be a loss of data, since only the first feature type definitions attribute values will be accepted.

The following is an example of this attribute being set to YES

GEOCONCEPT_USE_CLASS_SUBCLASS_NAMES YES

Workbench Parameter: Use Class and Subclass Names

TEMPLATE_MAP

Required/Optional: Required

This directive specifies the pathname to the map file that will be used as a template for the destination map. The precision, extents, and any layer information from the template map will be preserved, but class definitions will not.

Since the template map sets the precision of the coordinates, it is important to select a template map with an appropriate precision. There are two possible problems to guard against. The first is when the precision is too low, and the geometry of lines and polygons is affected by this lack of precision. For example, given a line with points at coordinates (1.001, 4.002) and (1.05, 4.082), but a precision of only .1 will result in a map with a line-type object, but whose coordinates are (1.0, 4.0) and (1.0, 4.0); i.e. the same point! In particular, polygons can suddenly change shape radically, or lose all area if they contain points that differ by a value smaller than the precision of the map.

The other problem that the user should guard against is setting the precision too high. GeoConcept maps store all coordinates as integers, multiplying coordinates by powers of ten in order to retain the fractional elements of coordinates. E.g. a coordinate of 445533.023, when stored in a map with precision of 0.0001, will store this coordinate as the integer 4,455,330,230. On a 32 bit machine, the maximum value for an integer is 2,147,483,647. It is thus easy to see that with extremely high precision maps, it is possible for coordinates at the high end of the ranges of latitudes and longitudes can be greater than this value. If this occurs, the translation will fail, and the log file will indicate that the precision of the map is too high for the given coordinates.

The below example shows the template map directive being set to particular GeoConcept map

GEOCONCEPT_TEMPLATE_MAP C:\Maps\Alps.gcm

Workbench Parameter: Template Map File

TEMPLATE_MAP_STRUCTURE_TO_DELETE

Required/Optional: Optional

Default: Class_Definitions

When a Template map is selected, it is used to determine extents and resolution of the map. This keyword controls whether the class/subclass structure of the map and all the objects in it should be deleted or not. If the default value Class_Definitions is used, then the destination map is entirely emptied out of any class and subclass definitions. What will remain in the map is the extents, resolution, and any defined global fields. By setting the attribute to Nothing the destination map is left as a copy of the template. So the effect of setting it to Nothing causeS the writer to insert data directly into (a copy of) an existing GeoConcept map.

The example shows this directive being set to insert data directly into (a copy of) an existing Geoconcept map:

GEOCONCEPT_TEMPLATE_MAP_STRUCTURE_TO_DELETE Nothing

Workbench Parameter: What should be deleted from the Template Map