Feature Geometry model driver
This driver builds OSG geometries out of vector feature data.
Today, this driver simply tessellates vector data into geometry, with an optional Height offset (so you can position the geometry above the terrain). In the future this driver is slated to support footprint extrusion, texturing, and other features.
Configuration
This driver supports the following sub-elements:
<features> Describes the features to render required <style> Defines overall appearance of the vector data optional <class> Defines one or more feature classes for categorization of features optional <max_triangle_size> Specifies the maximum length of a triangle edge, in degrees. Applies to geocentric maps only. Use this to control the tessellation of geometry so that large shapes can better conform to the shape of the earth's ellipsoid. optional, default="5.0" <feature_name> An expression that resolves to a name for each feature. The name will be set on the osg::Geometry in the scene graph.
Example
See the feature_geom.earth sample in the repo
<map name="Feature Geometry Demo" type="geocentric">
<image name="world" driver="gdal">
<url>../data/world.tif</url>
</image>
<model name="states" driver="feature_geom">
<!-- Configure the OGR feature driver to read the shapefile -->
<features name="states" driver="ogr">
<url>../data/usa.shp</url>
</features>
<!-- Sets the name property on each geometry to the value of the "name" attribute -->
<feature_name>[name]</feature_name>
<!-- Appearance details -->
<style type="text/css">
states {
stroke: #ffff00;
stroke-width: 1.0;
altitude-offset: 1000;
}
</style>
</model>
<lighting>false</lighting>
</map>
