Search in sources :

Example 1 with FeatureTileTableLinker

use of mil.nga.geopackage.extension.nga.link.FeatureTileTableLinker in project geopackage-android-map by ngageoint.

the class GeoPackageOverlayFactory method getLinkedFeatureOverlay.

/**
 * Create a composite overlay linking the feature overly with
 *
 * @param featureOverlay feature overlay
 * @param geoPackage     GeoPackage
 * @return linked bounded overlay
 */
public static BoundedOverlay getLinkedFeatureOverlay(FeatureOverlay featureOverlay, GeoPackage geoPackage) {
    BoundedOverlay overlay;
    // Get the linked tile daos
    FeatureTileTableLinker linker = new FeatureTileTableLinker(geoPackage);
    List<TileDao> tileDaos = linker.getTileDaosForFeatureTable(featureOverlay.getFeatureTiles().getFeatureDao().getTableName());
    if (!tileDaos.isEmpty()) {
        // Create a composite overlay to search for existing tiles before drawing from features
        overlay = getCompositeOverlay(tileDaos, featureOverlay);
    } else {
        overlay = featureOverlay;
    }
    return overlay;
}
Also used : FeatureTileTableLinker(mil.nga.geopackage.extension.nga.link.FeatureTileTableLinker) TileDao(mil.nga.geopackage.tiles.user.TileDao)

Aggregations

FeatureTileTableLinker (mil.nga.geopackage.extension.nga.link.FeatureTileTableLinker)1 TileDao (mil.nga.geopackage.tiles.user.TileDao)1