001// License: GPL. For details, see LICENSE file. 002package org.openstreetmap.josm.data.projection.datum; 003 004import org.openstreetmap.josm.data.coor.LatLon; 005import org.openstreetmap.josm.data.projection.Ellipsoid; 006 007/** 008 * Represents a geodetic datum. 009 * 010 * Basically it provides conversion functions from and to the WGS84 datum. 011 */ 012public interface Datum { 013 014 /** 015 * @return a human readable name of this projection 016 */ 017 String getName(); 018 019 /** 020 * Replies the Proj.4 identifier. 021 * @return the Proj.4 identifier (as reported by cs2cs -ld) 022 * If no id exists, return null. 023 */ 024 String getProj4Id(); 025 026 /** 027 * @return the ellipsoid associated with this datum 028 */ 029 Ellipsoid getEllipsoid(); 030 031 /** 032 * Convert lat/lon from this datum to {@link Ellipsoid#WGS84} datum. 033 * @param ll original lat/lon in this datum 034 * @return lat/lon converted to WGS84 035 */ 036 LatLon toWGS84(LatLon ll); 037 038 /** 039 * Convert lat/lon from {@link Ellipsoid#WGS84} to this datum. 040 * @param ll original lat/lon in WGS84 041 * @return converted lat/lon in this datum 042 */ 043 LatLon fromWGS84(LatLon ll); 044}