| |
- atom.AtomBase(atom.ExtensionContainer)
-
- GeoBaseElement
-
- Point
- Pos
- Where
class GeoBaseElement(atom.AtomBase) |
|
Base class for elements.
To add new elements, you only need to add the element tag name to self._tag
and the namespace to self._namespace |
|
- Method resolution order:
- GeoBaseElement
- atom.AtomBase
- atom.ExtensionContainer
- __builtin__.object
Methods defined here:
- __init__(self, name=None, extension_elements=None, extension_attributes=None, text=None)
Methods inherited from atom.AtomBase:
- ToString(self, string_encoding='UTF-8')
- Converts the Atom object to a string containing XML.
- __str__(self)
Methods inherited from atom.ExtensionContainer:
- FindExtensions(self, tag=None, namespace=None)
- Searches extension elements for child nodes with the desired name.
Returns a list of extension elements within this object whose tag
and/or namespace match those passed in. To find all extensions in
a particular namespace, specify the namespace but not the tag name.
If you specify only the tag, the result list may contain extension
elements in multiple namespaces.
Args:
tag: str (optional) The desired tag
namespace: str (optional) The desired namespace
Returns:
A list of elements whose tag and/or namespace match the parameters
values
Data descriptors inherited from atom.ExtensionContainer:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Point(GeoBaseElement) |
|
(container) Specifies a particular geographical point, by means of
a <gml:pos> element. |
|
- Method resolution order:
- Point
- GeoBaseElement
- atom.AtomBase
- atom.ExtensionContainer
- __builtin__.object
Methods defined here:
- __init__(self, pos=None, extension_elements=None, extension_attributes=None, text=None)
Methods inherited from atom.AtomBase:
- ToString(self, string_encoding='UTF-8')
- Converts the Atom object to a string containing XML.
- __str__(self)
Methods inherited from atom.ExtensionContainer:
- FindExtensions(self, tag=None, namespace=None)
- Searches extension elements for child nodes with the desired name.
Returns a list of extension elements within this object whose tag
and/or namespace match those passed in. To find all extensions in
a particular namespace, specify the namespace but not the tag name.
If you specify only the tag, the result list may contain extension
elements in multiple namespaces.
Args:
tag: str (optional) The desired tag
namespace: str (optional) The desired namespace
Returns:
A list of elements whose tag and/or namespace match the parameters
values
Data descriptors inherited from atom.ExtensionContainer:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Pos(GeoBaseElement) |
|
(string) Specifies a latitude and longitude, separated by a space,
e.g. `35.669998 139.770004' |
|
- Method resolution order:
- Pos
- GeoBaseElement
- atom.AtomBase
- atom.ExtensionContainer
- __builtin__.object
Methods inherited from GeoBaseElement:
- __init__(self, name=None, extension_elements=None, extension_attributes=None, text=None)
Methods inherited from atom.AtomBase:
- ToString(self, string_encoding='UTF-8')
- Converts the Atom object to a string containing XML.
- __str__(self)
Methods inherited from atom.ExtensionContainer:
- FindExtensions(self, tag=None, namespace=None)
- Searches extension elements for child nodes with the desired name.
Returns a list of extension elements within this object whose tag
and/or namespace match those passed in. To find all extensions in
a particular namespace, specify the namespace but not the tag name.
If you specify only the tag, the result list may contain extension
elements in multiple namespaces.
Args:
tag: str (optional) The desired tag
namespace: str (optional) The desired namespace
Returns:
A list of elements whose tag and/or namespace match the parameters
values
Data descriptors inherited from atom.ExtensionContainer:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Where(GeoBaseElement) |
|
(container) Specifies a geographical location or region.
A container element, containing a single <gml:Point> element.
(Not to be confused with <gd:where>.)
Note that the (only) child attribute, .Point, is title-cased.
This reflects the names of elements in the xml stream
(principle of least surprise).
As a convenience, you can get a tuple of (lat, lon) with Where.location(),
and set the same data with Where.setLocation( (lat, lon) ).
Similarly, there are methods to set and get only latitude and longitude. |
|
- Method resolution order:
- Where
- GeoBaseElement
- atom.AtomBase
- atom.ExtensionContainer
- __builtin__.object
Methods defined here:
- __init__(self, point=None, extension_elements=None, extension_attributes=None, text=None)
- latitude(self)
- (float) Get the latitude value of the geo-tag. See also .location()
- location(self)
- (float, float) Return Where.Point.pos.text as a (lat,lon) tuple
- longitude(self)
- (float) Get the longtitude value of the geo-tag. See also .location()
- longtitude = longitude(self)
- set_latitude(self, lat)
- (bool) Set the latitude value of the geo-tag.
Args:
lat (float): The new latitude value
See also .set_location()
- set_location(self, latlon)
- (bool) Set Where.Point.pos.text from a (lat,lon) tuple.
Arguments:
lat (float): The latitude in degrees, from -90.0 to 90.0
lon (float): The longitude in degrees, from -180.0 to 180.0
Returns True on success.
- set_longitude(self, lon)
- (bool) Set the longtitude value of the geo-tag.
Args:
lat (float): The new latitude value
See also .set_location()
- set_longtitude = set_longitude(self, lon)
Methods inherited from atom.AtomBase:
- ToString(self, string_encoding='UTF-8')
- Converts the Atom object to a string containing XML.
- __str__(self)
Methods inherited from atom.ExtensionContainer:
- FindExtensions(self, tag=None, namespace=None)
- Searches extension elements for child nodes with the desired name.
Returns a list of extension elements within this object whose tag
and/or namespace match those passed in. To find all extensions in
a particular namespace, specify the namespace but not the tag name.
If you specify only the tag, the result list may contain extension
elements in multiple namespaces.
Args:
tag: str (optional) The desired tag
namespace: str (optional) The desired namespace
Returns:
A list of elements whose tag and/or namespace match the parameters
values
Data descriptors inherited from atom.ExtensionContainer:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
| |