package de.apps4ics.mountainnavigation.pois;

import org.osmdroid.util.GeoPoint;

/**
 * This file is part of MountainNavigation.
 *
 * MountainNavigation is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * MountainNavigation is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with MountainNavigation.  If not, see <http://www.gnu.org/licenses/>.
 *
 * @copyright Copyright (c) 2016 Vinzenz Rosenkanz <vinzenz.rosenkranz@gmail.com>
 *
 * @author Vinzenz Rosenkranz <vinzenz.rosenkranz@gmail.com>
 */
public class DbGeoPoint extends Poi {
    private double lat;
    private double lon;
    private double alt;
    private long _time;

    public DbGeoPoint(GeoPoint gp) {
        this.lat = gp.getLatitude();
        this.lon = gp.getLongitude();
        this.alt = gp.getAltitude();
    }
    public DbGeoPoint(long _id) {
        super(_id, Types.GP);
    }
    public DbGeoPoint(){
        super(Types.GP);
    }

    public DbGeoPoint(double aLatitude, double aLongitude, double aAltitude) {
        this(aLatitude, aLongitude, aAltitude, System.currentTimeMillis());
    }

    public DbGeoPoint(double aLatitude, double aLongitude, double aAltitude, long _time) {
        this(0, aLatitude, aLongitude, aAltitude, _time);
    }

    public DbGeoPoint(long id, double lat, double lon, double alt, long time){
        super(id, Types.GP);
        this.lat = lat;
        this.lon = lon;
        this.alt = alt;
        this._time = time;
    }

    public double getLat(){
        return lat;
    }

    public double getLon(){
        return lon;
    }

    public double getAlt(){
        return alt;
    }

    public long getTime(){
        return _time;
    }

    public void setId(long id){
        _id = id;
    }
}
