Sha256: f45112da6f11e5ff3ee26be72119cce644bdfabf53b4231f6409b5380a982f84
Contents?: true
Size: 339 Bytes
Versions: 1
Compression:
Stored size: 339 Bytes
Contents
# see https://dev.mysql.com/doc/refman/5.7/en/gis-data-formats.html module Armg::Utils def mysql_geometry_to_wkb(wkb) wkb = wkb.b srid = wkb.slice!(0..3) wkb[4] = "\x20" wkb.insert(5, srid) end module_function :mysql_geometry_to_wkb def pack_srid(srid) [srid].pack('L<') end module_function :pack_srid end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
armg-0.6.0 | lib/armg/utils.rb |