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

Last change on this file since 5548 was 5548, checked in by bastiK, 11 years ago

remove Projection classes (replaced by data/epsg file)

concludes the projection rework from ealier this year

  • Property svn:eol-style set to native
File size: 1.9 KB
Line 
1// License: GPL. For details, see LICENSE file.
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 * A projection, i.e. a class that supports conversion from lat/lon
10 * to east/north and back.
11 *
12 * The conversion from east/north to the screen coordinates is simply a scale
13 * factor and x/y offset.
14 */
15public interface Projection {
16 /**
17 * The default scale factor in east/north units per pixel ({@link #NavigatableComponent#scale})).
18 * FIXME: misnomer
19 * @return the scale factor
20 */
21 double getDefaultZoomInPPD();
22
23 /**
24 * Convert from lat/lon to easting/northing.
25 *
26 * @param ll the geographical point to convert (in WGS84 lat/lon)
27 * @return the corresponding east/north coordinates
28 */
29 EastNorth latlon2eastNorth(LatLon ll);
30
31 /**
32 * Convert from easting/norting to lat/lon.
33 *
34 * @param en the geographical point to convert (in projected coordinates)
35 * @return the corresponding lat/lon (WGS84)
36 */
37 LatLon eastNorth2latlon(EastNorth en);
38
39 /**
40 * Describe the projection in one or two words.
41 * @return the name / description
42 */
43 String toString();
44
45 /**
46 * Return projection code.
47 *
48 * This should be a unique identifier.
49 * If projection supports parameters, return a different code
50 * for each set of parameters.
51 *
52 * The EPSG code can be used (if defined for the projection).
53 *
54 * @return the projection identifier
55 */
56 String toCode();
57
58 /**
59 * Get a filename compatible string (for the cache directory).
60 * @return the cache directory name (base name)
61 */
62 String getCacheDirectoryName();
63
64 /**
65 * Get the bounds of the world.
66 * @return the supported lat/lon rectangle for this projection
67 */
68 Bounds getWorldBoundsLatLon();
69}
Note: See TracBrowser for help on using the repository browser.