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
Retrieves a set of
OsmPrimitives from an Overpass API server.- Since:
- 9241
-
Nested Class Summary
Nested classes/interfaces inherited from class org.openstreetmap.josm.io.MultiFetchServerObjectReader
MultiFetchServerObjectReader.Fetcher, MultiFetchServerObjectReader.FetchResultNested 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
FieldsFields inherited from class org.openstreetmap.josm.io.MultiFetchServerObjectReader
primitivesMap, recurseDownRelationsFields inherited from class org.openstreetmap.josm.io.OsmServerReader
contentType, gpxParsedProperlyFields inherited from class org.openstreetmap.josm.io.OsmConnection
activeConnection, cancel, fetcher, oAuth20Parameters -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringgenOverpassQuery(Collection<? extends PrimitiveId> ids, boolean includeObjects, boolean recurseUp, boolean recurseDownRelations) Generate single overpass query to retrieve multiple primitives.protected static StringgenOverpassQuery(Map<OsmPrimitiveType, Set<Long>> primitivesMap, boolean includeObjects, boolean recurseUp, boolean recurseDownRelations) Generate single overpass query to retrieve multiple primitives.protected StringReturn the base URL for relative URL requestsprivate static StringgetPackageString(OsmPrimitiveType type, Set<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, setRecurseDownRelationsMethods 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, setDoAuthenticateMethods inherited from class org.openstreetmap.josm.io.OsmConnection
addAuth, addBasicAuthorizationHeader, addOAuth20AuthorizationHeader, isCanceled, retrieveBasicAuthorizationLogin, setOAuthAccessTokenFetcher
-
Field Details
-
wantedOrder
-
-
Constructor Details
-
MultiFetchOverpassObjectReader
public MultiFetchOverpassObjectReader()
-
-
Method Details
-
getPackageString
-
genOverpassQuery
public static String genOverpassQuery(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 String genOverpassQuery(Map<OsmPrimitiveType, Set<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
Description copied from class:OsmServerReaderReturn the base URL for relative URL requests- Overrides:
getBaseUrlin classOsmServerReader- Returns:
- base url of API
-