public class OSMUploader extends Object implements OpenStreetMapContributorConstants
Modifier and Type | Field and Description |
---|---|
static String |
API_VERSION |
static SimpleDateFormat |
pseudoFileNameFormat |
MINDIAGONALMETERS_FOR_OSM_CONTRIBUTION, MINGEOPOINTS_FOR_OSM_CONTRIBUTION, NOT_SET, OSM_CREATOR_INFO, OSM_PASSWORD, OSM_USERNAME
Modifier and Type | Method and Description |
---|---|
static void |
upload(String username,
String password,
String description,
String tags,
boolean addDateTags,
ArrayList<RecordedGeoPoint> recordedGeoPoints,
String pseudoFileName) |
static void |
uploadAsync(ArrayList<RecordedGeoPoint> recordedGeoPoints)
Uses OSMConstants.OSM_USERNAME and OSMConstants.OSM_PASSWORD as username/password.
|
static void |
uploadAsync(String description,
String tags,
boolean addDateTags,
ArrayList<RecordedGeoPoint> recordedGeoPoints)
Uses OSMConstants.OSM_USERNAME and OSMConstants.OSM_PASSWORD as username/password.
|
static void |
uploadAsync(String username,
String password,
String description,
String tags,
boolean addDateTags,
ArrayList<RecordedGeoPoint> recordedGeoPoints,
String pseudoFileName)
NOTE: This method is not blocking! (Code runs in thread)
|
public static final String API_VERSION
public static final SimpleDateFormat pseudoFileNameFormat
public static void uploadAsync(ArrayList<RecordedGeoPoint> recordedGeoPoints)
DEFAULT_DESCRIPTION
, tags will be automatically generated
(i.e. "October 2008
") NOTE: This method is not blocking!gpxInputStream
- the InputStream containing the gpx-data.IOException
public static void uploadAsync(String description, String tags, boolean addDateTags, ArrayList<RecordedGeoPoint> recordedGeoPoints)
timestamp.gpx
(i.e. "20081231_234815_912.gpx")
NOTE: This method is not blocking!description
- not null
tags
- not null
addDateTags
- adds Date Tags to the existing Tags (i.e. "October 2008")gpxInputStreaman
- the InputStream containing the gpx-data.IOException
public static void uploadAsync(String username, String password, String description, String tags, boolean addDateTags, ArrayList<RecordedGeoPoint> recordedGeoPoints, String pseudoFileName)
username
- not null
and not empty
. Valid OSM-usernamepassword
- not null
and not empty
. Valid password to the
OSM-username.description
- not null
tags
- if null
addDateTags is treated as true
addDateTags
- adds Date Tags to the existing Tags (i.e. "October 2008
")gpxInputStream
- the InputStream containing the gpx-data.pseudoFileName
- ending with ".gpx
"IOException
public static void upload(String username, String password, String description, String tags, boolean addDateTags, ArrayList<RecordedGeoPoint> recordedGeoPoints, String pseudoFileName) throws IOException
IOException
Copyright © 2014. All Rights Reserved.