[OSM-dev] API: no BBOX download of a way if no nodes inside the BBOX?

Andy Allan gravitystorm at gmail.com
Mon Apr 27 13:08:10 BST 2009


On Mon, Apr 27, 2009 at 1:52 AM, Chris Browet <cbro at semperpax.com> wrote:
> Whatever the technical solution, I think this must be addressed sooner or
> late and have a rather high priority (from a "dev user" point-of-view).
> IMHO, the assumption that a BBOX query will return all nodes, ways and
> relations (even incomplete) is one of the fundamentals of the api...
>
> Obviously, this is mainly true for an editor -> live databse point-of-view,
> which is probably a special case because non-live usage can probably avoid
> the problem by using other tools.
> Does Potlach somehow (with its "special" api) circumvent the problem?

IANAPotlatchDeveloper, but it looks like "whichways" does a similar
think to the map call - i.e. find the nodes in the area, then ways
refering to those nodes etc. See
http://trac.openstreetmap.org/browser/sites/rails_port/app/controllers/amf_controller.rb#L174
for the code, and ignore the POTLATCH_USE_SQL stuff.

> Another solution is to forbid long straight highways ;-)

Meh. The map call has always been working this way, and we've coped so
far. Doing intersection tests adds boring decisions - are all ways
linestrings (they are technically just ordered lists of nodes, but
most editors assume all ways have linestring-ish behaviour), and if so
should ways be the shortest great-circle distance between the points
or just a straight line in cartesian space...

Cheers,
Andy




More information about the dev mailing list