openstreetmap-website

https://github.com/openstreetmap/openstreetmap-website

Ruby

The Rails application that powers OpenStreetMap

AmfController#whichways

Find all the ways, POI nodes (i.e. not part of ways), and relations
in a given bounding box. Nodes are returned in full; ways and relations
are IDs only.

return is of the form:
[success_code, success_message,
 [[way_id, way_version], ...],
 [[node_id, lat, lon, [tags, ...], node_version], ...],
 [[rel_id, rel_version], ...]]
where the ways are any visible ways which refer to any visible
nodes in the bbox, nodes are any visible nodes in the bbox but not
used in any way, rel is any relation which refers to either a way
or node that we're returning.

Source | Google | Stack overflow

Edit

git clone [email protected]:openstreetmap/openstreetmap-website.git

cd openstreetmap-website

open app/controllers/amf_controller.rb

Contribute

# Make a new branch

git checkout -b -your-name--update-docs-AmfController-whichways-for-pr


# Commit to git

git add app/controllers/amf_controller.rbgit commit -m "better docs for AmfController#whichways"


# Open pull request

gem install hub # on a mac you can `brew install hub`

hub fork

git push <your name> -your-name--update-docs-AmfController-whichways-for-pr

hub pull-request


# Celebrate!