Class: OData4::Properties::Geography::Point
- Inherits:
-
Base
show all
- Defined in:
- lib/odata4/properties/geography/point.rb
Constant Summary
Constants inherited
from Base
Base::DEFAULT_SRID
Instance Attribute Summary
Attributes inherited from Base
#srid
#name, #options, #value
Instance Method Summary
collapse
Methods inherited from Base
#crs, #crs_name, from_xml, #initialize, #json_value, #srs_name, #to_xml, #url_value, #value=
#==, #allows_nil?, #concurrency_mode, from_xml, #initialize, #json_value, #strict?, #to_xml, #url_value
Instance Method Details
#coords_from_s(str) ⇒ Object
13
14
15
|
# File 'lib/odata4/properties/geography/point.rb', line 13
def coords_from_s(str)
str.split(' ').map(&:to_f)
end
|
#coords_to_s ⇒ Object
9
10
11
|
# File 'lib/odata4/properties/geography/point.rb', line 9
def coords_to_s
value.join(' ')
end
|
#type ⇒ Object
5
6
7
|
# File 'lib/odata4/properties/geography/point.rb', line 5
def type
'Edm.GeographyPoint'
end
|
#xml_value ⇒ Object
17
18
19
|
# File 'lib/odata4/properties/geography/point.rb', line 17
def xml_value
{ pos: coords_to_s }
end
|