Class: Placemaker::Location

Inherits:
Object
  • Object
show all
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

Methods included from XmlHelper

#initialize

Instance Method Details

#centroidObject

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_typeObject

place type name for the place



20
21
22
# File 'lib/placemaker/location.rb', line 20

def location_type
  nested_node('type')
end

#nameObject

fully qualified name for the place



15
16
17
# File 'lib/placemaker/location.rb', line 15

def name
  nested_node('name')
end

#woe_idObject

permanent identifier for the place



10
11
12
# File 'lib/placemaker/location.rb', line 10

def woe_id
  nested_node('woeId').to_i
end