Opened 12 years ago
Last modified 10 years ago
#8152 new enhancement
Automatically split too large bounding boxes on "Update data"
Reported by: | stefanct | Owned by: | team |
---|---|---|---|
Priority: | normal | Milestone: | |
Component: | Core | Version: | |
Keywords: | Cc: |
Description
When i try to update my existing data with the File/Update data josm apparently tries to request a too big bounding box after a number of other requests that work.
The GUI shows an error dialog "Errors during download" mentioning the bad request and the console output shows...
GET http://api.openstreetmap.org/api/0.6/map?bbox=16.4447852,48.2031283,16.453221,48.2072351 org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Header=<You requested too many nodes (limit is 50000). Either request a smaller area, or use planet.osm>, Error Body=<<html><head><title>Bad Request</title></head><body><p>You requested too many nodes (limit is 50000). Either request a smaller area, or use planet.osm</p></body></html>> at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:121) …
I tried to decrease osm-server.max-request-area to 0.10 to no avail. This is 100% reproducible with my local .osm file. I can upload it if needed, but since it is >50MB I'll wait for a request to do so, maybe you can figure it out without it. Below is the full output.
exec /usr/lib/jvm/java-7-openjdk-amd64/bin/java -Djava.net.preferIPv4Stack=true -Djava.net.useSystemProxies=true -jar /usr/share/josm/josm.jar Could not load tool definition <!-empty-!> loading plugin 'contourmerge' (version 1003) loading plugin 'download_along' (version 28807) loading plugin 'opendata' (version 28807) loading plugin 'utilsplugin2' (version 28807) loading plugin 'conflation' (version 0.1.6) loading plugin 'jts' (version 28415) Could not load tool definition <!-empty-!> Open file: .../wien.osm (55181215 bytes) GET http://api.openstreetmap.org/api/0.6/map?bbox=16.3886433,48.1779958,16.4445109,48.2194965 GET http://api.openstreetmap.org/api/0.6/map?bbox=16.4445109,48.1623335,16.5003784,48.2036997 GET http://api.openstreetmap.org/api/0.6/map?bbox=16.4010775,48.2124056,16.4194711,48.2268809 GET http://api.openstreetmap.org/api/0.6/map?bbox=16.395925,48.2268809,16.4160807,48.2413562 GET http://api.openstreetmap.org/api/0.6/map?bbox=16.4292348,48.1928986,16.4482992,48.2076521 GET http://api.openstreetmap.org/api/0.6/map?bbox=16.4194711,48.2076521,16.444238,48.2224056 GET http://api.openstreetmap.org/api/0.6/map?bbox=16.4771272,48.1622868,16.5059553,48.1875645 GET http://api.openstreetmap.org/api/0.6/map?bbox=16.3761125,48.2295883,16.3973759,48.2489106 GET http://api.openstreetmap.org/api/0.6/map?bbox=16.3601908,48.2489106,16.3945159,48.2682329 GET http://api.openstreetmap.org/api/0.6/map?bbox=16.3436975,48.2704733,16.3587692,48.2886754 GET http://api.openstreetmap.org/api/0.6/map?bbox=16.3371191,48.2886754,16.3587692,48.3068775 GET http://api.openstreetmap.org/api/0.6/map?bbox=16.3587692,48.2682329,16.3804192,48.2924483 GET http://api.openstreetmap.org/api/0.6/map?bbox=16.2921791,48.3295833,16.3225567,48.3455221 GET http://api.openstreetmap.org/api/0.6/map?bbox=16.3245041,48.3068775,16.3529342,48.3261998 GET http://api.openstreetmap.org/api/0.6/map?bbox=16.3225567,48.3261998,16.3453709,48.3455221 GET http://api.openstreetmap.org/api/0.6/map?bbox=16.2837841,48.3455221,16.3069933,48.3648444 GET http://api.openstreetmap.org/api/0.6/map?bbox=16.2887858,48.3648444,16.3069933,48.3841667 GET http://api.openstreetmap.org/api/0.6/map?bbox=16.3069933,48.3455221,16.3302025,48.3648444 GET http://api.openstreetmap.org/api/0.6/map?bbox=16.3069933,48.3648444,16.3176209,48.3841667 GET http://api.openstreetmap.org/api/0.6/map?bbox=16.3713015,48.2170358,16.395925,48.2312772 GET http://api.openstreetmap.org/api/0.6/map?bbox=16.2045524,48.2011923,16.3008477,48.2568808 GET http://api.openstreetmap.org/api/0.6/map?bbox=16.4817158,48.1402809,16.5425981,48.1688023 GET http://api.openstreetmap.org/api/0.6/map?bbox=16.4903731,48.1670395,16.5259613,48.1837047 GET http://api.openstreetmap.org/api/0.6/map?bbox=16.5179504,48.1327175,16.569587,48.1569122 GET http://api.openstreetmap.org/api/0.6/map?bbox=16.4447852,48.2031283,16.453221,48.2072351 org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Header=<You requested too many nodes (limit is 50000). Either request a smaller area, or use planet.osm>, Error Body=<<html><head><title>Bad Request</title></head><body><p>You requested too many nodes (limit is 50000). Either request a smaller area, or use planet.osm</p></body></html>> at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:121) at org.openstreetmap.josm.io.OsmServerReader.getInputStream(OsmServerReader.java:46) at org.openstreetmap.josm.io.BoundingBoxDownloader.parseOsm(BoundingBoxDownloader.java:135) at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$DownloadTask.parseDataSet(DownloadOsmTask.java:171) at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$DownloadTask.realRun(DownloadOsmTask.java:178) at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:82) at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:145) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Header=<You requested too many nodes (limit is 50000). Either request a smaller area, or use planet.osm>, Error Body=<<html><head><title>Bad Request</title></head><body><p>You requested too many nodes (limit is 50000). Either request a smaller area, or use planet.osm</p></body></html>> at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:121) at org.openstreetmap.josm.io.OsmServerReader.getInputStream(OsmServerReader.java:46) at org.openstreetmap.josm.io.BoundingBoxDownloader.parseOsm(BoundingBoxDownloader.java:135) at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$DownloadTask.parseDataSet(DownloadOsmTask.java:171) at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$DownloadTask.realRun(DownloadOsmTask.java:178) at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:82) at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:145) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Header=<You requested too many nodes (limit is 50000). Either request a smaller area, or use planet.osm>, Error Body=<<html><head><title>Bad Request</title></head><body><p>You requested too many nodes (limit is 50000). Either request a smaller area, or use planet.osm</p></body></html>> at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:121) at org.openstreetmap.josm.io.OsmServerReader.getInputStream(OsmServerReader.java:46) at org.openstreetmap.josm.io.BoundingBoxDownloader.parseOsm(BoundingBoxDownloader.java:135) at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$DownloadTask.parseDataSet(DownloadOsmTask.java:171) at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$DownloadTask.realRun(DownloadOsmTask.java:178) at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:82) at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:145) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) org.openstreetmap.josm.io.OsmApiException: ResponseCode=400, Error Header=<You requested too many nodes (limit is 50000). Either request a smaller area, or use planet.osm>, Error Body=<<html><head><title>Bad Request</title></head><body><p>You requested too many nodes (limit is 50000). Either request a smaller area, or use planet.osm</p></body></html>> at org.openstreetmap.josm.io.OsmServerReader.getInputStreamRaw(OsmServerReader.java:121) at org.openstreetmap.josm.io.OsmServerReader.getInputStream(OsmServerReader.java:46) at org.openstreetmap.josm.io.BoundingBoxDownloader.parseOsm(BoundingBoxDownloader.java:135) at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$DownloadTask.parseDataSet(DownloadOsmTask.java:171) at org.openstreetmap.josm.actions.downloadtasks.DownloadOsmTask$DownloadTask.realRun(DownloadOsmTask.java:178) at org.openstreetmap.josm.gui.PleaseWaitRunnable.doRealRun(PleaseWaitRunnable.java:82) at org.openstreetmap.josm.gui.PleaseWaitRunnable.run(PleaseWaitRunnable.java:145) at java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:471) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722)
Attachments (0)
Change History (4)
comment:1 by , 12 years ago
comment:2 by , 12 years ago
Ah that makes sense; although the error message is displayed while the view in the window clearly shows a sparsely populated area. maybe the viewport is changes after the api call was accepted or so and therefore i dont get to see the right viewport? this should lead to another enhancement request then i guess ;)
Because i could not immediately identify the right <bounds> element (my first try commenting out the last one failed), i removed all of them. When i instructed josm to "update data" again this led to a huge number of requests that took way longer, followed by about an hour or so of 100% cpu load on one core where it apparently updated single nodes ("GET http://api.openstreetmap.org/api/0.6/nodes?nodes=694226434,694226433,694226432,1844797790,1844797785,..."). In the end it completed successfully but fetched way more stuff than was originally visible (instead of a part of a metropolitan area it fetched some highways spanning from east germany to the caucasus :)
so there is clearly some room for improvement. i dont know what to do with this bug report, please change it at your discretion.
comment:3 by , 12 years ago
Summary: | Bad request on "Update data" → Automatically split too large bounding boxes on "Update data" |
---|---|
Type: | defect → enhancement |
Well, you are unlucky in that since the last successful download of that bounding box the number of nodes in there increased to over 50000 (or, unlikely, the server limit was changed). JOSM would need to learn to automatically split such bounding boxes. I guess this should be an enhancement request.
As a workaround you could open the .osm file in a text editor and delete the line near the top with the corresponding <bounds ...> element. You can then download the area again using smaller boxes.