Package org.geotools.tile.impl.osm
Class OSMTileFactory
- Object
-
- TileFactory
-
- WebMercatorTileFactory
-
- OSMTileFactory
-
public class OSMTileFactory extends WebMercatorTileFactory
The tile factory implementation for the OpenStreetMap family- Since:
- 12
- Author:
- Tobias Sauerwein, Ugo Taddei
-
-
Constructor Summary
Constructors Constructor Description OSMTileFactory()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Tile
create(TileIdentifier identifier, TileService service)
Creates a new tile for the given position using a service.Tile
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.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.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
-
-
-
-
Method Detail
-
create
public Tile create(TileIdentifier identifier, TileService service)
Description copied from class:TileFactory
Creates a new tile for the given position using a service.- Specified by:
create
in classTileFactory
- Returns:
-
findTileAtCoordinate
public Tile findTileAtCoordinate(double lon, double lat, ZoomLevel zoomLevel, TileService service)
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
public Tile findRightNeighbour(Tile tile, TileService service)
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
public Tile findLowerNeighbour(Tile tile, TileService service)
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
-
-