westnordost / osmapi-overpass Goto Github PK
View Code? Open in Web Editor NEWJava client for the Overpass API
License: GNU Lesser General Public License v3.0
Java client for the Overpass API
License: GNU Lesser General Public License v3.0
Android studio does not know the "handler". How can I initilize it?
I'm using version 2.0 because 2.1 seems still to be missing in mvnrepository.
implementation 'de.westnordost:osmapi-overpass:2.0'
I have this code for executing a quite simple query.
OsmConnection connection = new OsmConnection("https://overpass-api.de/api/", "jmizv-DataHandler-v0.1");
OverpassMapDataApi overpass = new OverpassMapDataApi(connection);
try {
overpass.queryTable("""
[out:csv("name")][timeout:90];
area["name:de"="Magdeburg"]->.ar;
way["highway"]
[!"name:etymology:wikidata"]
(area.ar);
(._;>;);
out meta;
""", tea -> System.out.println(tea[0]), "\t");
} catch (Exception ex) {
ex.printStackTrace(System.err);
}
But I can see on the console this output:
[..]
Walther-Rathenau-Stra�e
L�neburger Stra�e
Breiter Weg
I fail to see whether I need to set some encoding or whether this is a bug? Maybe solved in 2.1?
Executing this via https://overpass-turbo.eu/ gives the correct encoding.
Hey, just found you lib and really like it 👍
I might use it for an university project if my prof allows it (It is his software)
Just want to ask for an additional feature. If you run a big query with a large response the program is just running the download but does not give any status information.
OverpassStatus
just gives you the status of overpass. Not of the current running query. It would be great if you could add a feature that gives back the current query status or the current size of the download buffer. This basically confirms that osmapi is still working.
Just an idea: You can create a Status class (that runs in a separate thread) and just gives gack the size of the currently downloaded information. Since you are using typical http this should't be that complicated.
Keep on going ✌
Hi @westnordost, first of all thanks for your fantastic library.
I implemented a simple demo but I couldn't get a connection to the overpass API server (https://overpass-api.de/api/). I tried several servers, listed here:
https://wiki.openstreetmap.org/wiki/Overpass_API
But I couldn't get a connection to any of them, I get a "SocketTimeoutException: read timeout".
Any chance to upgrade this as a module and support Java 11+?
Thank you for your work :)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.