public class OverpassClient
extends java.lang.Object
| Constructor and Description |
|---|
OverpassClient() |
OverpassClient(java.lang.String server) |
OverpassClient(java.lang.String server,
org.apache.http.HttpHost proxy) |
| Modifier and Type | Method and Description |
|---|---|
static java.lang.String |
buildCompactQuery(java.lang.String type,
org.openstreetmap.atlas.geography.Rectangle bounds) |
static java.lang.String |
buildCompoundQuery(java.lang.String type,
java.lang.String key,
java.lang.String value,
org.openstreetmap.atlas.geography.Rectangle bounds) |
static java.lang.String |
buildQuery(java.lang.String type,
org.openstreetmap.atlas.geography.Rectangle bounds) |
static java.lang.String |
buildQuery(java.lang.String type,
java.lang.String key,
java.lang.String value,
org.openstreetmap.atlas.geography.Rectangle bounds) |
org.apache.http.client.methods.CloseableHttpResponse |
getResponse(java.lang.String specificQuery) |
boolean |
hasTooMuchResponseData() |
boolean |
hasUnknownError() |
java.util.List<java.lang.String> |
nodeIdsFromWayQuery(java.lang.String query)
Makes a way Overpass query, parses the response xml, and returns the identifiers of nodes
that make up the ways that match the query
|
java.util.List<OverpassOsmNode> |
nodesFromQuery(java.lang.String query)
Makes a node Overpass query, parses the response xml, and returns the nodes that match the
query
|
java.util.List<OverpassOsmWay> |
waysFromQuery(java.lang.String query)
Makes a way Overpass query, parses the response xml, and returns the ways that match the
query
|
public OverpassClient()
public OverpassClient(java.lang.String server)
public OverpassClient(java.lang.String server,
org.apache.http.HttpHost proxy)
public static java.lang.String buildCompactQuery(java.lang.String type,
org.openstreetmap.atlas.geography.Rectangle bounds)
public static java.lang.String buildCompoundQuery(java.lang.String type,
java.lang.String key,
java.lang.String value,
org.openstreetmap.atlas.geography.Rectangle bounds)
public static java.lang.String buildQuery(java.lang.String type,
org.openstreetmap.atlas.geography.Rectangle bounds)
public static java.lang.String buildQuery(java.lang.String type,
java.lang.String key,
java.lang.String value,
org.openstreetmap.atlas.geography.Rectangle bounds)
public org.apache.http.client.methods.CloseableHttpResponse getResponse(java.lang.String specificQuery)
throws java.io.UnsupportedEncodingException
java.io.UnsupportedEncodingExceptionpublic boolean hasTooMuchResponseData()
public boolean hasUnknownError()
public java.util.List<java.lang.String> nodeIdsFromWayQuery(java.lang.String query)
throws javax.xml.parsers.ParserConfigurationException,
java.lang.UnsupportedOperationException,
org.xml.sax.SAXException,
java.io.IOException
query - The Overpass query.javax.xml.parsers.ParserConfigurationException - If a DocumentBuilder cannot be created which satisfies the configuration
requested.java.lang.UnsupportedOperationException - If any IO errors occur.org.xml.sax.SAXException - If any parse errors occur.java.io.IOException - If is is null.public java.util.List<OverpassOsmNode> nodesFromQuery(java.lang.String query) throws java.lang.UnsupportedOperationException, org.xml.sax.SAXException, java.io.IOException, javax.xml.parsers.ParserConfigurationException
query - The node Overpass query.java.lang.UnsupportedOperationException - If any IO errors occur.org.xml.sax.SAXException - If any parse errors occur.java.io.IOException - If is is null.javax.xml.parsers.ParserConfigurationException - If a DocumentBuilder cannot be created which satisfies the configuration
requested.public java.util.List<OverpassOsmWay> waysFromQuery(java.lang.String query) throws javax.xml.parsers.ParserConfigurationException, java.io.IOException, java.lang.UnsupportedOperationException, org.xml.sax.SAXException
query - The way Overpass query.javax.xml.parsers.ParserConfigurationException - If a DocumentBuilder cannot be created which satisfies the configuration
requested.java.io.IOException - If it is null.java.lang.UnsupportedOperationException - Of any IO errors occur.org.xml.sax.SAXException - If any parse errors occur.