Changeset 33207 in osm for applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileSource.java
- Timestamp:
- 2017-04-03T15:00:12+02:00 (8 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
applications/viewer/jmapviewer/src/org/openstreetmap/gui/jmapviewer/interfaces/TileSource.java
r31573 r33207 9 9 import org.openstreetmap.gui.jmapviewer.JMapViewer; 10 10 import org.openstreetmap.gui.jmapviewer.Tile; 11 import org.openstreetmap.gui.jmapviewer.TileRange; 11 12 import org.openstreetmap.gui.jmapviewer.TileXY; 12 13 … … 210 211 */ 211 212 Map<String, String> getMetadata(Map<String, List<String>> headers); 213 214 /** 215 * Convert tile indeces (x/y/zoom) into projected coordinates of the tile origin. 216 * @param x x tile index 217 * @param y z tile index 218 * @param zoom zoom level 219 * @return projected coordinates of the tile origin 220 */ 221 IProjected tileXYtoProjected(int x, int y, int zoom); 222 223 /** 224 * Convert projected coordinates to tile indices. 225 * @param p projected coordinates 226 * @param zoom zoom level 227 * @return corresponding tile index x/y (floating point, truncate to integer 228 * for tile index) 229 */ 230 TileXY projectedToTileXY(IProjected p, int zoom); 231 232 /** 233 * Check if one tile is inside another tile. 234 * @param inner the tile that is suspected to be inside the other tile 235 * @param outer the tile that might contain the first tile 236 * @return true if first tile is inside second tile (or both are identical), 237 * false otherwise 238 */ 239 boolean isInside(Tile inner, Tile outer); 240 241 /** 242 * Returns a range of tiles, that cover a given tile, which is 243 * usually at a different zoom level. 244 * 245 * In standard tile layout, 4 tiles cover a tile one zoom lower, 16 tiles 246 * cover a tile 2 zoom levels below etc. 247 * If the zoom level of the covering tiles is greater or equal, a single 248 * tile suffices. 249 * 250 * @param tile the tile to cover 251 * @param newZoom zoom level of the covering tiles 252 * @return TileRange of all covering tiles at zoom <code>newZoom</code> 253 */ 254 TileRange getCoveringTileRange(Tile tile, int newZoom); 255 256 /** 257 * Get content reference system for this tile source. 258 * 259 * E.g. "EPSG:3857" for Google-Mercator. 260 * @return code for the content reference system in use 261 */ 262 String getServerCRS(); 263 212 264 }
Note:
See TracChangeset
for help on using the changeset viewer.