X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/ab3df6fc56a2a16c6af65ac429505d682153a60d..66ba93d6e60a9251c7cff9f2a80918ea0ac26598:/lib/potlatch.rb diff --git a/lib/potlatch.rb b/lib/potlatch.rb index 898a5a07f..76944e394 100644 --- a/lib/potlatch.rb +++ b/lib/potlatch.rb @@ -85,7 +85,7 @@ module Potlatch a + 0.chr + 0.chr + 9.chr when String 2.chr + encodestring(n) - when Numeric + when Numeric, GeoRecord::Coord 0.chr + encodedouble(n) when NilClass 5.chr @@ -107,7 +107,7 @@ module Potlatch # Encode number as eight-byte double precision float def self.encodedouble(n) - [n].pack("G") + [n.to_f].pack("G") end # Encode number as four-byte long