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 | // global projections
|
---|
20 | new Epsg4326(),
|
---|
21 | new Mercator(),
|
---|
22 | new UTM(),
|
---|
23 | // regional - alphabetical order by country name
|
---|
24 | new LambertEST(), // Still needs proper default zoom
|
---|
25 | new Lambert(), // Still needs proper default zoom
|
---|
26 | new LambertCC9Zones(), // Still needs proper default zoom
|
---|
27 | new UTM_France_DOM(),
|
---|
28 | new TransverseMercatorLV(),
|
---|
29 | new Puwg(),
|
---|
30 | new Epsg3008(), // SWEREF99 13 30
|
---|
31 | new SwissGrid(),
|
---|
32 | };
|
---|
33 |
|
---|
34 | /**
|
---|
35 | * Returns the default zoom scale in pixel per degree ({@see #NavigatableComponent#scale}))
|
---|
36 | */
|
---|
37 | double getDefaultZoomInPPD();
|
---|
38 |
|
---|
39 | /**
|
---|
40 | * Convert from lat/lon to northing/easting.
|
---|
41 | *
|
---|
42 | * @param p The geo point to convert. x/y members of the point are filled.
|
---|
43 | */
|
---|
44 | EastNorth latlon2eastNorth(LatLon p);
|
---|
45 |
|
---|
46 | /**
|
---|
47 | * Convert from norting/easting to lat/lon.
|
---|
48 | *
|
---|
49 | * @param p The geo point to convert. lat/lon members of the point are filled.
|
---|
50 | */
|
---|
51 | LatLon eastNorth2latlon(EastNorth p);
|
---|
52 |
|
---|
53 | /**
|
---|
54 | * Describe the projection converter in one or two words.
|
---|
55 | */
|
---|
56 | String toString();
|
---|
57 |
|
---|
58 | /**
|
---|
59 | * Return projection code.
|
---|
60 | */
|
---|
61 | String toCode();
|
---|
62 |
|
---|
63 | /**
|
---|
64 | * Get a filename compatible string (for the cache directory)
|
---|
65 | */
|
---|
66 | String getCacheDirectoryName();
|
---|
67 |
|
---|
68 | /**
|
---|
69 | * Get the bounds of the world
|
---|
70 | */
|
---|
71 | Bounds getWorldBoundsLatLon();
|
---|
72 | }
|
---|