Class: Placemaker::Location
- Inherits:
-
Object
- Object
- Placemaker::Location
- Includes:
- XmlHelper
- Defined in:
- lib/placemaker/location.rb
Overview
Parses and contains data for place
, administrative scope and geographic scope elements.
Instance Method Summary collapse
-
#centroid ⇒ Object
centroid for the place.
-
#location_type ⇒ Object
place type name for the place.
-
#name ⇒ Object
fully qualified name for the place.
-
#woe_id ⇒ Object
permanent identifier for the place.
Methods included from XmlHelper
Instance Method Details
#centroid ⇒ Object
centroid for the place
25 26 27 |
# File 'lib/placemaker/location.rb', line 25 def centroid Placemaker::Coordinates.new(@nodeset.search('.//xmlns:centroid')) end |
#location_type ⇒ Object
place type name for the place
20 21 22 |
# File 'lib/placemaker/location.rb', line 20 def location_type nested_node('type') end |
#name ⇒ Object
fully qualified name for the place
15 16 17 |
# File 'lib/placemaker/location.rb', line 15 def name nested_node('name') end |
#woe_id ⇒ Object
permanent identifier for the place
10 11 12 |
# File 'lib/placemaker/location.rb', line 10 def woe_id nested_node('woeId').to_i end |