How to get the height of a building? #2607
-
Hello! |
Beta Was this translation helpful? Give feedback.
Replies: 2 comments 2 replies
-
If a building feature has a height defined, it will likely be in a Feature attribute. You can use the Feature API to get it. Feature* feature;
...
auto height = feature->getDouble("height"); The attribute containing the height, and the units, and whether there is a height defined at all ... these things all depend on the dataset. |
Beta Was this translation helpful? Give feedback.
-
In this case, the height is in the osg::ref_ptr<FeatureCursor> cursor = data->createFeatureCursor();
while(cursor->hasMore()) {
Feature* feature = cursor->nextFeature();
auto height_in_stories = feature->getDouble("story_ht_");
} |
Beta Was this translation helpful? Give feedback.
In this case, the height is in the
story_ht_
attribute, as you can see in theheightExpression
.