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

Last change on this file since 1823 was 1823, checked in by stoecker, 15 years ago

some projection and zoom cleanups - projection classes still need better handling of outside-world coordinates

  • Property svn:eol-style set to native
File size: 1.6 KB
Line 
1// License: GPL. Copyright 2007 by Immanuel Scholz and others
2package org.openstreetmap.josm.data.projection;
3
4import org.openstreetmap.josm.data.coor.EastNorth;
5import org.openstreetmap.josm.data.coor.LatLon;
6import org.openstreetmap.josm.data.Bounds;
7import org.openstreetmap.josm.data.ProjectionBounds;
8
9/**
10 * Classes implementing this are able to convert lat/lon values to
11 * planar screen coordinates.
12 *
13 * @author imi
14 */
15public interface Projection {
16 /**
17 * Minimum difference in location to not be represented as the same position.
18 */
19 public static final double MAX_SERVER_PRECISION = 1e12;
20
21 /**
22 * List of all available projections.
23 */
24 public static Projection[] allProjections = new Projection[]{
25 new Epsg4326(),
26 new Mercator(),
27 new Lambert(),
28 new LambertEST(),
29 new SwissGrid(),
30 new UTM()
31 };
32
33 /**
34 * Convert from lat/lon to northing/easting.
35 *
36 * @param p The geo point to convert. x/y members of the point are filled.
37 */
38 EastNorth latlon2eastNorth(LatLon p);
39
40 /**
41 * Convert from norting/easting to lat/lon.
42 *
43 * @param p The geo point to convert. lat/lon members of the point are filled.
44 */
45 LatLon eastNorth2latlon(EastNorth p);
46
47 /**
48 * Describe the projection converter in one or two words.
49 */
50 String toString();
51
52 /**
53 * Return projection code.
54 */
55 String toCode();
56
57 /**
58 * Get a filename compatible string (for the cache directory)
59 */
60 String getCacheDirectoryName();
61
62 /**
63 * Get the bounds of the world
64 */
65 Bounds getWorldBoundsLatLon();
66}
Note: See TracBrowser for help on using the repository browser.