Last change
on this file since 627 was 627, checked in by framm, 16 years ago |
|
-
Property svn:eol-style
set to
native
|
File size:
1.4 KB
|
Line | |
---|
1 | // License: GPL. Copyright 2007 by Immanuel Scholz and others
|
---|
2 | package org.openstreetmap.josm.data.projection;
|
---|
3 |
|
---|
4 | import org.openstreetmap.josm.data.coor.EastNorth;
|
---|
5 | import org.openstreetmap.josm.data.coor.LatLon;
|
---|
6 |
|
---|
7 | /**
|
---|
8 | * Classes subclass this are able to convert lat/lon values to
|
---|
9 | * planear screen coordinates.
|
---|
10 | *
|
---|
11 | * @author imi
|
---|
12 | */
|
---|
13 | public interface Projection {
|
---|
14 |
|
---|
15 | public static final double MAX_LAT = 85.05112877980659; // Mercator squares the world
|
---|
16 | public static final double MAX_LON = 180;
|
---|
17 | public static final double MAX_SERVER_PRECISION = 1e12;
|
---|
18 |
|
---|
19 | /**
|
---|
20 | * List of all available Projections.
|
---|
21 | */
|
---|
22 | public static Projection[] allProjections = new Projection[]{
|
---|
23 | new Epsg4326(),
|
---|
24 | new Mercator()
|
---|
25 | };
|
---|
26 |
|
---|
27 | /**
|
---|
28 | * Convert from lat/lon to northing/easting.
|
---|
29 | *
|
---|
30 | * @param p The geo point to convert. x/y members of the point are filled.
|
---|
31 | */
|
---|
32 | EastNorth latlon2eastNorth(LatLon p);
|
---|
33 |
|
---|
34 | /**
|
---|
35 | * Convert from norting/easting to lat/lon.
|
---|
36 | *
|
---|
37 | * @param p The geo point to convert. lat/lon members of the point are filled.
|
---|
38 | */
|
---|
39 | LatLon eastNorth2latlon(EastNorth p);
|
---|
40 |
|
---|
41 | /**
|
---|
42 | * Describe the projection converter in one or two words.
|
---|
43 | */
|
---|
44 | String toString();
|
---|
45 |
|
---|
46 | /**
|
---|
47 | * Get a filename compatible string (for the cache directory)
|
---|
48 | */
|
---|
49 | String getCacheDirectoryName();
|
---|
50 |
|
---|
51 | /**
|
---|
52 | * The factor to multiply with an easting coordinate to get from "easting
|
---|
53 | * units per pixel" to "meters per pixel"
|
---|
54 | */
|
---|
55 | double scaleFactor();
|
---|
56 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.