Class LandOrSeaServiceImpl
- java.lang.Object
-
- org.genesys.geotools.service.impl.LandOrSeaServiceImpl
-
- All Implemented Interfaces:
LandOrSeaService
public class LandOrSeaServiceImpl extends Object implements LandOrSeaService
Polygons used here are derived from OSM data, © OpenStreetMap contributors.
-
-
Constructor Summary
Constructors Constructor Description LandOrSeaServiceImpl()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidafterPropertiesSet()After properties set.StringclassifyLocation(float longitude, float latitude, int allowedDistanceMargin)Classify location.BooleanisOnLand(float longitude, float latitude, int allowedDistanceFromLand)Checks if is on land.voidsetDataFolderPath(String dataFolderPath)
-
-
-
Method Detail
-
setDataFolderPath
public void setDataFolderPath(String dataFolderPath)
-
afterPropertiesSet
public void afterPropertiesSet() throws MalformedURLException, IOExceptionAfter properties set.- Throws:
MalformedURLException- the malformed url exceptionIOException- Signals that an I/O exception has occurred.
-
classifyLocation
public String classifyLocation(float longitude, float latitude, int allowedDistanceMargin) throws Exception
Classify location.- Specified by:
classifyLocationin interfaceLandOrSeaService- Parameters:
longitude- the longitudelatitude- the latitudeallowedDistanceMargin- the allowed distance margin- Returns:
- the string
- Throws:
Exception- the exception
-
isOnLand
public Boolean isOnLand(float longitude, float latitude, int allowedDistanceFromLand) throws Exception
Description copied from interface:LandOrSeaServiceChecks if is on land.- Specified by:
isOnLandin interfaceLandOrSeaService- Parameters:
longitude- the longitudelatitude- the latitudeallowedDistanceFromLand- the allowed distance from land- Returns:
- the boolean
- Throws:
Exception- the exception
-
-