WebÞing

HyperLens

Projection API

A Projection in HyperLens serves to map physical (pixel) coordinates in a scene to logical coordinates - typically Latitude/Longitude. It provides associated functions such as the computation of distance.

To define a projection, you should extend the class webthing.hyperlens.projection.Projection. The base Projection class defines a working default, that uses simple Pixel coordinates and Euclidean geometry.

Required Methods

To implement a projection, the following methods may be overridden:

public double flongitude(Point p) throws ProjectionException
Longitude of a point
public double flatitude(Point p) throws ProjectionException
Latitude of a point
public Point latlong2point(double latitude, double longitude)
Compute a point from latitude/longitude
public fPoint latlong2fpoint(double latitude, double longitude)
Compute a point in floating-point from latitude/longitude
double fdist(Point base, Point p) throws ProjectionException
Distance between two points
public String latitude(Point p) throws ProjectionException
Latitude as a formatted String
public String longitude(Point p) throws ProjectionException
Longitude as a formatted String
protected String dist(Point base, Point p) throws ProjectionException
Distance as a formatted String
public void geoinit(String params)
Initialise

[About] [Tutorial] [Manual] [Applications] [API] [Applet] [Download]