geopackage-sdk/src/main/java/mil/nga/geopackage/features/index/FeatureIndexManager.java
public int index(FeatureIndexType type, boolean force) {
        if (type == null) {
            throw new GeoPackageException("FeatureIndexType is required to index");
        }
        int count = 0;
        switch (type) {
            case GEOPACKAGE:
                count = featureTableIndex.index(force);
                break;
            case METADATA:
                count = featureIndexer.index(force);
                break;
            case RTREE:
                boolean rTreeIndexed = rTreeIndexTableDao.has();
                if (!rTreeIndexed || force) {
                    if (rTreeIndexed) {
                        rTreeIndexTableDao.delete();
                    }
                    rTreeIndexTableDao.create();
                    count = rTreeIndexTableDao.count();
                }
                break;
            default:
                throw new GeoPackageException("Unsupported FeatureIndexType: "
                        + type);
        }
        return count;
    }
public int index(FeatureIndexType type, boolean force) {
        if (type == null) {
            throw new GeoPackageException("FeatureIndexType is required to index");
        }
        int count = 0;
        switch (type) {
            case GEOPACKAGE:
                count = featureTableIndex.index(force);
                break;
            case METADATA:
                count = featureIndexer.index(force);
                break;
            case RTREE:
                boolean rTreeIndexed = rTreeIndexTableDao.has();
                if (!rTreeIndexed || force) {
                    if (rTreeIndexed) {
                        rTreeIndexTableDao.delete();
                    }
                    rTreeIndexTableDao.create();
                    count = rTreeIndexTableDao.count();
                }
                break;
            default:
                throw new GeoPackageException("Unsupported FeatureIndexType: "
                        + type);
        }
        return count;
    }
public int index ( FeatureIndexType type , boolean force ) { if ( type == null ) { throw new GeoPackageException ( "FeatureIndexType is required to index" ) ; } int count = 0 ; switch ( type ) { case GEOPACKAGE : count = featureTableIndex . index ( force ) ; break ; case METADATA : count = featureIndexer . index ( force ) ; break ; case RTREE : boolean rTreeIndexed = rTreeIndexTableDao . has ( ) ; if ( ! rTreeIndexed || force ) { if ( rTreeIndexed ) { rTreeIndexTableDao . delete ( ) ; } rTreeIndexTableDao . create ( ) ; count = rTreeIndexTableDao . count ( ) ; } break ; default : throw new GeoPackageException ( "Unsupported FeatureIndexType: " + type ) ; } return count ; }
Index the feature table

@param type  index location type
@param force true to force re-indexing
@return count
Index the feature table