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 * @since 4285 012 */ 013public interface Datum { 014 015 /** 016 * @return a human readable name of this projection 017 */ 018 String getName(); 019 020 /** 021 * Replies the Proj.4 identifier. 022 * @return the Proj.4 identifier (as reported by cs2cs -ld) 023 * If no id exists, return null. 024 */ 025 String getProj4Id(); 026 027 /** 028 * @return the ellipsoid associated with this datum 029 */ 030 Ellipsoid getEllipsoid(); 031 032 /** 033 * Convert lat/lon from this datum to {@link Ellipsoid#WGS84} datum. 034 * @param ll original lat/lon in this datum 035 * @return lat/lon converted to WGS84 036 */ 037 LatLon toWGS84(LatLon ll); 038 039 /** 040 * Convert lat/lon from {@link Ellipsoid#WGS84} to this datum. 041 * @param ll original lat/lon in WGS84 042 * @return converted lat/lon in this datum 043 */ 044 LatLon fromWGS84(LatLon ll); 045}