Skip to content

Commit

Permalink
use the feature index manager
Browse files Browse the repository at this point in the history
  • Loading branch information
bosborn committed Feb 23, 2024
1 parent 9c6ed1a commit fa1e462
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/main/java/mil/nga/geopackage/io/FeatureTileGen.java
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
import mil.nga.geopackage.GeoPackage;
import mil.nga.geopackage.GeoPackageException;
import mil.nga.geopackage.GeoPackageManager;
import mil.nga.geopackage.extension.nga.index.FeatureTableIndex;
import mil.nga.geopackage.features.index.FeatureIndexManager;
import mil.nga.geopackage.features.user.FeatureDao;
import mil.nga.geopackage.tiles.TileBoundingBoxUtils;
import mil.nga.geopackage.tiles.features.DefaultFeatureTiles;
Expand Down Expand Up @@ -862,9 +862,9 @@ public static void generate() {
FeatureDao featureDao = featureGeoPackage.getFeatureDao(featureTable);

// Index the feature table if needed
FeatureTableIndex featureIndex = new FeatureTableIndex(
FeatureIndexManager indexManager = new FeatureIndexManager(
featureGeoPackage, featureDao);
if (!featureIndex.isIndexed()) {
if (!indexManager.isIndexed()) {
int numFeatures = featureDao.count();
LOGGER.log(Level.INFO,
"Indexing GeoPackage '" + featureGeoPackage.getName()
Expand All @@ -874,14 +874,14 @@ public static void generate() {
"Feature Indexer", "features", LOG_INDEX_FREQUENCY,
LOG_INDEX_TIME_FREQUENCY);
indexProgress.setMax(numFeatures);
featureIndex.setProgress(indexProgress);
int indexed = featureIndex.index();
indexManager.setProgress(indexProgress);
int indexed = indexManager.index();
LOGGER.log(Level.INFO,
"Indexed GeoPackage '" + featureGeoPackage.getName()
+ "' feature table '" + featureTable + "', "
+ indexed + " features");
}
featureIndex.close();
indexManager.close();

// Create the feature tiles
FeatureTiles featureTiles = new DefaultFeatureTiles(featureGeoPackage,
Expand Down

0 comments on commit fa1e462

Please sign in to comment.