[josm-dev] How to use DownloadTask in Python/Jython

Jo winfixit at gmail.com
Sun Jan 18 01:06:33 UTC 2015


Oh, I've been debugging for the past hour and preparing the message which
crossed yours. In the mean time I had come to the conclusion it'd be best
to include the bounds in the Overpass, but I hadn't gotten around to it yet.

I'm going to look into running it with another background thread.

Thanks!

Jo

2015-01-18 1:58 GMT+01:00 Paul Hartmann <phaaurlt at gmail.com>:

> On 17.01.2015 00:27, Jo wrote:
>
>> Hi Paul,
>>
>> Many thanks for your help. f.get() makes the script hang forever.
>>
>
> Maybe the script and the download are run by the same Executor
> (Main.worker). Then this would block. You can try to run your entire script
> in a new background thread. (Code example: http://stackoverflow.com/a/
> 12551542)
>
>  The other problem is that I don't see how to restrict it to the bbox I
>> zoomed in upon. So the script downloads all the routes with that same ref
>> all over the region, for the operator in question.
>>
>
> This shouldn't be too hard, call Main.map.mapView.getRealBounds() to get
> the current bbox and integrate these parameters into the overpass query.
>
>
> Paul
>
> _______________________________________________
> josm-dev mailing list
> josm-dev at openstreetmap.org
> https://lists.openstreetmap.org/listinfo/josm-dev
>


More information about the josm-dev mailing list