From b59f321cbc96f2cc9e1d0fb5e3a0d929f270a30a Mon Sep 17 00:00:00 2001 From: osbornb Date: Thu, 8 Oct 2015 13:39:16 -0600 Subject: [PATCH] Feature Overlay Query query features with projection method --- .../tiles/overlay/FeatureOverlayQuery.java | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) diff --git a/geopackage-sdk/src/main/java/mil/nga/geopackage/tiles/overlay/FeatureOverlayQuery.java b/geopackage-sdk/src/main/java/mil/nga/geopackage/tiles/overlay/FeatureOverlayQuery.java index 2e3e7884..29753ee8 100644 --- a/geopackage-sdk/src/main/java/mil/nga/geopackage/tiles/overlay/FeatureOverlayQuery.java +++ b/geopackage-sdk/src/main/java/mil/nga/geopackage/tiles/overlay/FeatureOverlayQuery.java @@ -405,19 +405,32 @@ public BoundingBox buildClickBoundingBox(LatLng latLng, View view, GoogleMap map return boundingBox; } + /** + * Query for features in the WGS84 projected bounding box + * + * @param boundingBox query bounding box in WGS84 projection + * @return feature index results, must be closed + */ + public FeatureIndexResults queryFeatures(BoundingBox boundingBox) { + mil.nga.geopackage.projection.Projection projection = ProjectionFactory.getProjection(ProjectionConstants.EPSG_WORLD_GEODETIC_SYSTEM); + FeatureIndexResults results = queryFeatures(boundingBox, projection); + return results; + } + /** * Query for features in the bounding box * * @param boundingBox query bounding box + * @param projection bounding box projection * @return feature index results, must be closed */ - public FeatureIndexResults queryFeatures(BoundingBox boundingBox) { + public FeatureIndexResults queryFeatures(BoundingBox boundingBox, mil.nga.geopackage.projection.Projection projection) { // Query for features FeatureIndexManager indexManager = featureTiles.getIndexManager(); if (indexManager == null) { throw new GeoPackageException("Index Manager is not set on the Feature Tiles and is required to query indexed features"); } - FeatureIndexResults results = indexManager.query(boundingBox, ProjectionFactory.getProjection(ProjectionConstants.EPSG_WORLD_GEODETIC_SYSTEM)); + FeatureIndexResults results = indexManager.query(boundingBox, projection); return results; }