UserAndre Castro/maps01
Maps
I have recently found open street maps, an alternative to googlemaps. Not only it is a open-source project that allows anyone to contribute for the improvement of the maps, but it has a great feature of allowing data inserted by the users to be retrieved.
I would like to use in to create non-functional maps or trajectories that could open new perspectives on on the city space. (situationists echos)
OSM Elements
source: http://wiki.openstreetmap.org/wiki/Map_Features
maps are made up of a few simple elements (Data primitives): nodes, ways and relations. Each element may have an arbitrary number of properties (a.k.a. Tags) which are Key-Value pairs (e.g. highway=primary). (All editing interfaces use the elements and allow the input of tags. )
NODE - the basic element, building block. Nodes consist of latitude and longitude (Nodes are needed to define a way, but a node can also be a standalone unconnected point representing something or points of interest (POI). Standalone nodes should always have at least one Tag such as amenity=telephone). Example <node id="25496583" lat="51.5173639" lon="-0.140043" version="1" changeset="203496" user="80n" uid="1238" visible="true" timestamp="2007-01-28T11:40:26Z">
<tag k="highway" v="traffic_signals"/>
</node>
WAY - ordered interconnection of at least 2 or more nodes can describe a street, footpath, railway line, river, fence, power line, area or building outline. CLOSED WAY - the first and last nodes are identical, enclosing an AREA eg:
<way id="5090250" visible="true" timestamp="2009-01-19T19:07:25Z" version="8" changeset="816806" user="Blumpsy" uid="64226"> <nd ref="822403"/> <nd ref="21533912"/> <nd ref="821601"/> <nd ref="21533910"/> <nd ref="135791608"/> <nd ref="333725784"/> <nd ref="333725781"/> <nd ref="333725774"/> <nd ref="333725776"/> <nd ref="823771"/> <tag k="highway" v="unclassified"/> <tag k="name" v="Clipstone Street"/> <tag k="oneway" v="yes"/> </way>
Retrieve Data - XAPI
http://wiki.openstreetmap.org/wiki/Xapi To acess data of a given area - Use OSM API XAPI
Am using Xapi http://wiki.openstreetmap.org/wiki/Xapi http://open.mapquestapi.com/xapi/ - provides the coordinates and correct sintax Note: http://jxapi.openstreetmap.org IS DOWN FOR MAINTAINANCE, therefore using http://open.mapquestapi.com
search for libraries in the london: wget http://open.mapquestapi.com/xapi/api/0.6/*[amenity=library][bbox=-0.57,51.24,0.31,51.75] -O london.osm
small section of Leeds:
wget http://open.mapquestapi.com/xapi/api/0.6/map?bbox=-1.577864541098134,53.78683138747235,-1.54353226570888,53.79823913811861 -O leeds-test.osm
pubs in Rotterdam wget http://open.mapquestapi.com/xapi/api/0.6/node[amenity=pub][bbox=4.3142405612056836,51.87797066611181,4.588898764319719,51.973245376533505] -O rotterdam-pub-test.osm
http://open.mapquestapi.com/xapi/api/0.6/node[bbox=4.4552603823670465,51.91739525301985,4.46384345121436,51.920373035178464] -O rotterdam-west-test.osm
QUESTION: how can I get to all streets of a given area, if data is represented only as nodes and ways(2 or more connected nodes)? Seems I will mainly dependent on the fact if someone inserted information of something(amenity) that exists on a given street eg:
<node id="581986376" version="5" timestamp="2011-10-16T17:15:15Z" uid="319572" user="Martien Sch" changeset="9574691" lat="51.917277" lon="4.469368"> <tag k="phone" v="+31102772277"/> <tag k="website" v="www.lantaren-venster.nl"/> <tag k="name" v="Lantaren Venster"/> <tag k="amenity" v="theatre"/> <tag k="addr:street" v="Gouvernestraat"/> <tag k="addr:housenumber" v="133"/> </node>