Package org.openstreetmap.josm.io
Class MultiFetchOverpassObjectReader
- java.lang.Object
-
- org.openstreetmap.josm.io.OsmConnection
-
- org.openstreetmap.josm.io.OsmServerReader
-
- org.openstreetmap.josm.io.MultiFetchServerObjectReader
-
- org.openstreetmap.josm.io.MultiFetchOverpassObjectReader
-
public class MultiFetchOverpassObjectReader extends MultiFetchServerObjectReader
Retrieves a set ofOsmPrimitive
s from an Overpass API server.- Since:
- 9241
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from class org.openstreetmap.josm.io.MultiFetchServerObjectReader
MultiFetchServerObjectReader.Fetcher, MultiFetchServerObjectReader.FetchResult
-
Nested classes/interfaces inherited from class org.openstreetmap.josm.io.OsmServerReader
OsmServerReader.DomParser<R>
-
Nested classes/interfaces inherited from class org.openstreetmap.josm.io.OsmConnection
OsmConnection.OAuthAccessTokenFetcher
-
-
Field Summary
Fields Modifier and Type Field Description private static java.util.List<OsmPrimitiveType>
wantedOrder
-
Fields inherited from class org.openstreetmap.josm.io.MultiFetchServerObjectReader
primitivesMap, recurseDownRelations
-
Fields inherited from class org.openstreetmap.josm.io.OsmServerReader
contentType, gpxParsedProperly
-
Fields inherited from class org.openstreetmap.josm.io.OsmConnection
activeConnection, cancel, fetcher, oAuth20Parameters
-
-
Constructor Summary
Constructors Constructor Description MultiFetchOverpassObjectReader()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static java.lang.String
genOverpassQuery(java.util.Collection<? extends PrimitiveId> ids, boolean includeObjects, boolean recurseUp, boolean recurseDownRelations)
Generate single overpass query to retrieve multiple primitives.protected static java.lang.String
genOverpassQuery(java.util.Map<OsmPrimitiveType,java.util.Set<java.lang.Long>> primitivesMap, boolean includeObjects, boolean recurseUp, boolean recurseDownRelations)
Generate single overpass query to retrieve multiple primitives.protected java.lang.String
getBaseUrl()
Return the base URL for relative URL requestsprivate static java.lang.String
getPackageString(OsmPrimitiveType type, java.util.Set<java.lang.Long> idPackage)
-
Methods inherited from class org.openstreetmap.josm.io.MultiFetchServerObjectReader
append, append, append, append, appendNode, appendRelation, appendWay, buildRequestString, cancel, create, create, extractIdPackage, fetchPrimitives, getMissingPrimitives, merge, parseOsm, rememberNodesOfIncompleteWaysToLoad, setRecurseDownAppended, setRecurseDownRelations
-
Methods inherited from class org.openstreetmap.josm.io.OsmServerReader
adaptRequest, fetchData, getAttribute, getInputStream, getInputStream, getInputStreamRaw, getInputStreamRaw, getInputStreamRaw, getInputStreamRaw, isDoAuthenticate, isGpxParsedProperly, parseNotes, parseOsm, parseOsmChange, parseOsmChange, parseRawGps, parseRawGps, parseRawNotes, parseRawNotes, setDoAuthenticate
-
Methods inherited from class org.openstreetmap.josm.io.OsmConnection
addAuth, addBasicAuthorizationHeader, addOAuth20AuthorizationHeader, isCanceled, retrieveBasicAuthorizationLogin, setOAuthAccessTokenFetcher
-
-
-
-
Field Detail
-
wantedOrder
private static final java.util.List<OsmPrimitiveType> wantedOrder
-
-
Constructor Detail
-
MultiFetchOverpassObjectReader
public MultiFetchOverpassObjectReader()
-
-
Method Detail
-
getPackageString
private static java.lang.String getPackageString(OsmPrimitiveType type, java.util.Set<java.lang.Long> idPackage)
-
genOverpassQuery
public static java.lang.String genOverpassQuery(java.util.Collection<? extends PrimitiveId> ids, boolean includeObjects, boolean recurseUp, boolean recurseDownRelations)
Generate single overpass query to retrieve multiple primitives. Can be used to download parents, children, the objects, or any combination of them.- Parameters:
ids
- the collection of idsincludeObjects
- if false, don't retrieve the primitives (e.g. only the referrers)recurseUp
- if true, referrers (parents) of the objects are downloaded and all nodes of parent waysrecurseDownRelations
- true: yes, recurse down to retrieve complete relations- Returns:
- the overpass query
- Since:
- 16611
-
genOverpassQuery
protected static java.lang.String genOverpassQuery(java.util.Map<OsmPrimitiveType,java.util.Set<java.lang.Long>> primitivesMap, boolean includeObjects, boolean recurseUp, boolean recurseDownRelations)
Generate single overpass query to retrieve multiple primitives. Can be used to download parents, children, the objects, or any combination of them.- Parameters:
primitivesMap
- map containing the primitivesincludeObjects
- if false, don't retrieve the primitives (e.g. only the referrers)recurseUp
- if true, referrers (parents) of the objects are downloaded and all nodes of parent waysrecurseDownRelations
- true: yes, recurse down to retrieve complete relations- Returns:
- the overpass query
-
getBaseUrl
protected java.lang.String getBaseUrl()
Description copied from class:OsmServerReader
Return the base URL for relative URL requests- Overrides:
getBaseUrl
in classOsmServerReader
- Returns:
- base url of API
-
-