Class LandOrSeaServiceImpl

  • All Implemented Interfaces:
    LandOrSeaService

    public class LandOrSeaServiceImpl
    extends Object
    implements LandOrSeaService
    Polygons used here are derived from OSM data, © OpenStreetMap contributors.
    • Constructor Detail

      • LandOrSeaServiceImpl

        public LandOrSeaServiceImpl()
    • Method Detail

      • setDataFolderPath

        public void setDataFolderPath​(String dataFolderPath)
      • classifyLocation

        public String classifyLocation​(float longitude,
                                       float latitude,
                                       int allowedDistanceMargin)
                                throws Exception
        Classify location.
        Specified by:
        classifyLocation in interface LandOrSeaService
        Parameters:
        longitude - the longitude
        latitude - the latitude
        allowedDistanceMargin - 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: LandOrSeaService
        Checks if is on land.
        Specified by:
        isOnLand in interface LandOrSeaService
        Parameters:
        longitude - the longitude
        latitude - the latitude
        allowedDistanceFromLand - the allowed distance from land
        Returns:
        the boolean
        Throws:
        Exception - the exception