1 | // License: GPL. Copyright 2007 by Immanuel Scholz and others
|
---|
2 | package org.openstreetmap.josm.data.projection;
|
---|
3 |
|
---|
4 | import org.openstreetmap.josm.data.Bounds;
|
---|
5 | import org.openstreetmap.josm.data.coor.EastNorth;
|
---|
6 | import 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 | */
|
---|
14 | public interface Projection {
|
---|
15 | /**
|
---|
16 | * List of all available projections.
|
---|
17 | */
|
---|
18 | public static Projection[] allProjections = new Projection[]{
|
---|
19 | new Epsg4326(),
|
---|
20 | new Mercator(),
|
---|
21 | new LambertEST(), // Still needs proper default zoom
|
---|
22 | new Lambert(), // Still needs proper default zoom
|
---|
23 | new Puwg(),
|
---|
24 | new SwissGrid(),
|
---|
25 | new UTM(),
|
---|
26 | new UTM_France_DOM(),
|
---|
27 | new LambertCC9Zones() // Still needs proper default zoom
|
---|
28 | };
|
---|
29 |
|
---|
30 | /**
|
---|
31 | * Returns the default zoom scale in pixel per degree ({@see #NavigatableComponent#scale}))
|
---|
32 | */
|
---|
33 | double getDefaultZoomInPPD();
|
---|
34 |
|
---|
35 | /**
|
---|
36 | * Convert from lat/lon to northing/easting.
|
---|
37 | *
|
---|
38 | * @param p The geo point to convert. x/y members of the point are filled.
|
---|
39 | */
|
---|
40 | EastNorth latlon2eastNorth(LatLon p);
|
---|
41 |
|
---|
42 | /**
|
---|
43 | * Convert from norting/easting to lat/lon.
|
---|
44 | *
|
---|
45 | * @param p The geo point to convert. lat/lon members of the point are filled.
|
---|
46 | */
|
---|
47 | LatLon eastNorth2latlon(EastNorth p);
|
---|
48 |
|
---|
49 | /**
|
---|
50 | * Describe the projection converter in one or two words.
|
---|
51 | */
|
---|
52 | String toString();
|
---|
53 |
|
---|
54 | /**
|
---|
55 | * Return projection code.
|
---|
56 | */
|
---|
57 | String toCode();
|
---|
58 |
|
---|
59 | /**
|
---|
60 | * Get a filename compatible string (for the cache directory)
|
---|
61 | */
|
---|
62 | String getCacheDirectoryName();
|
---|
63 |
|
---|
64 | /**
|
---|
65 | * Get the bounds of the world
|
---|
66 | */
|
---|
67 | Bounds getWorldBoundsLatLon();
|
---|
68 | }
|
---|