public final class LocationFactory extends Object
OpenLR is a trade mark of TomTom International B.V.
email: software@openlr.org
| Modifier and Type | Method and Description |
|---|---|
static Location |
createCircleLocation(String idString,
double lonDeg,
double latDeg,
long radius)
Instantiates a new circle location.
|
static Location |
createClosedLineLocation(String idString,
List<? extends Line> loc)
Instantiates a new location with a unique key and the location as a list
of lines.
|
static Location |
createGeoCoordinateLocation(String idString,
double lonDeg,
double latDeg)
Instantiates a new geo coordinate location.
|
static Location |
createGridLocationFromBasisCell(String idString,
double lowerLeftLonDeg,
double lowerLeftLatDeg,
double upperRightLonDeg,
double upperRightLatDeg,
int ncols,
int nrows)
Instantiates a new grid location.
|
static Location |
createGridLocationFromBasisCell(String idString,
GeoCoordinates lowerLeft,
GeoCoordinates upperRight,
int ncols,
int nrows)
Creates a new Location object.
|
static Location |
createGridLocationFromGridArea(String idString,
double lowerLeftLonDeg,
double lowerLeftLatDeg,
double upperRightLonDeg,
double upperRightLatDeg,
int ncols,
int nrows)
Instantiates a new grid location.
|
static Location |
createGridLocationFromGridArea(String string,
GeoCoordinates lowerLeft,
GeoCoordinates upperRight,
int columns,
int rows)
Creates a new Location object.
|
static Location |
createLineLocation(String idString,
List<? extends Line> loc)
Instantiates a new location with a unique key and the location as a list
of lines.
|
static Location |
createLineLocationWithOffsets(String idString,
List<? extends Line> loc,
int pOff,
int nOff)
Instantiates a new location with a unique key and the location as a list
of lines including offset information used to find the precise location
on the location path.
|
static Location |
createNodeLocation(String idString,
Line l)
Instantiates a new point along line location at a network node.
|
static Location |
createNodeLocationWithOrientation(String idString,
Line l,
Orientation o)
Instantiates a new point along line location at a network node.
|
static Location |
createNodeLocationWithSide(String idString,
Line l,
SideOfRoad s)
Instantiates a new point along line location at a network node.
|
static Location |
createNodeLocationWithSideAndOrientation(String idString,
Line l,
SideOfRoad s,
Orientation o)
Instantiates a new point along line location at a network node.
|
static Location |
createPoiAccessAtNodeLocation(String idString,
Line l,
double lonDeg,
double latDeg)
Instantiates a new poi with access point location at a network node.
|
static Location |
createPoiAccessAtNodeLocationWithOrientation(String idString,
Line l,
double lonDeg,
double latDeg,
Orientation o)
Instantiates a new poi with access point location at a network node.
|
static Location |
createPoiAccessAtNodeLocationWithSide(String idString,
Line l,
double lonDeg,
double latDeg,
SideOfRoad s)
Instantiates a new poi with access point location at a network node.
|
static Location |
createPoiAccessAtNodeLocationWithSideAndOrientation(String idString,
Line l,
double lonDeg,
double latDeg,
SideOfRoad s,
Orientation o)
Instantiates a new poi with access point location at a network node.
|
static Location |
createPoiAccessLocation(String idString,
Line l,
int poff,
double lonDeg,
double latDeg)
Instantiates a new poi with access point location.
|
static Location |
createPoiAccessLocationWithOrientation(String idString,
Line l,
int poff,
double lonDeg,
double latDeg,
Orientation o)
Instantiates a new poi with access point location.
|
static Location |
createPoiAccessLocationWithSide(String idString,
Line l,
int poff,
double lonDeg,
double latDeg,
SideOfRoad s)
Instantiates a new poi with access point location.
|
static Location |
createPoiAccessLocationWithSideAndOrientation(String idString,
Line l,
int poff,
double lonDeg,
double latDeg,
SideOfRoad s,
Orientation o)
Instantiates a new poi with access point location.
|
static Location |
createPointAlongLineLocation(String idString,
Line l,
int poff)
Instantiates a new point along line location.
|
static Location |
createPointAlongLineLocationWithOrientation(String idString,
Line l,
int poff,
Orientation o)
Instantiates a new point along line location.
|
static Location |
createPointAlongLineLocationWithSide(String idString,
Line l,
int poff,
SideOfRoad s)
Instantiates a new point along line location.
|
static Location |
createPointAlongLineLocationWithSideAndOrientation(String idString,
Line l,
int poff,
SideOfRoad s,
Orientation o)
Instantiates a new point along line location.
|
static Location |
createPolygonLocation(String idString,
List<? extends GeoCoordinates> cornerPoints)
Instantiates a new polygon location.
|
static Location |
createRectangleLocation(String idString,
double lowerLeftLonDeg,
double lowerLeftLatDeg,
double upperRightLonDeg,
double upperRightLatDeg)
Instantiates a new rectangle location.
|
static Location |
createRectangleLocation(String string,
GeoCoordinates rectangleLL,
GeoCoordinates rectangleUR)
Creates a new Location object.
|
public static Location createLineLocationWithOffsets(String idString, List<? extends Line> loc, int pOff, int nOff)
idString - the unique IDloc - the location as a list of linespOff - the distance between the start of the location and the start
of the precise locationnOff - the distance between the end of the location and the end of
the precise locationpublic static Location createLineLocation(String idString, List<? extends Line> loc)
idString - the unique IDloc - the location as a list of linespublic static Location createGeoCoordinateLocation(String idString, double lonDeg, double latDeg) throws InvalidMapDataException
idString - the id stringlonDeg - the longitudelatDeg - the latitudeInvalidMapDataException - the invalid map data exceptionpublic static Location createPointAlongLineLocationWithSideAndOrientation(String idString, Line l, int poff, SideOfRoad s, Orientation o) throws InvalidMapDataException
idString - the id stringl - the linepoff - the positive offsets - the side of roado - the oroentationInvalidMapDataException - the invalid map data exceptionpublic static Location createPointAlongLineLocationWithSide(String idString, Line l, int poff, SideOfRoad s) throws InvalidMapDataException
idString - the id stringl - the linepoff - the positive offsets - the side of roadInvalidMapDataException - the invalid map data exceptionpublic static Location createPointAlongLineLocationWithOrientation(String idString, Line l, int poff, Orientation o) throws InvalidMapDataException
idString - the id stringl - the lienpoff - the positive offseto - the orientationInvalidMapDataException - the invalid map data exceptionpublic static Location createPointAlongLineLocation(String idString, Line l, int poff) throws InvalidMapDataException
idString - the id stringl - the linepoff - the positive offsetInvalidMapDataException - the invalid map data exceptionpublic static Location createNodeLocationWithSide(String idString, Line l, SideOfRoad s) throws InvalidMapDataException
idString - the id stringl - the lines - the side of roadInvalidMapDataException - the invalid map data exceptionpublic static Location createNodeLocationWithOrientation(String idString, Line l, Orientation o) throws InvalidMapDataException
idString - the id stringl - the lineo - the orientationInvalidMapDataException - the invalid map data exceptionpublic static Location createNodeLocationWithSideAndOrientation(String idString, Line l, SideOfRoad s, Orientation o) throws InvalidMapDataException
idString - the id stringl - the lines - the side of roado - the orientationInvalidMapDataException - the invalid map data exceptionpublic static Location createNodeLocation(String idString, Line l) throws InvalidMapDataException
idString - the id stringl - the lineInvalidMapDataException - the invalid map data exceptionpublic static Location createPoiAccessLocationWithSideAndOrientation(String idString, Line l, int poff, double lonDeg, double latDeg, SideOfRoad s, Orientation o) throws InvalidMapDataException
idString - the id stringl - the linepoff - the positive offsetlonDeg - the longitudelatDeg - the latitudes - the side of roado - the orientationInvalidMapDataException - the invalid map data exceptionpublic static Location createPoiAccessLocationWithSide(String idString, Line l, int poff, double lonDeg, double latDeg, SideOfRoad s) throws InvalidMapDataException
idString - the id stringl - the linepoff - the positive offsetlonDeg - the longitudelatDeg - the latitudes - the side of roadInvalidMapDataException - the invalid map data exceptionpublic static Location createPoiAccessLocationWithOrientation(String idString, Line l, int poff, double lonDeg, double latDeg, Orientation o) throws InvalidMapDataException
idString - the id stringl - the linepoff - the positive offsetlonDeg - the longitudelatDeg - the latitudeo - the orientationInvalidMapDataException - the invalid map data exceptionpublic static Location createPoiAccessLocation(String idString, Line l, int poff, double lonDeg, double latDeg) throws InvalidMapDataException
idString - the id stringl - the linepoff - the positive offsetlonDeg - the longitudelatDeg - the latitudeInvalidMapDataException - the invalid map data exceptionpublic static Location createPoiAccessAtNodeLocationWithSideAndOrientation(String idString, Line l, double lonDeg, double latDeg, SideOfRoad s, Orientation o) throws InvalidMapDataException
idString - the id stringl - the linelonDeg - the longitudelatDeg - the latitudes - the side of roado - the orientationInvalidMapDataException - the invalid map data exceptionpublic static Location createPoiAccessAtNodeLocation(String idString, Line l, double lonDeg, double latDeg) throws InvalidMapDataException
idString - the id stringl - the linelonDeg - the longitudelatDeg - the latitudeInvalidMapDataException - the invalid map data exceptionpublic static Location createPoiAccessAtNodeLocationWithSide(String idString, Line l, double lonDeg, double latDeg, SideOfRoad s) throws InvalidMapDataException
idString - the id stringl - the linelonDeg - the longitudelatDeg - the latitudes - the side of roadInvalidMapDataException - the invalid map data exceptionpublic static Location createPoiAccessAtNodeLocationWithOrientation(String idString, Line l, double lonDeg, double latDeg, Orientation o) throws InvalidMapDataException
idString - the id stringl - the linelonDeg - the longitudelatDeg - the latitudeo - the orientationInvalidMapDataException - the invalid map data exceptionpublic static Location createCircleLocation(String idString, double lonDeg, double latDeg, long radius) throws InvalidMapDataException
idString - the id stringlonDeg - the longitudelatDeg - the latituderadius - the radius in metersInvalidMapDataException - the invalid map data exceptionpublic static Location createRectangleLocation(String idString, double lowerLeftLonDeg, double lowerLeftLatDeg, double upperRightLonDeg, double upperRightLatDeg) throws InvalidMapDataException
idString - the id stringlowerLeftLonDeg - the lower left lon deglowerLeftLatDeg - the lower left lat degupperRightLonDeg - the upper right lon degupperRightLatDeg - the upper right lat degInvalidMapDataException - the invalid map data exceptionpublic static Location createRectangleLocation(String string, GeoCoordinates rectangleLL, GeoCoordinates rectangleUR) throws InvalidMapDataException
string - the stringrectangleLL - the rectangle llrectangleUR - the rectangle urInvalidMapDataException - the invalid map data exceptionpublic static Location createGridLocationFromBasisCell(String idString, double lowerLeftLonDeg, double lowerLeftLatDeg, double upperRightLonDeg, double upperRightLatDeg, int ncols, int nrows) throws InvalidMapDataException
idString - the id stringlowerLeftLonDeg - the leftmost longitudelowerLeftLatDeg - the leftmost latitudeupperRightLonDeg - the rightmost longitudeupperRightLatDeg - the rightmost latitudencols - the number of columnsnrows - the number of rowsInvalidMapDataException - the invalid map data exceptionpublic static Location createGridLocationFromBasisCell(String idString, GeoCoordinates lowerLeft, GeoCoordinates upperRight, int ncols, int nrows) throws InvalidMapDataException
idString - the id stringlowerLeft - the lower leftupperRight - the upper rightncols - the ncolsnrows - the nrowsInvalidMapDataException - the invalid map data exceptionpublic static Location createGridLocationFromGridArea(String idString, double lowerLeftLonDeg, double lowerLeftLatDeg, double upperRightLonDeg, double upperRightLatDeg, int ncols, int nrows) throws InvalidMapDataException
encodesLowerLeftCell is
true, the encoder will see this, thus knowing, that the
basic building block of a grid, i.e. a single cell, is to be encoded and
therefore will not first split up the given rectangle into
ncols columns and nrows rows before
transmission. If, however, the flag is false, the encoder
will interpret the given rectangle as the boundary of the grid area
location, and thus, before transmission to the receiver side, extract a
lower left cell (by splitting the rectangle into ncols
columns and nrows rows). Upon receipt, the decoder also sees
this flag and will interpret the rectangle information accordingly.idString - the id stringlowerLeftLonDeg - the lower left lon deglowerLeftLatDeg - the lower left lat degupperRightLonDeg - the upper right lon degupperRightLatDeg - the upper right lat degncols - the number of columnsnrows - the number of rowsInvalidMapDataException - the invalid map data exceptionpublic static Location createGridLocationFromGridArea(String string, GeoCoordinates lowerLeft, GeoCoordinates upperRight, int columns, int rows) throws InvalidMapDataException
string - the stringlowerLeft - the lower leftupperRight - the upper rightcolumns - the columnsrows - the rowsInvalidMapDataException - the invalid map data exceptionpublic static Location createPolygonLocation(String idString, List<? extends GeoCoordinates> cornerPoints)
idString - the id stringcornerPoints - the list of corner pointsCopyright © 2019 TomTom International B.V.. All rights reserved.