#14653 closed enhancement (fixed)
Overpass Download - PBF format
| Reported by: | Owned by: | Don-vip | |
|---|---|---|---|
| Priority: | normal | Milestone: | |
| Component: | Plugin pbf | Version: | |
| Keywords: | template_report | Cc: |
Description
What steps will reproduce the problem?
- Set Overpass API instance to http://dev.overpass-api.de/api_mmd/
- Install PBF plugin
- Download data from Overpass API using the following query
[out:pbf][timeout:25][bbox:{{bbox}}];
(
node["amenity"="pharmacy"];
way["amenity"="pharmacy"];
relation["amenity"="pharmacy"];
);
(._;>;);
out meta;
What is the expected result?
PBF format is automatically recognized by PBF plugin and data processed accordingly, like opening an .osm.pbf file from the local file system or a remote location.
What happens instead?
JOSM tries to parse PBF result via XML parser, throwing an error message.
Please provide any additional information below. Attach a screenshot if possible.
URL:http://josm.openstreetmap.de/svn/trunk
Repository:UUID: 0c6e7542-c601-0410-84e7-c038aed88b3b
Last:Changed Date: 2017-04-02 01:45:00 +0200 (Sun, 02 Apr 2017)
Build-Date:2017-04-02 01:34:50
Revision:11826
Relative:URL: ^/trunk
Identification: JOSM/1.5 (11826 de) Linux Ubuntu 16.04.2 LTS
Memory Usage: 871 MB / 3484 MB (670 MB allocated, but free)
Java version: 1.8.0_91-b14, Oracle Corporation, Java HotSpot(TM) 64-Bit Server VM
Screen: :0.0 1920x1080
Maximum Screen Size: 1920x1080
VM arguments: [-Djava.security.policy=file:${JAVA_HOME}/jre/lib/security/javaws.policy, -DtrustProxy=true, -Djnlpx.home=${JAVA_HOME}/jre/bin, -Djava.security.manager, -Djnlpx.origFilenameArg=${HOME}/.java/deployment/cache/6.0/56/1ee8cfb8-110faae6, -Djnlpx.remove=false, -Dsun.awt.warmup=true, -Djava.util.Arrays.useLegacyMergeSort=true, -Djnlpx.splashport=46196, -Djnlp.application.href=https://josm.openstreetmap.de/download/josm.jnlp, -Djnlpx.jvm=${JAVA_HOME}/jre/bin/java]
Plugins:
+ Mapillary (v1.5.0)
+ apache-commons (32994)
+ apache-http (32699)
+ continuosDownload (53)
+ contourmerge (1030)
+ pbf (33165)
+ poly (33004)
+ reverter (33088)
+ scripting (30764)
Tagging presets:
+ https://josm.openstreetmap.de/josmfile?page=Presets/MountainbikeTrails&preset&zip=1
Map paint styles:
- http://josm.openstreetmap.de/browser/josm/trunk/styles/standard/elemstyles.mapcss?rev=7374&format=txt
Last errors/warnings:
- E: org.openstreetmap.josm.io.OsmTransferException: org.openstreetmap.josm.io.IllegalDataException: Zeile 1 Spalte 1: Content ist nicht zulässig in Prolog.. Ursache: org.openstreetmap.josm.io.IllegalDataException: Zeile 1 Spalte 1: Content ist nicht zulässig in Prolog.. Ursache: javax.xml.stream.XMLStreamException: ParseError at [row,col]:[1,1]
- E: Ungültige Daten - <html>Daten herunterladen fehlgeschlagen. Das Format ist nicht unterstützt, unzulässig strukturiert und/oder inkonsistent.<br><br>Details (nicht übersetzt): Zeile 1 Spalte 1: Content ist nicht zulässig in Prolog.</html>
Note: PBF output for Overpass API is still in prototype status, that's why I have flagged this as enhancement.
Attachments (0)
Change History (12)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
| Component: | Core → Plugin pbf |
|---|---|
| Owner: | changed from to |
follow-up: 9 comment:8 by , 9 years ago
Thanks a lot, I'm really impressed how fast this enhancement request was implemented!
I did some testing with XML and PBF and noticed the following message for [out:xml] on the console. I guess it's nothing serious as the data is still being loaded properly and results are also visible in JOSM. Version is 11923.
2017-04-15 20:44:52.250 SCHWERWIEGEND: java.lang.NoSuchMethodException: org.openstreetmap.josm.io.OverpassDownloadReader$OverpassOsmReader.<init>() java.lang.NoSuchMethodException: org.openstreetmap.josm.io.OverpassDownloadReader$OverpassOsmReader.<init>() at java.lang.Class.getConstructor0(Class.java:3082) at java.lang.Class.getConstructor(Class.java:1825) at org.openstreetmap.josm.io.OverpassDownloadReader.parseDataSet(OverpassDownloadReader.java:238) at org.openstreetmap.josm.io.BoundingBoxDownloader.parseOsm(BoundingBoxDownloader.java:192) at org.openstreetmap.josm.io.OverpassDownloadReader.parseOsm(OverpassDownloadReader.java:253) at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$DownloadTask.parseDataSet(DownloadOsmTask.java:352) at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$DownloadTask.realRun(DownloadOsmTask.java:360) at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:95) at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:143) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:511) at java.util.concurrent.FutureTask.run(FutureTask.java:266) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617) at java.lang.Thread.run(Thread.java:745)
comment:9 by , 9 years ago
Replying to mmd:
Thanks a lot, I'm really impressed how fast this enhancement request was implemented!
Seems you triggered the interest of Vincent :-)
I did some testing with XML and PBF and noticed the following message for [out:xml] on the console. I guess it's nothing serious as the data is still being loaded properly and results are also visible in JOSM. Version is 11923.
That looks much like a local build issue. It should be gone when doing an ant clean. If not, please rereport.
comment:10 by , 9 years ago
That looks much like a local build issue. It should be gone when doing an ant clean. If not, please rereport.
Usually I do an svn update followed by an ant clean dist. I just tried that again and still see the NoSuchMethodException. Not sure if this is a local issue or something in the code. For the record, I'm using:
java -version
java version "1.8.0_91"
Java(TM) SE Runtime Environment (build 1.8.0_91-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.91-b14, mixed mode)
comment:11 by , 9 years ago
Could it be, that
try {
reader = readerClass.getConstructor().newInstance();
} catch (ReflectiveOperationException | IllegalArgumentException | SecurityException e) {
Main.error(e);
}
is trying to instantiate a class static final class OverpassOsmReader that is declared as static?



overpass turbo link to PBF demo