the_geom_geojson 0.0.2 → 0.0.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG +6 -0
- data/lib/the_geom_geojson/examples.rb +11 -12
- data/lib/the_geom_geojson/version.rb +1 -1
- data/spec/the_geom_geojson/active_record_spec.rb +3 -3
- metadata +2 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: d005d30b01144ea2f6eb965f8ee0aad96320796a
|
4
|
+
data.tar.gz: eee30f805c49d9e22d04c3bcc3b12271c320b2fe
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 222e5bca8a82622800fb3311b41f4e84d37c7864e65615a5ae4f3db6027bdbd51d9c9ca6065542cd5ec71501ef232f87d350ce9782c89f2a7a7762ce03deeca7
|
7
|
+
data.tar.gz: f88b1b7d2b6e59fed2d5701363f9ca6beeea8fd53f5e7d9c58e16621184b0c62ae014b86c9daa17dfa1d55be724b8bca7d0281997f76c0a043b2f14e1542b8b7
|
data/CHANGELOG
CHANGED
@@ -1,16 +1,15 @@
|
|
1
1
|
module TheGeomGeoJSON
|
2
2
|
EXAMPLES = {
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
vermont: '{"type":"MultiPolygon","coordinates":[[[[-71.4652810350704,45.0136740921081],[-71.5386411060663,44.9876482991498],[-71.4949119839671,44.904935677564],[-71.5559082311558,44.8492522250988],[-71.5932506534844,44.7821926292262],[-71.6267620560918,44.7461089549863],[-71.5999650349199,44.7054878828813],[-71.5854265437744,44.6569382972147],[-71.5529291054811,44.6296118479332],[-71.5477715366207,44.5715907748108],[-71.590912834446,44.5654790326065],[-71.5721467665558,44.5383875158682],[-71.5773924416804,44.504795628544],[-71.6556174756354,44.4575842635223],[-71.6653785347815,44.437497307203],[-71.7426030604065,44.401593649355],[-71.7900571774886,44.4003277721065],[-71.8124840748932,44.3568172825136],[-71.8725731294504,44.3366032393682],[-71.9159562732437,44.3470295764368],[-72.0328714035569,44.3205183335643],[-72.068267173563,44.2725758737951],[-72.0476497892934,44.2394907913363],[-72.0656232451116,44.1889985746845],[-72.0390245886718,44.1555266718593],[-72.0531506510485,44.1186649606436],[-72.0419965506196,44.0793215610918],[-72.083470475863,44.021391036795],[-72.1168821381898,43.9938693880775],[-72.0989880476446,43.9573015829302],[-72.1180268061557,43.9232395021891],[-72.1850390675781,43.8635292290268],[-72.1833237715031,43.8096345502268],[-72.2318451262613,43.7478797412623],[-72.2710062037477,43.7340378639244],[-72.3000814868528,43.7057585766342],[-72.3286014830337,43.6012223664117],[-72.374963015393,43.5787671391696],[-72.398567536734,43.5113585632972],[-72.3802145312888,43.4925891723995],[-72.4145989561172,43.3642557678067],[-72.3899518331573,43.3560406089049],[-72.4103476303482,43.3304832941341],[-72.3954226049632,43.3132689557969],[-72.4370005653915,43.2560485116378],[-72.4386548616246,43.2014661570238],[-72.457067782571,43.1465235064938],[-72.4328401191079,43.1194093843771],[-72.4335666904147,43.0855700936913],[-72.4670369657832,43.0541563651196],[-72.4437081638785,43.0098992105563],[-72.4757890076724,42.9714813427244],[-72.5322718195464,42.9547865595992],[-72.5250663219872,42.9145238867145],[-72.5572279085895,42.8536740697468],[-72.5417204846968,42.8074556433103],[-72.4789240060734,42.762844222053],[-72.4584471135625,42.7269600083283],[-72.8463581795254,42.7373692412871],[-73.2761920979235,42.745980717451],[-73.2908881592095,42.8019554141581],[-73.2786777953224,42.8334723973611],[-73.270102777218,43.0298023092314],[-73.256564420585,43.2577019995215],[-73.246878246029,43.5257594146829],[-73.2495213860356,43.554195454945],[-73.2971234303866,43.5876006914255],[-73.3018282638826,43.6243579630326],[-73.3661314692282,43.6233617442716],[-73.3993105885789,43.5681870726839],[-73.4313322540602,43.5879173137677],[-73.4285070276083,43.6365346263424],[-73.3704507107918,43.7250565919606],[-73.3509986681513,43.7724341746593],[-73.3927963012338,43.8227736353836],[-73.3741504033419,43.8762343153286],[-73.4088622107153,43.934506898594],[-73.4103904443496,44.0265056738413],[-73.4379015767698,44.0451251846575],[-73.3906264489292,44.191066922614],[-73.319046344295,44.2502847730753],[-73.3117644008574,44.2791900694105],[-73.3354266881899,44.3599373816722],[-73.2959980390626,44.4287345257907],[-73.2996335004757,44.4774481456921],[-73.3197769055187,44.5235698292573],[-73.3745706674855,44.5756808411071],[-73.3901885448712,44.6189330442253],[-73.3703297781352,44.6627714750981],[-73.365618517551,44.7418072879085],[-73.3351731870471,44.804256760167],[-73.3797359695302,44.8386464823755],[-73.3607532750112,44.8966194647899],[-73.3396999897322,44.9163803468889],[-73.3429328823848,45.0107159350691],[-73.0653616036896,45.0159616529509],[-72.6346759983699,45.014687873586],[-72.5553981209717,45.0080184883601],[-72.3142543161308,45.0038470393866],[-71.9139806338036,45.0076285637164],[-71.4652810350704,45.0136740921081]]]]}',
|
3
|
+
burlington: '{"type":"Polygon","coordinates":[[[-73.223,44.491],[-73.229,44.462],[-73.211,44.439],[-73.146,44.447],[-73.171,44.49],[-73.223,44.491]]]}',
|
4
|
+
burlington_point: '{"type":"Point","coordinates":[-73.193,44.477]}',
|
5
|
+
burlington_downtown: '{"type":"Polygon","coordinates":[[[-73.218,44.487],[-73.22,44.473],[-73.211,44.466],[-73.203,44.475],[-73.203,44.482],[-73.218,44.487]]]}',
|
6
|
+
burlington_downtown_point: '{"type":"Point","coordinates":[-73.21,44.476]}',
|
7
|
+
south_burlington: '{"type":"Polygon","coordinates":[[[-73.175,44.474],[-73.182,44.46],[-73.162,44.456],[-73.158,44.466],[-73.169,44.473],[-73.175,44.474]]]}',
|
8
|
+
south_burlington_point: '{"type":"Point","coordinates":[-73.17,44.467]}',
|
9
|
+
montpelier: '{"type":"Polygon","coordinates":[[[-72.228,44.426],[-72.367,44.204],[-72.442,44.128],[-72.588,44.16],[-72.683,44.013],[-72.916,44.071],[-72.91,44.281],[-72.804,44.451],[-72.653,44.398],[-72.596,44.479],[-72.49,44.425],[-72.433,44.506],[-72.228,44.426]]]}',
|
10
|
+
montpelier_point: '{"type":"Point","coordinates":[-72.486,44.185]}',
|
11
|
+
vermont: '{"type":"Polygon","coordinates":[[[-71.494,45.02],[-71.551,44.58],[-72.03,44.306],[-72.047,44.093],[-72.397,43.542],[-72.466,42.729],[-73.253,42.751],[-73.241,43.542],[-73.423,44.079],[-73.291,44.449],[-73.353,45.009],[-71.494,45.02]]]}',
|
12
|
+
montreal_canada: '{"type":"Polygon","coordinates":[[[-74.064,45.694],[-74.069,45.34],[-73.674,45.228],[-73.234,45.325],[-73.256,45.614],[-73.641,45.775],[-74.064,45.694]]]}',
|
13
|
+
northampton_ma_point: '{"type":"Point","coordinates":[-72.638,42.318]}',
|
15
14
|
}
|
16
15
|
end
|
@@ -46,7 +46,7 @@ end
|
|
46
46
|
class PetAutoUuid < ActiveRecord::Base
|
47
47
|
include TheGeomGeoJSON::ActiveRecord
|
48
48
|
self.primary_key = 'id'
|
49
|
-
|
49
|
+
|
50
50
|
before_save do
|
51
51
|
self.id ||= SecureRandom.uuid
|
52
52
|
end
|
@@ -66,14 +66,14 @@ describe TheGeomGeoJSON do
|
|
66
66
|
# ----------------------------------------------------
|
67
67
|
# 0101000020E61000005C2041F1634C52C085EB51B81E3D4640
|
68
68
|
# (1 row)
|
69
|
-
let(:the_geom_expected) { '
|
69
|
+
let(:the_geom_expected) { '0101000020E61000003108AC1C5A4C52C0931804560E3D4640' }
|
70
70
|
|
71
71
|
# # select st_transform(st_setsrid(st_geomfromgeojson('{"type":"Point","coordinates":[-73.1936,44.4775]}'),4326), 3857);
|
72
72
|
# st_transform
|
73
73
|
# ----------------------------------------------------
|
74
74
|
# 0101000020110F000011410192E8145FC137D58F0ECD215541
|
75
75
|
# (1 row)
|
76
|
-
let(:the_geom_webmercator_expected) { '
|
76
|
+
let(:the_geom_webmercator_expected) { '0101000020110F0000C22156DFD7145FC10858288EB9215541' }
|
77
77
|
|
78
78
|
before do
|
79
79
|
Pet.delete_all
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: the_geom_geojson
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Seamus Abshere
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-09 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activerecord
|
@@ -163,4 +163,3 @@ test_files:
|
|
163
163
|
- spec/spec_helper.rb
|
164
164
|
- spec/the_geom_geojson/active_record_spec.rb
|
165
165
|
- spec/the_geom_geojson_spec.rb
|
166
|
-
has_rdoc:
|