public class BoundingBoxDownloader extends OsmServerReader
| Modifier and Type | Class and Description |
|---|---|
static class |
BoundingBoxDownloader.MoreNotesException
Indicates that the number of fetched notes equals the specified limit.
|
OsmServerReader.DomParser<R>OsmConnection.OAuthAccessTokenFetcher| Modifier and Type | Field and Description |
|---|---|
protected boolean |
crosses180th |
protected double |
lat1
The boundings of the desired map data.
|
protected double |
lat2 |
protected double |
lon1 |
protected double |
lon2 |
contentType, gpxParsedProperlyactiveConnection, cancel, fetcher, oauthParameters| Constructor and Description |
|---|
BoundingBoxDownloader(Bounds downloadArea)
Constructs a new
BoundingBoxDownloader. |
| Modifier and Type | Method and Description |
|---|---|
private GpxData |
downloadRawGps(Bounds b,
ProgressMonitor progressMonitor) |
protected java.lang.String |
getRequestForBbox(double lon1,
double lat1,
double lon2,
double lat2)
Builds the request part for the bounding box.
|
protected java.lang.String |
getTaskName()
Returns the name of the download task to be displayed in the
ProgressMonitor. |
protected DataSet |
parseDataSet(java.io.InputStream source,
ProgressMonitor progressMonitor)
Parse the given input source and return the dataset.
|
java.util.List<Note> |
parseNotes(int noteLimit,
int daysClosed,
ProgressMonitor progressMonitor)
Downloads notes from the API, given API limit parameters
|
DataSet |
parseOsm(ProgressMonitor progressMonitor)
Download OSM files from somewhere
|
GpxData |
parseRawGps(ProgressMonitor progressMonitor)
Retrieve raw gps waypoints from the server API.
|
adaptRequest, fetchData, getAttribute, getBaseUrl, getInputStream, getInputStream, getInputStreamRaw, getInputStreamRaw, getInputStreamRaw, getInputStreamRaw, isDoAuthenticate, isGpxParsedProperly, parseOsm, parseOsmChange, parseOsmChange, parseRawGps, parseRawNotes, parseRawNotes, setDoAuthenticateaddAuth, addBasicAuthorizationHeader, addOAuthAuthorizationHeader, cancel, isCanceled, obtainAccessToken, retrieveBasicAuthorizationLogin, setOAuthAccessTokenFetcherprotected final double lat1
protected final double lon1
protected final double lat2
protected final double lon2
protected final boolean crosses180th
public BoundingBoxDownloader(Bounds downloadArea)
BoundingBoxDownloader.downloadArea - The area to downloadprivate GpxData downloadRawGps(Bounds b, ProgressMonitor progressMonitor) throws java.io.IOException, OsmTransferException, org.xml.sax.SAXException
java.io.IOExceptionOsmTransferExceptionorg.xml.sax.SAXExceptionpublic GpxData parseRawGps(ProgressMonitor progressMonitor) throws OsmTransferException
OsmServerReaderparseRawGps in class OsmServerReaderprogressMonitor - The progress monitorOsmTransferException - if any error occursprotected java.lang.String getTaskName()
ProgressMonitor.protected java.lang.String getRequestForBbox(double lon1, double lat1, double lon2, double lat2)
lon1 - leftlat1 - bottomlon2 - rightlat2 - topprotected DataSet parseDataSet(java.io.InputStream source, ProgressMonitor progressMonitor) throws IllegalDataException
source - input streamprogressMonitor - progress monitorIllegalDataException - if an error was found while parsing the OSM dataOsmReader.parseDataSet(InputStream, ProgressMonitor)public DataSet parseOsm(ProgressMonitor progressMonitor) throws OsmTransferException
OsmServerReaderparseOsm in class OsmServerReaderprogressMonitor - The progress monitorOsmTransferException - if any error occurspublic java.util.List<Note> parseNotes(int noteLimit, int daysClosed, ProgressMonitor progressMonitor) throws OsmTransferException
OsmServerReaderparseNotes in class OsmServerReadernoteLimit - How many notes to download.daysClosed - Return notes closed this many days in the past. -1 means all notes, ever. 0 means only unresolved notes.progressMonitor - Progress monitor for user feedbackOsmTransferException - if any errors happen