org.openlr.encoder.Encoder Maven / Gradle / Ivy
The newest version!
package org.openlr.encoder;
import org.openlr.location.*;
import org.openlr.locationreference.*;
import org.openlr.map.Line;
/**
* The encoder is responsible for constructing a location reference for a location.
*/
public interface Encoder {
/**
* Encode a location to a location reference.
*
* @param location the location to encode
* @return the location reference for the location
*/
LocationReference encode(Location location);
/**
* Encode a line location to a location reference. Suitable location reference points are determined
* for the path. Any positive or negative offsets to the beginning and end of the location are also computed.
*
* @param lineLocation the line location to encode
* @param the line type
* @return the location reference for the line location
*/
> LineLocationReference encode(LineLocation lineLocation);
/**
* Encode a geo-coordinate location to a location reference.
*
* @param geoCoordinateLocation the geo-coordinate location to encode
* @return the location reference for the geo-coordinate location
*/
GeoCoordinateLocationReference encode(GeoCoordinateLocation geoCoordinateLocation);
/**
* Encode a point along line location to a location reference. Suitable first and last location reference
* points are computed as well as the positive offset from the first location reference point to the point
* along line.
*
* @param pointAlongLineLocation the point along line location to encode
* @param the line type
* @return the location reference for the point location
*/
> PointAlongLineLocationReference encode(PointAlongLineLocation pointAlongLineLocation);
/**
* Encode a point of interest with access point location to a location reference. Suitable first and last location
* reference points are computed for the access point as well as the positive offset from the first location reference
* point to the access point.
*
* @param pointOfInterestWithAccessPointLocation the point of interest with access point location to encode
* @param the line type
* @return the location reference for the point of interest with access point location
*/
> PointOfInterestWithAccessPointLocationReference encode(PointOfInterestWithAccessPointLocation pointOfInterestWithAccessPointLocation);
/**
* Encode a circle location to a location reference.
*
* @param circleLocation the circle location to encode
* @return the location reference for the circle location
*/
CircleLocationReference encode(CircleLocation circleLocation);
/**
* Encode a polygon location to a location reference.
*
* @param polygonLocation the polygon location to encode
* @return the location reference for the polygon location
*/
PolygonLocationReference encode(PolygonLocation polygonLocation);
/**
* Encode a rectangle location to a location reference.
*
* @param rectangleLocation the rectangle location to encode
* @return the location reference for the rectangle location
*/
RectangleLocationReference encode(RectangleLocation rectangleLocation);
/**
* Encode a grid location to a location reference.
*
* @param gridLocation the grid location to encode
* @return the location reference for the grid location
*/
GridLocationReference encode(GridLocation gridLocation);
/**
* Encode a closed line location to a location reference. Suitable location reference points are determined
* for the closed path.
*
* @param closedLineLocation the closed line location to encode
* @param the line type
* @return a location reference for the closed line location
*/
> ClosedLineLocationReference encode(ClosedLineLocation closedLineLocation);
}