Last active
April 12, 2016 03:49
-
-
Save ahodroj/d9fdb5f4813eb90ae07cc256c3f7d3c7 to your computer and use it in GitHub Desktop.
Sample Geospatial Query in XAP11
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public GasStation findNearbyGasStation(Point location, int radius) { | |
SQLQuery<GasStation> query = new SQLQuery(GasStation.class, "location spatial:within ?") | |
.setParameter(1, ShapeFactory.circle(location, radius)); | |
return gigaSpace.read(query); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment