armg 0.6.0 → 0.6.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/armg/utils.rb +5 -5
- data/lib/armg/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 07c8f55b8c71984ffb01ac0cf5787358369ae915
|
4
|
+
data.tar.gz: dd67c479eb6948e91b44b5959a23a60072402f4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: d169d993f452f7510b1fc3287c571bb349c85a9405c98788e70ce6866612d40f9ce2d11a36d32937616923c2327b6a764ccc6a09729902705a96a7635304131c
|
7
|
+
data.tar.gz: 672db4f1161d23a0217359847c4e3f811b2d3fa9f9f7012bf0ef50a7fd52cc0e501c5369f175233a6c605fe0f1a3d7a4d8d046819474da116dae68fa54700dd8
|
data/lib/armg/utils.rb
CHANGED
@@ -1,10 +1,10 @@
|
|
1
1
|
# see https://dev.mysql.com/doc/refman/5.7/en/gis-data-formats.html
|
2
2
|
module Armg::Utils
|
3
|
-
def mysql_geometry_to_wkb(
|
4
|
-
|
5
|
-
srid =
|
6
|
-
|
7
|
-
|
3
|
+
def mysql_geometry_to_wkb(mysql_geometry)
|
4
|
+
mysql_geometry = mysql_geometry.b
|
5
|
+
srid = mysql_geometry.slice!(0..3)
|
6
|
+
mysql_geometry[4] = "\x20"
|
7
|
+
mysql_geometry.insert(5, srid)
|
8
8
|
end
|
9
9
|
module_function :mysql_geometry_to_wkb
|
10
10
|
|
data/lib/armg/version.rb
CHANGED