source: josm/src/org/openstreetmap/josm/data/projection/Projection.java@ 99

Last change on this file since 99 was 99, checked in by imi, 18 years ago
  • added GeoImage feature (showing images on a tracklog)
  • added zoom slider
  • added Escape cancels selection rectangle
  • added "Save password" option to Auth-dialog
  • fixed that redo/undo buttons were not enabled
  • fixed hotkeys beeing inaccessible when no data is loaded
File size: 1.2 KB
Line 
1package org.openstreetmap.josm.data.projection;
2
3import org.openstreetmap.josm.data.coor.EastNorth;
4import org.openstreetmap.josm.data.coor.LatLon;
5
6/**
7 * Classes subclass this are able to convert lat/lon values to
8 * planear screen coordinates.
9 *
10 * @author imi
11 */
12public interface Projection {
13
14 public static double MAX_LAT = 85.05112877980659; // Mercator squares the world
15 public static double MAX_LON = 180;
16 public static final double MAX_SERVER_PRECISION = 1e12;
17
18 /**
19 * List of all available Projections.
20 */
21 public static final Projection[] allProjections = new Projection[]{
22 new Epsg4326(),
23 new Mercator()
24 };
25
26 /**
27 * Convert from lat/lon to northing/easting.
28 *
29 * @param p The geo point to convert. x/y members of the point are filled.
30 */
31 EastNorth latlon2eastNorth(LatLon p);
32
33 /**
34 * Convert from norting/easting to lat/lon.
35 *
36 * @param p The geo point to convert. lat/lon members of the point are filled.
37 */
38 LatLon eastNorth2latlon(EastNorth p);
39
40 /**
41 * Describe the projection converter in one or two words.
42 */
43 String toString();
44
45 /**
46 * Get a filename compatible string (for the cache directory)
47 */
48 String getCacheDirectoryName();
49}
Note: See TracBrowser for help on using the repository browser.