Package org.geotools.tile.impl.osm
Class OSMTileFactory
Object
TileFactory
WebMercatorTileFactory
OSMTileFactory
The tile factory implementation for the OpenStreetMap family
- Since:
- 12
- Author:
- Tobias Sauerwein, Ugo Taddei
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreate
(TileIdentifier identifier, TileService service) Creates a new tile for the given position using a service.findLowerNeighbour
(Tile tile, TileService service) Finds the tile for a service at the given position and zoom level, which is immediately below the the passed tile.findRightNeighbour
(Tile tile, TileService service) Finds the tile for a service at the given position and zoom level, which is immediately to the right of the passed tile.findTileAtCoordinate
(double lon, double lat, ZoomLevel zoomLevel, TileService service) Finds the tile for a service at the given position and zoom level.static double
moveInRange
(double value, double min, double max) This method ensures that value is between min and max.Methods inherited from class WebMercatorTileFactory
getExtentFromTileName, getZoomLevel, tile2lat, tile2lon
Methods inherited from class TileFactory
normalizeDegreeValue
-
Constructor Details
-
OSMTileFactory
public OSMTileFactory()
-
-
Method Details
-
create
Description copied from class:TileFactory
Creates a new tile for the given position using a service.- Specified by:
create
in classTileFactory
- Returns:
-
findTileAtCoordinate
Description copied from class:TileFactory
Finds the tile for a service at the given position and zoom level.- Specified by:
findTileAtCoordinate
in classTileFactory
- Parameters:
lon
- the longitudelat
- the latitudezoomLevel
- the zoom levelservice
- the service- Returns:
- a tile
-
moveInRange
public static double moveInRange(double value, double min, double max) This method ensures that value is between min and max. If value < min, min is returned. If value > max, max is returned. Otherwise value. -
findRightNeighbour
Description copied from class:TileFactory
Finds the tile for a service at the given position and zoom level, which is immediately to the right of the passed tile.- Specified by:
findRightNeighbour
in classTileFactory
- Parameters:
tile
- the reference tile
-
findLowerNeighbour
Description copied from class:TileFactory
Finds the tile for a service at the given position and zoom level, which is immediately below the the passed tile.- Specified by:
findLowerNeighbour
in classTileFactory
- Parameters:
tile
- the reference tile
-