Skip to content

Commit

Permalink
Merge pull request #10 from ngageoint/develop
Browse files Browse the repository at this point in the history
Feature Overlay Query query features with projection method
  • Loading branch information
bosborn committed Oct 8, 2015
2 parents 0420dfc + b59f321 commit a12310c
Showing 1 changed file with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit a12310c

Please sign in to comment.