Example #1
0
const Status&
FeatureSource::open(const osgDB::Options* readOptions)
{
    if ( readOptions )
        _readOptions = readOptions;
    
    // Create and initialize the filters.
    for(unsigned i=0; i<_options.filters().size(); ++i)
    {
        const ConfigOptions& conf = _options.filters().at(i);
        FeatureFilter* filter = FeatureFilterRegistry::instance()->create( conf.getConfig(), 0L );
        if ( filter )
        {
            _filters.push_back( filter );
            filter->initialize( readOptions );
        }
    }

    _status = initialize(readOptions);
    return _status;
}
Example #2
0
const Status&
FeatureSource::open()
{    
    // Create and initialize the filters.
    for(unsigned i=0; i<_options.filters().size(); ++i)
    {
        const ConfigOptions& conf = _options.filters()[i];
        FeatureFilter* filter = FeatureFilterRegistry::instance()->create( conf.getConfig(), 0L );
        if ( filter )
        {
            if (_filters.valid() == false)
                _filters = new FeatureFilterChain();

            _filters->push_back( filter );
            filter->initialize(_readOptions.get());
        }
    }

    _status = initialize(_readOptions.get());
    return _status;
}