On 2012-11-08 08:14, Jo wrote:
Hi,

I want to find all bus stops along a side of the road. So I'm looking for
functions in JOSM to:

Define a rectangle a few meters to one side of the (section of a) road.
Get all nodes within this rectangle as a list.

or:

Define a polygon with the way as one of its sides and a parallel way x
meters away as another side.
Get all nodes within this polygon as a list.

I've been browsing through the source code, but I can't seem to find
suitable functions to accomplish this.

There is a plugin: download_along. It is rather crude, but effective. You can download objects within 5000, 500 and 50 meters of one or more selected objects, with a maximum area of 20, 10, 5 or 1 km^2 per request. JOSM (the api) can only download rectangular areas (bbox) so it will divide the area you request into these smaller areas to download. Obviously you would want the lowest settings for your use. It will download in multiple sets, but because it's all automated you can get coffee while it's working.

There are suggestions for API v0.7 to extend downloading to arbitrary areas, but these seem to be centered on downloading objects that are within an already existing structure, not arbitrary polygons. Not sure it that would be difficult to program, but I'm adding it to the list at <http://wiki.openstreetmap.org/wiki/API_v0.7>

Regards,
Maarten


_______________________________________________
josm-dev mailing list
josm-dev@openstreetmap.org
http://lists.openstreetmap.org/listinfo/josm-dev

Reply via email to