Interface Projecting
-
- All Known Subinterfaces:
Projection
- All Known Implementing Classes:
AbstractProjection
,CustomProjection
,ShiftedProjecting
public interface Projecting
Classes implementing this are able to project between screen (east/north) andLatLon
coordinates.Each instance is backed by a base projection but may e.g. offset the resulting position.
- Since:
- 10805
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description LatLon
eastNorth2latlonClamped(EastNorth en)
Convert a east/north coordinate to theLatLon
coordinate.Projection
getBaseProjection()
Gets the base projection instance used.default java.lang.Object
getCacheKey()
Gets the object used as cache identifier when caching results of this projection.java.util.Map<ProjectionBounds,Projecting>
getProjectingsForArea(ProjectionBounds area)
Returns an map or (subarea, projecting) paris that contains projecting instances to convert the coordinates inside the given area.EastNorth
latlon2eastNorth(ILatLon ll)
Convert from lat/lon to easting/northing.default EastNorth
latlon2eastNorth(LatLon ll)
Convert from lat/lon to easting/northing.
-
-
-
Method Detail
-
latlon2eastNorth
default EastNorth latlon2eastNorth(LatLon ll)
Convert from lat/lon to easting/northing.This method exists to not break binary compatibility with old plugins
- Parameters:
ll
- the geographical point to convert (in WGS84 lat/lon)- Returns:
- the corresponding east/north coordinates
- See Also:
ILatLon.getEastNorth(Projecting)
-
latlon2eastNorth
EastNorth latlon2eastNorth(ILatLon ll)
Convert from lat/lon to easting/northing. This method uses the newerILatLon
interface.- Parameters:
ll
- the geographical point to convert (in WGS84 lat/lon)- Returns:
- the corresponding east/north coordinates
- Since:
- 12161
- See Also:
as shorthand.
-
eastNorth2latlonClamped
LatLon eastNorth2latlonClamped(EastNorth en)
Convert a east/north coordinate to theLatLon
coordinate. This method clamps the lat/lon coordinate to the nearest point in the world bounds.- Parameters:
en
- east/north- Returns:
- The lat/lon coordinate.
-
getBaseProjection
Projection getBaseProjection()
Gets the base projection instance used. This may be the same as this one or a different one if this one is translated in east/north space.- Returns:
- The projection.
-
getProjectingsForArea
java.util.Map<ProjectionBounds,Projecting> getProjectingsForArea(ProjectionBounds area)
Returns an map or (subarea, projecting) paris that contains projecting instances to convert the coordinates inside the given area. This can be used by projections to support continuous projections. It is possible that the area covered by the map is bigger than the one given as area. There may be holes.- Parameters:
area
- The base area- Returns:
- a map of non-overlapping
ProjectionBounds
instances mapped to theProjecting
object to use for that area.
-
getCacheKey
default java.lang.Object getCacheKey()
Gets the object used as cache identifier when caching results of this projection.- Returns:
- The object to use as cache key
- Since:
- 10827
-
-