Class: MySociety::MapIt::Point
- Inherits:
-
Object
- Object
- MySociety::MapIt::Point
- Includes:
- LocalAuthorityFinder, UriToHash
- Defined in:
- lib/my_society/map_it.rb
Constant Summary collapse
- SYSTEM_WGS84 =
4326
- SYSTEM_IRISH_NATIONAL_GRID =
29902
- SYSTEM_BRITISH_NATIONAL_GRID =
27700
Constants included from LocalAuthorityFinder
LocalAuthorityFinder::LOCAL_AUTHORITY_TYPE_CODES
Instance Attribute Summary collapse
-
#coordinate_system ⇒ Object
readonly
Returns the value of attribute coordinate_system.
-
#x ⇒ Object
readonly
Returns the value of attribute x.
-
#y ⇒ Object
readonly
Returns the value of attribute y.
Instance Method Summary collapse
-
#initialize(x, y, coordinate_system = SYSTEM_WGS84) ⇒ Point
constructor
A new instance of Point.
- #to_point ⇒ Object
- #uri ⇒ Object
Methods included from UriToHash
Methods included from LocalAuthorityFinder
Constructor Details
#initialize(x, y, coordinate_system = SYSTEM_WGS84) ⇒ Point
84 85 86 87 88 |
# File 'lib/my_society/map_it.rb', line 84 def initialize x, y, coordinate_system = SYSTEM_WGS84 self.x = x self.y = y self.coordinate_system = coordinate_system end |
Instance Attribute Details
#coordinate_system ⇒ Object
Returns the value of attribute coordinate_system.
81 82 83 |
# File 'lib/my_society/map_it.rb', line 81 def coordinate_system @coordinate_system end |
#x ⇒ Object
Returns the value of attribute x.
75 76 77 |
# File 'lib/my_society/map_it.rb', line 75 def x @x end |
#y ⇒ Object
Returns the value of attribute y.
78 79 80 |
# File 'lib/my_society/map_it.rb', line 78 def y @y end |