Commit 299dbcda authored by Matija Obreza's avatar Matija Obreza
Browse files

Expose classifyLocation method

parent 657888b9
Pipeline #2479 passed with stage
in 1 minute and 7 seconds
......@@ -32,4 +32,15 @@ public interface LandOrSeaService {
*/
public Boolean isOnLand(float longitude, float latitude, int allowedDistanceFromLand) throws Exception;
/**
* Classifies location as one of Land, Coastal or Water
*
* @param longitude the longitude
* @param latitude the latitude
* @param allowedDistanceFromLand the allowed distance from land
* @return Land, Coastal or Water
* @throws Exception
*/
String classifyLocation(float longitude, float latitude, int allowedDistanceMargin) throws Exception;
}
......@@ -120,6 +120,7 @@ public class LandOrSeaServiceImpl implements LandOrSeaService {
* @return the string
* @throws Exception the exception
*/
@Override
public String classifyLocation(float longitude, float latitude, int allowedDistanceMargin) throws Exception {
try {
return classifierCache.get(new LonLatCacheKey(longitude, latitude, allowedDistanceMargin));
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment