osgearth icon indicating copy to clipboard operation
osgearth copied to clipboard

Feature Request: render point features with FeatureImageLayer

Open GISerliang opened this issue 2 years ago • 1 comments

I rendered one shapefile file of point type and I created a PointSymbol for it, but it did not show in the map. Then I found the 'renderFeaturesForStyle' Function in FeatureImageLayer only support 'LineSymbol', 'PolygonSymbol' and 'CoverageSymbol' like this:


FeatureImageLayer::renderFeaturesForStyle(Session*           session,
                                          const Style&       style,
                                          const FeatureList& features,
                                          const GeoExtent&   imageExtent,
                                          osg::Image*        image) const
{
    OE_DEBUG << LC << "Rendering " << features.size() << " features for " << imageExtent.toString() << "\n";

    // A processing context to use with the filters:
    FilterContext context(session);
    context.setProfile(getFeatureSource()->getFeatureProfile());

    const LineSymbol*    masterLine = style.getSymbol<LineSymbol>();
    const PolygonSymbol* masterPoly = style.getSymbol<PolygonSymbol>();
    const CoverageSymbol* masterCov = style.getSymbol<CoverageSymbol>();
...

I wanted to know how to render the point features with FeatureImageLayer. Please help me. I only wanted this map like this after rendered. image

osgEarth: 3.1

GISerliang avatar Jul 29 '21 08:07 GISerliang

Thank you for catching this; I have tagged it for feature development. Feel free to tackle it if you want to submit a PR; otherwise it is in the queue for 3.3.

gwaldron avatar Jul 29 '21 12:07 gwaldron