diff options
| author | Xinhui | 2017-01-25 11:41:14 +0100 |
|---|---|---|
| committer | Xinhui | 2017-01-25 11:41:14 +0100 |
| commit | 4fdc30f46f8a296dcd15b827a99f8c7a09338d50 (patch) | |
| tree | 857b0bee0c575370def8fd56cfa6e1ad0e2cbd7c /lib/stif/reflex_synchronization.rb | |
| parent | 17e8676b5456a51697168659a10693ddec7633ce (diff) | |
| download | chouette-core-4fdc30f46f8a296dcd15b827a99f8c7a09338d50.tar.bz2 | |
Store long lat for StopArea & AccessPoint
Diffstat (limited to 'lib/stif/reflex_synchronization.rb')
| -rw-r--r-- | lib/stif/reflex_synchronization.rb | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/lib/stif/reflex_synchronization.rb b/lib/stif/reflex_synchronization.rb index b7001bf68..9c5ff7cd4 100644 --- a/lib/stif/reflex_synchronization.rb +++ b/lib/stif/reflex_synchronization.rb @@ -131,6 +131,10 @@ module Stif :zip_code => 'PostalRegion', :city_name => 'Town' }.each do |k, v| access[k] = entry[v] end + if entry['gml:pos'] + access['longitude'] = entry['gml:pos'][:lng] + access['latitude'] = entry['gml:pos'][:lat] + end access.save if access.valid? && access.changed? end @@ -146,6 +150,11 @@ module Stif :city_name => 'Town' }.each do |k, v| stop[k] = entry[v] end + if entry['gml:pos'] + stop['longitude'] = entry['gml:pos'][:lng] + stop['latitude'] = entry['gml:pos'][:lat] + end + if stop.changed? stop.creation_time = entry[:created] stop.import_xml = entry[:xml] |
