| Trees | Indices | Help |
|
|---|
|
|
object --+
|
point.Point --+
|
Node
Since: 0.9.0
|
|||
|
|||
str
|
|
||
| ET.Element |
|
||
str
|
|
||
| Osm |
|
||
|
Inherited from Inherited from Inherited from |
|||
|
|||
| Node |
|
||
|
|||
|
ident Node's unique indentifier |
|||
|
latitude Location's latitude |
|||
|
longitude Locations's longitude |
|||
|
tags Tags associated with the node |
|||
|
timestamp The date and time a node was logged |
|||
|
user User who logged the node |
|||
|
visible Whether the node is visible |
|||
|
Inherited from |
|||
|
|||
|
Inherited from Inherited from |
|||
|
|||
Initialise a new Node object >>> Node(0, 52, 0) Node(0, 52.0, 0.0, False, None, None, None) >>> Node(0, 52, 0, True, "jnrowe", Timestamp(2008, 1, 25)) Node(0, 52.0, 0.0, True, 'jnrowe', Timestamp(2008, 1, 25, 0, 0), None) >>> Node(0, 52, 0, tags={"key": "value"}) Node(0, 52.0, 0.0, False, None, None, {'key': 'value'})
|
Pretty printed location string >>> print(Node(0, 52, 0)) Node 0 (52°00'00"N, 000°00'00"E) >>> print(Node(0, 52, 0, True, "jnrowe", ... Timestamp(2008, 1, 25))) Node 0 (52°00'00"N, 000°00'00"E) [visible, user: jnrowe, timestamp: 2008-01-25T00:00:00+00:00] >>> print(Node(0, 52, 0, tags={"key": "value"})) Node 0 (52°00'00"N, 000°00'00"E) [key: value]
|
Generate a OSM node element subtree >>> ET.tostring(Node(0, 52, 0).toosm()) '<node id="0" lat="52.0" lon="0.0" visible="false" />' >>> ET.tostring(Node(0, 52, 0, True, "jnrowe", ... Timestamp(2008, 1, 25)).toosm()) '<node id="0" lat="52.0" lon="0.0" timestamp="2008-01-25T00:00:00+00:00" user="jnrowe" visible="true" />' >>> ET.tostring(Node(0, 52, 0, tags={"key": "value"}).toosm()) '<node id="0" lat="52.0" lon="0.0" visible="false"><tag k="key" v="value" /></node>'
|
Generate URL for downloading OSM data within a region >>> Home = Node(0, 52, 0) >>> Home.get_area_url(3) 'http://api.openstreetmap.org/api/0.5/map?bbox=-0.0438497383115,51.9730034021,0.0438497383115,52.0269965979' >>> Home.get_area_url(12) 'http://api.openstreetmap.org/api/0.5/map?bbox=-0.175398634277,51.8920136086,0.175398634277,52.1079863914'
|
Fetch, and import, an OSM region >>> Home = Node(0, 52, 0) >>> # The following test is skipped, because the Osm object doesn't >>> # support a reliable way __repr__ method. >>> Home.fetch_area_osm(3) # doctest: +SKIP
|
|
| Trees | Indices | Help |
|
|---|
| Generated by Epydoc 3.0.1 on Tue May 20 12:41:30 2008 | http://epydoc.sourceforge.net |