📄 classvtabstractlayer.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"><title>vtlib library: vtAbstractLayer Class Reference</title><link href="doxygen.css" rel="stylesheet" type="text/css"><link href="tabs.css" rel="stylesheet" type="text/css"></head><body><!-- Generated by Doxygen 1.4.5 --><div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="modules.html"><span>Modules</span></a></li> <li id="current"><a href="annotated.html"><span>Classes</span></a></li> <li><a href="dirs.html"><span>Directories</span></a></li> </ul></div><div class="tabs"> <ul> <li><a href="annotated.html"><span>Class List</span></a></li> <li><a href="hierarchy.html"><span>Class Hierarchy</span></a></li> <li><a href="functions.html"><span>Class Members</span></a></li> </ul></div><h1>vtAbstractLayer Class Reference</h1><!-- doxytag: class="vtAbstractLayer" --><!-- doxytag: inherits="vtLayer" -->Inheritance diagram for vtAbstractLayer:<p><center><img src="classvtAbstractLayer__inherit__graph.png" border="0" usemap="#vtAbstractLayer__inherit__map" alt="Inheritance graph"></center><map name="vtAbstractLayer__inherit__map"><area href="classvtLayer.html" shape="rect" coords="31,7,97,34" alt=""></map><center><font size="2">[<a href="graph_legend.html">legend</a>]</font></center><a href="classvtAbstractLayer-members.html">List of all members.</a><hr><a name="_details"></a><h2>Detailed Description</h2>An abstract layer is a traditional GIS-style set of geometry features with attributes. It can be shown on the terrain in a variety of ways (styles). Style is described with a set of properties, encoded as a <a class="elRef" doxygen="vtdata.tag:../vtdata/" href="../vtdata/classvtTagArray.html">vtTagArray</a>. These are the supported style properties, all of which are optional:<ul><li>"Filename": If the layer should be loaded from disk, this is the filename to load from. It can be a relative path anywhere on the VTP data paths, or an absolute path.</li></ul><p><ul><li>"ObjectGeometry": true to show geometry for each point of the features.<ul><li>"ObjectGeomColor": The color of each geometry (R,G,B as float 0..1). Default is white.</li><li>"ObjectColorFieldIndex": The 0-based index of the field which contains the color of each geometry.</li><li>"ObjectGeomHeight": The height in meters of each geometry above the ground.</li><li>"ObjectGeomSize": The size in meters of each geometry.</li></ul></li></ul><p><ul><li>"LineGeometry": true to show lines running though each point of the features.<ul><li>"LineGeomColor": The color of each line (R,G,B as float 0..1). Default is white.</li><li>"LineColorFieldIndex": The 0-based index of the field which contains the color of each line.</li><li>"LineGeomHeight": The height in meters of each line above the ground.</li><li>"LineWidth": Pixel width of the 3D lines to create. Default it 1.</li><li>"Tessellate": true to tesslate the geometry of each feature before draping it on the ground. This can produce a smoother result.</li></ul></li></ul><p><ul><li>"Labels": true to show floating text labels for the features.<ul><li>"LabelColor": The color of each label (R,G,B as float 0..1) Default is white.</li><li>"TextColorFieldIndex": The 0-based index of the field which contains the color of each label.</li><li>"TextFieldIndex": The 0-based index of the field which contains the text you want to use for the label. For example, if you have several fields called "ID", "Name", and "Address", and you want to show "Name", use the value 1.</li><li>"LabelHeight": Height in meters above the ground. This is the distance from the ground surface to the lower edge of the text label. Default is 0.</li><li>"LabelSize": Size (vertical extent) of the text labels in meters. Default is 18.</li><li>"Font": Filename (may include path) of the font to use for text labels. Example: "Arial.ttf"</li></ul></li></ul><p>When a terrain description (<a class="el" href="classTParams.html">TParams</a>) contains an abstract layer, these same style properties are encoded. On disk, they are stored as XML elements. <p><table border="0" cellpadding="0" cellspacing="0"><tr><td></td></tr><tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classvtAbstractLayer.html#a2a3aa6126d5ce41e23b824c11476b36">CreateStyledFeatures</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classvtAbstractLayer.html#807f865037533a36eb5622dbaa4fef70">CreateLineGeometryForPoints</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classvtAbstractLayer.html#43202d925f0f296d3dc73b7b1b68acb0">CreateObjectGeometry</a> (unsigned int iIndex)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classvtAbstractLayer.html#28e4a69aacd4ea949b6d300505b28f48">CreateLineGeometry</a> (unsigned int iIndex)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classvtAbstractLayer.html#53d6ddc5a379bee3ccac843b7ab72461">CreateFeatureLabel</a> (unsigned int iIndex)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classvtAbstractLayer.html#02d601c8c700fd28ed6cb0c87ec1a09e">ReleaseGeometry</a> ()</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="classvtAbstractLayer.html#73c560ac4b48a50c1e8b48764abcd33e">ReleaseFeatureGeometry</a> (vtFeature *f)</td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a8c05e07d431577425d6cfb90b5df71f"></a><!-- doxytag: member="vtAbstractLayer::SetProperties" ref="a8c05e07d431577425d6cfb90b5df71f" args="(const vtTagArray &props)" -->void </td><td class="memItemRight" valign="bottom"><a class="el" href="classvtAbstractLayer.html#a8c05e07d431577425d6cfb90b5df71f">SetProperties</a> (const <a class="elRef" doxygen="vtdata.tag:../vtdata/" href="../vtdata/classvtTagArray.html">vtTagArray</a> &props)</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Set the properties for this set, which includes style. <br></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7c89833a76381c4300c2888bf85d4729"></a><!-- doxytag: member="vtAbstractLayer::GetProperties" ref="7c89833a76381c4300c2888bf85d4729" args="()" --><a class="elRef" doxygen="vtdata.tag:../vtdata/" href="../vtdata/classvtTagArray.html">vtTagArray</a> & </td><td class="memItemRight" valign="bottom"><a class="el" href="classvtAbstractLayer.html#7c89833a76381c4300c2888bf85d4729">GetProperties</a> ()</td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">Get the properties for this set, which includes style. <br></td></tr><tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr><tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f4c6dce1a1cd999ec4710a113a877b7c"></a><!-- doxytag: member="vtAbstractLayer::pSet" ref="f4c6dce1a1cd999ec4710a113a877b7c" args="" --><a class="elRef" doxygen="vtdata.tag:../vtdata/" href="../vtdata/classvtFeatureSet.html">vtFeatureSet</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="classvtAbstractLayer.html#f4c6dce1a1cd999ec4710a113a877b7c">pSet</a></td></tr><tr><td class="mdescLeft"> </td><td class="mdescRight">This is the set of features which the layer contains. <br></td></tr></table><hr><h2>Member Function Documentation</h2><a class="anchor" name="53d6ddc5a379bee3ccac843b7ab72461"></a><!-- doxytag: member="vtAbstractLayer::CreateFeatureLabel" ref="53d6ddc5a379bee3ccac843b7ab72461" args="(unsigned int iIndex)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void vtAbstractLayer::CreateFeatureLabel </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">unsigned int </td> <td class="mdname1" valign="top" nowrap> <em>iIndex</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Given a featureset and style description, create a labels and place it on the terrain.<p>If the features are 2D or 3D points (<a class="elRef" doxygen="vtdata.tag:../vtdata/" href="../vtdata/classvtFeatureSetPoint2D.html">vtFeatureSetPoint2D</a> or <a class="elRef" doxygen="vtdata.tag:../vtdata/" href="../vtdata/classvtFeatureSetPoint3D.html">vtFeatureSetPoint3D</a>) then the labels will be placed at those points. If the features are 2D polygons (<a class="elRef" doxygen="vtdata.tag:../vtdata/" href="../vtdata/classvtFeatureSetPolygon.html">vtFeatureSetPolygon</a>) then the point used is the centroid of the polygon. </td> </tr></table><a class="anchor" name="28e4a69aacd4ea949b6d300505b28f48"></a><!-- doxytag: member="vtAbstractLayer::CreateLineGeometry" ref="28e4a69aacd4ea949b6d300505b28f48" args="(unsigned int iIndex)" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0"> <tr> <td class="md" nowrap valign="top">void vtAbstractLayer::CreateLineGeometry </td> <td class="md" valign="top">( </td> <td class="md" nowrap valign="top">unsigned int </td> <td class="mdname1" valign="top" nowrap> <em>iIndex</em> </td> <td class="md" valign="top"> ) </td> <td class="md" nowrap></td> </tr> </table> </td> </tr></table><table cellspacing="5" cellpadding="0" border="0"> <tr> <td> </td> <td><p>Given a featureset and style description, create line geometry. If 2D, it will be draped on the terrain. Polygon features (<a class="elRef" doxygen="vtdata.tag:../vtdata/" href="../vtdata/classvtFeatureSetPolygon.html">vtFeatureSetPolygon</a>) will also be created as line geometry (unfilled polygons) and draped on the ground. </td> </tr></table><a class="anchor" name="807f865037533a36eb5622dbaa4fef70"></a><!-- doxytag: member="vtAbstractLayer::CreateLineGeometryForPoints" ref="807f865037533a36eb5622dbaa4fef70" args="()" --><p><table class="mdTable" cellpadding="2" cellspacing="0"> <tr> <td class="mdRow"> <table cellpadding="0" cellspacing="0" border="0">
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -