public class OsmDownloader
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
OsmDownloader.TileDownloadStatistics
Structure of statistics reported by the downloadTileFile() method.
|
Modifier and Type | Method and Description |
---|---|
static boolean |
downloadTileFile(java.lang.String hostIpAddress,
java.lang.String webTileDir,
java.io.File tileDir,
int bLat,
int bLon,
java.lang.String suffix,
StatusListener pd,
OsmDownloader.TileDownloadStatistics statistics,
boolean refreshExisting,
VisibleCtls recordFilter)
Download one tile file (ways or nodes) from a specific tile directory.
|
static void |
loadPrecompiledTiles(boolean showProgressDialog,
GuiIfc.TileDownloadParams tileDownloadParams)
Download already-imported tiles from the program author's website and store them in the
local tile directory.
|
public static void loadPrecompiledTiles(boolean showProgressDialog, GuiIfc.TileDownloadParams tileDownloadParams)
showProgressDialog
- boolean true if a progress dialog should be launched to show the progress of this;
should normally be true, but the configuration wizard sets it to false to not confuse
the neophyte user while they are still configuring their installationtileDownloadParams
- GuiIfc.TileDownloadParams structure identifying which tiles and records therein should be downloadedpublic static boolean downloadTileFile(java.lang.String hostIpAddress, java.lang.String webTileDir, java.io.File tileDir, int bLat, int bLon, java.lang.String suffix, StatusListener pd, OsmDownloader.TileDownloadStatistics statistics, boolean refreshExisting, VisibleCtls recordFilter) throws java.io.IOException
hostIpAddress
- String of numeric IP address of webserver (to avoid repeated lookups)webTileDir
- String of subdirectory on webserver where tile files are located, or null to
use default of "tiledir"tileDir
- root directory of the tile hierarchybLat
- latitude of tile (degrees only)bLon
- longitude of tile (degrees only)suffix
- file suffix ".ways" or ".nodes", or entire file name "planet.ways"pd
- StatusListener to receive progress reports (or null if progress is not to be reported)statistics
- TileDownloadStatistics object to accumulate statisticsrefreshExisting
- if boolean true, skip downloading tiles that did not exist previouslyrecordFilter
- VisibleEnum struct specifying which WayTypes and AmenityTypes should be accepted, or null to accept everything @return boolean true if a tile was downloaded, false if new tile does not existjava.io.IOException
- if data cannot be transferred for some reason