[osg-users] Adding OGRFeatures to the global Index

Auke-Dirk Pietersma aukedirk at horus.nu
Wed May 11 00:51:34 PDT 2016


I'm having a hardtime finding documentation on populating the global index with ogrfeature data, such that i can use the IntersectionPicker. Can anyone point me in the right direction?


auto map = mapnode->getMap();
OGRFeatureOptions feature_opt;
feature_opt.name() = url;
feature_opt.url() = url;
feature_opt.buildSpatialIndex() = true;

FeatureGeomModelOptions fgm_opt;
fgm_opt.featureOptions() = feature_opt;
fgm_opt.styles() = new StyleSheet();

map->addModelLayer( new ModelLayer(url, fgm_opt) );

Now i would like to pick the geometries within the scene. I do ofcourse get to see the geometries with correct style. However the picking provides an empty result.


Thank you!


Read this topic online here:

More information about the osg-users mailing list