[openstreetmap-website] Object query hits javascript error TypeError: t.bounds is undefined (#1156)

mmd notifications at github.com
Sun Mar 6 20:24:04 UTC 2016

At least in the [documentation](http://wiki.openstreetmap.org/wiki/Overpass_API/Overpass_QL#Print_.28out.29)  I could not find an explicit hint how `bounds` should behave in the context of `out geom(...)`: 

> The attribute "geom" can be followed by a bounding box in the format "(south,west,north,east)". In this case only coordinates that are inside the bounding box are produced. For way segments also the first coordinate outside the bounding box is produced to allow for properly formed segments. 

I assume that only those nodes which are produced by `out geom(...)` would also count towards the `bounds` element.

 @drolbr : Roland, can you please comment on this one? Am I missing something here or is this all works as designed?

Maybe adding another `out bb ids;` would be an option to produce a full bounding box without repeating all data again:

out tags geom(39.59927344095099,-74.5391035079956,39.633324269501465,-74.4717264175415);
out bb ids;relation(pivot.a);out tags bb;

This returns an additional way with id and unclipped  `bounds` details and should be usable for sorting purposes.

  "type": "way",
  "id": 33832747,
  "bounds": {
    "minlat": 39.1919712,
    "minlon": -75.0191372,
    "maxlat": 40.1129889,
    "maxlon": -74.2086371
Of course there's also the option to have ways behave like relations via `out bb tags;` 

Reply to this email directly or view it on GitHub:
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20160306/777b399b/attachment.html>

More information about the rails-dev mailing list