001package fr.ifremer.adagio.core.dao.referential.location;
002
003/*
004 * #%L
005 * SIH-Adagio :: Core
006 * $Id: LocationExtendDao.java 12089 2014-05-20 19:37:05Z bl05b3e $
007 * $HeadURL: https://forge.ifremer.fr/svn/sih-adagio/tags/adagio-3.5.6/core/src/main/java/fr/ifremer/adagio/core/dao/referential/location/LocationExtendDao.java $
008 * %%
009 * Copyright (C) 2012 - 2013 Ifremer
010 * %%
011 * This program is free software: you can redistribute it and/or modify
012 * it under the terms of the GNU Affero General Public License as published by
013 * the Free Software Foundation, either version 3 of the License, or
014 * (at your option) any later version.
015 * 
016 * This program is distributed in the hope that it will be useful,
017 * but WITHOUT ANY WARRANTY; without even the implied warranty of
018 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
019 * GNU General Public License for more details.
020 * 
021 * You should have received a copy of the GNU Affero General Public License
022 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
023 * #L%
024 */
025
026public interface LocationExtendDao extends LocationDao {
027
028    /**
029     * Return location label from a longitude and a latitude (in decimal degrees - WG84).
030     * 
031     * @param latitude
032     *            a latitude (in decimal degrees - WG84)
033     * @param longitude
034     *            a longitude (in decimal degrees - WG84)
035     * @return A location label (corresponding to a statistical rectangle), or null if no statistical rectangle exists
036     *         for this position
037     */
038    String getLocationLabelByLatLong(Float latitude, Float longitude);
039
040    /**
041     * Return a location Id, from a longitude and a latitude (in decimal degrees - WG84).
042     * This method typically use getLocationLabelByLatLong().
043     * 
044     * @param latitude
045     *            a latitude (in decimal degrees - WG84)
046     * @param longitude
047     *            a longitude (in decimal degrees - WG84)
048     * @return A location Id (corresponding to a statistical rectangle), or null if no statistical rectangle exists for
049     *         this position
050     */
051    Integer getLocationIdByLabelAndLocationLevel(String locationLabel, Integer[] locationLevelIds);
052}