xml-multi-solid
The xml-multi-solid geometry builder builds an aggregate geometry made up solely of solid geometries. This builder does not require any data parameters, and will construct the multi solid geometry from existing solid geometries. Thus, before the xml-multi-solid geometry builder is deactivated, other geometry builders should have been activated, passing their constructed solids to the xml-multi-solid geometry builder.
Each of the solids passed to the xml-multi-solid geometry builder should be either simple or composite solids. The accepted solids do not have a restraint on their spatial relationship - they may be disjoint, overlapping, touching, or completely disconnected.
builder type: composite - accepts solid geometries
geometry constructed: multi solids
data parameters:
The following demote-incomplete-geometry and allow-empty-composite 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 solids to create a multi solid 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 solid rather than a multi-solid geometry when only one solid geometry is received. Range: false | true Default: true |
Optional |
demote-incomplete-geometry |
This data parameter determines if incomplete geometry should be demoted instead of producing an error. If set to true, whenever the geometry builder receives no solids to create a multi solid from, the multi solid will be downgraded to a null geometry. Range: true|false Default: false |
Optional |
allow-empty-composite |
This boolean parameter determines if incomplete geometry should be left incomplete instead of producing an error. If set to true, whenever the geometry builder receives no solids to create a multi solid from, the multi solid will be left empty and returned. Range: true|false 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 solid
multisolid.xml
<?xml version="1.0"?> <multisolid> <simplesolid> <compositesurface> <simplesurface> <area> 0.0,0.0,0.0 0.0,1.0,0.0 1.0,0.0,0.0 0.0,0.0,0.0 </area> </simplesurface> <simplesurface> <area> 0.0,0.0,0.0 1.0,0.0,0.0 1.0,1.0,1.0 0.0,0.0,0.0 </area> </simplesurface> <simplesurface> <area> 0.0,0.0,0.0 1.0,1.0,1.0 0.0,1.0,0.0 0.0,0.0,0.0 </area> </simplesurface> <simplesurface> <area> 1.0,0.0,0.0 0.0,1.0,0.0 1.0,1.0,1.0 1.0,0.0,0.0 </area> </simplesurface> </compositesurface> </simplesolid> <simplesolid> <compositesurface> <simplesurface> <area> 0.0,0.0,0.0 0.0,-1.0,0.0 -1.0,0.0,0.0 0.0,0.0,0.0 </area> </simplesurface> <simplesurface> <area> 0.0,0.0,0.0 -1.0,0.0,0.0 -1.0,-1.0,-1.0 0.0,0.0,0.0 </area> </simplesurface> <simplesurface> <area> 0.0,0.0,0.0 -1.0,-1.0,-1.0 0.0,-1.0,0.0 0.0,0.0,0.0 </area> </simplesurface> <simplesurface> <area> 1.0,0.0,0.0 0.0,-1.0,0.0 -1.0,-1.0,-1.0 -1.0,0.0,0.0 </area> </simplesurface> </compositesurface> </simplesolid> </multisolid>
multisolid.xmp
<?xml version="1.0"?> <xfMap> <feature-map> <mapping match="multisolid"> <feature-type> <literal expr="multisolid" /> </feature-type> <geometry activate="xml-multi-solid" /> </mapping> </feature-map> <feature-content-map> <mapping match="simplesolid"> <geometry activate="xml-enclosed-surface" /> </mapping> <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>