xml-multi-surface

The xml-multi-surface geometry builder builds an aggregate geometry made up solely of surface geometries.

This builder does not require any data parameters, and will construct the multi surface geometry from existing surface geometries. Thus, before the xml-multi-surface geometry builder is deactivated, other geometry builders should have been activated, passing their constructed surfaces to the xml-multi-surface geometry builder.

Each of the surfaces passed to the xml-multi-surface geometry builder should be either simple or composite surfaces. The accepted surfaces do not have a restraint on their spatial relationship - they may be disjoint, overlapping, touching, or completely disconnected.

builder type: composite - accepts surface geometries

geometry constructed: multi surface

data parameters:

The following demote-incomplete-geometry and allow-empty-multi data parameters change how the geometry is handled in error conditions. If both of the data parameters are set to false, whenever the geometry builder receives no surfaces to create a multi surface from, it will raise an error and terminate the translation.

Data Name

Value

Required/
Optional

keep-as-multi

Setting this optional parameter to "false" directs the builder to return a single surface rather than a multi-surface geometry when only one surface geometry is received.

Range: false | true 

Default: true

Optional

demote-incomplete-geometry

This Boolean parameter determines if incomplete geometry should be demoted instead of producing an error. If set to true, whenever the geometry builder receives no surfaces to create a multi surface from, the multi surface will be downgraded to a null geometry.

Range: true|false

Default: false

Optional

allow-empty-multi

This data parameter determines if an empty multi-surface should be returned.

Range: false | true

Default: false

Optional

coordinate-system

Specifies the coordinate system name. If the expression sequence for the coordinate-system evaluates to the empty string, then the coordinate system for the feature being built will not be set.

Range: String

Optional

name

Specifies the geometry’s name.

Range: String

Optional

Example: Building a multi surface

multisurface.xml

<?xml version="1.0"?>
<multisurface>
	<simplesurface>
		<area>
			0.0,0.0,0.0 5.0,0.0,5.0 5.0,5.0,10.0 0.0,5.0,5.0 0.0,0.0,0.0
		</area>
		<area>
			2.0,2.0,4.0 3.0,2.0,5.0 3.0,3.0,6.0 2.0,3.0,5.0 2.0,2.0,4.0
		</area>
	</simplesurface>
	<simplesurface>
		<area>
			0.0,0.0,0.0 5.0,0.0,0.0 5.0,5.0,0.0 0.0,5.0,0.0 0.0,0.0,0.0
		</area>
   </simplesurface>
</multisurface>

multisurface.xmp

<?xml version="1.0"?>
<xfMap>
	<feature-map>
		<mapping match="multisurface">
			<feature-type> <literal expr="multisurface" /> </feature-type>
			<geometry activate="xml-multi-surface" />
		</mapping>
	</feature-map>
	<feature-content-map>
		<mapping match="simplesurface">
			<geometry activate="xml-face" />
		</mapping>
		<mapping match="area">
			<geometry activate="xml-area">
				<data name="data-string"> <extract expr="." /> </data>
			</geometry>
		</mapping>
	</feature-content-map>
</xfMap>