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

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

see #3016 - patch by xeen - fixes some zooming issues

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