org.openstreetmap.josm.data.projection
Interface Projection

All Known Implementing Classes:
AbstractProjection, CustomProjection

public interface Projection

A projection, i.e. a class that supports conversion from lat/lon to east/north and back. The conversion from east/north to the screen coordinates is simply a scale factor and x/y offset.


Method Summary
 LatLon eastNorth2latlon(EastNorth en)
          Convert from easting/norting to lat/lon.
 java.lang.String getCacheDirectoryName()
          Get a filename compatible string (for the cache directory).
 double getDefaultZoomInPPD()
          The default scale factor in east/north units per pixel (#NavigatableComponent#scale)).
 Bounds getWorldBoundsLatLon()
          Get the bounds of the world.
 EastNorth latlon2eastNorth(LatLon ll)
          Convert from lat/lon to easting/northing.
 java.lang.String toCode()
          Return projection code.
 java.lang.String toString()
          Describe the projection in one or two words.
 

Method Detail

getDefaultZoomInPPD

double getDefaultZoomInPPD()
The default scale factor in east/north units per pixel (#NavigatableComponent#scale)). FIXME: misnomer

Returns:
the scale factor

latlon2eastNorth

EastNorth latlon2eastNorth(LatLon ll)
Convert from lat/lon to easting/northing.

Parameters:
ll - the geographical point to convert (in WGS84 lat/lon)
Returns:
the corresponding east/north coordinates

eastNorth2latlon

LatLon eastNorth2latlon(EastNorth en)
Convert from easting/norting to lat/lon.

Parameters:
en - the geographical point to convert (in projected coordinates)
Returns:
the corresponding lat/lon (WGS84)

toString

java.lang.String toString()
Describe the projection in one or two words.

Overrides:
toString in class java.lang.Object
Returns:
the name / description

toCode

java.lang.String toCode()
Return projection code. This should be a unique identifier. If projection supports parameters, return a different code for each set of parameters. The EPSG code can be used (if defined for the projection).

Returns:
the projection identifier

getCacheDirectoryName

java.lang.String getCacheDirectoryName()
Get a filename compatible string (for the cache directory).

Returns:
the cache directory name (base name)

getWorldBoundsLatLon

Bounds getWorldBoundsLatLon()
Get the bounds of the world.

Returns:
the supported lat/lon rectangle for this projection


JOSM