Class: MetaCartaGeoParser::Location
- Inherits:
-
Struct
- Object
- Struct
- MetaCartaGeoParser::Location
- Defined in:
- lib/metacarta_geoparser.rb,
lib/metacarta_geoparser.rb
Overview
A Location contains the following fields:
name
-
The name of this location
type
-
The type of this location (no clue what it means)
population
-
The number of people who live here or nil
hierarchy
-
The places above this place
latitude
-
Latitude of the location
longitude
-
Longitude of the location
confidence
-
Accuracy confidence (if any)
viewbox
-
Pair of coordinates forming a box around this place
viewbox runs from lower left to upper right.
Instance Attribute Summary collapse
-
#confidence ⇒ Object
Returns the value of attribute confidence.
-
#hierarchy ⇒ Object
Returns the value of attribute hierarchy.
-
#latitude ⇒ Object
Returns the value of attribute latitude.
-
#longitude ⇒ Object
Returns the value of attribute longitude.
-
#name ⇒ Object
Returns the value of attribute name.
-
#population ⇒ Object
Returns the value of attribute population.
-
#type ⇒ Object
Returns the value of attribute type.
-
#viewbox ⇒ Object
Returns the value of attribute viewbox.
Instance Method Summary collapse
-
#coordinates ⇒ Object
The latitude and longitude for this location.
Instance Attribute Details
#confidence ⇒ Object
Returns the value of attribute confidence
19 20 21 |
# File 'lib/metacarta_geoparser.rb', line 19 def confidence @confidence end |
#hierarchy ⇒ Object
Returns the value of attribute hierarchy
19 20 21 |
# File 'lib/metacarta_geoparser.rb', line 19 def hierarchy @hierarchy end |
#latitude ⇒ Object
Returns the value of attribute latitude
19 20 21 |
# File 'lib/metacarta_geoparser.rb', line 19 def latitude @latitude end |
#longitude ⇒ Object
Returns the value of attribute longitude
19 20 21 |
# File 'lib/metacarta_geoparser.rb', line 19 def longitude @longitude end |
#name ⇒ Object
Returns the value of attribute name
19 20 21 |
# File 'lib/metacarta_geoparser.rb', line 19 def name @name end |
#population ⇒ Object
Returns the value of attribute population
19 20 21 |
# File 'lib/metacarta_geoparser.rb', line 19 def population @population end |
#type ⇒ Object
Returns the value of attribute type
19 20 21 |
# File 'lib/metacarta_geoparser.rb', line 19 def type @type end |
#viewbox ⇒ Object
Returns the value of attribute viewbox
19 20 21 |
# File 'lib/metacarta_geoparser.rb', line 19 def viewbox @viewbox end |
Instance Method Details
#coordinates ⇒ Object
The latitude and longitude for this location.
115 116 117 |
# File 'lib/metacarta_geoparser.rb', line 115 def coordinates [latitude, longitude] end |