the_geom_geojson 0.1.0 → 0.1.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b0cb34abb081e5fdf3f64760adc9b8ed2a4b2690
4
- data.tar.gz: c370e1e32937b9bdf8b0f668dfdea446f224df75
3
+ metadata.gz: 5dc66a9e2f982e061c64880c64a0dcac61c3fc6e
4
+ data.tar.gz: 58a42e2156d1a7e56305fb917c718c86d471f360
5
5
  SHA512:
6
- metadata.gz: 7286bb6c4c26277a6e18a5c2598e8068e4e1057ad569e820cfa625e890263a6801866912ecf1d423b170908b1bbeb30514681c7c890de5135f004375ccf58f70
7
- data.tar.gz: 43525ed84188d6306b38803a783912397b5260caf39781d3bebf6659e8d75b324b76dd218d0459dd631f1ceec34d7c21ef39202263aedff4b5e8ae2e6f29e6f3
6
+ metadata.gz: 029b1cca09c0a13b708bf2ec8a8148a87e2c6727e70eec4459394045d89c5d50c8344cc86fb45a31bd3deeac7de8159159a54496cc0d5fce9dffafb25fc65b43
7
+ data.tar.gz: 7dd1bfa7f2d6e5ca96f1588647282e9b387d3567aba7a4d78a1b761bd8b8c12f2012fff61813d4a0278d18961a76ca032919274b7b995829367a5f885b58867e
data/CHANGELOG CHANGED
@@ -1,3 +1,15 @@
1
+ 0.1.2 / 2014-11-07
2
+
3
+ * Enhancements
4
+
5
+ * Add Colorado, Denver and Colorado Springs to examples.
6
+
7
+ 0.1.1 / 2014-10-19
8
+
9
+ * Enhancements
10
+
11
+ * Going back to using PostGIS to convert to GeoJSON, clumsier but faster in worse case.
12
+
1
13
  0.1.0 / 2014-10-19
2
14
 
3
15
  * Breaking changes
@@ -51,12 +51,9 @@ module TheGeomGeoJSON
51
51
  elsif preselected = read_attribute(:the_geom_geojson)
52
52
  preselected
53
53
  elsif the_geom
54
- started_at = Time.now
55
- memo = TheGeomGeoJSON.ewkb_to_geojson the_geom
56
- if (elapsed = Time.now - started_at) > 0.1
57
- $stderr.puts "[the_geom_geojson] EWKB->GeoJSON parsing took #{elapsed}s, recommend using #{self.class.name}.with_geojson scope"
54
+ self.class.connection_pool.with_connection do |c|
55
+ c.select_value "SELECT ST_AsGeoJSON(the_geom) FROM #{self.class.quoted_table_name} WHERE #{self.class.quoted_primary_key} = #{c.quote(id)} LIMIT 1"
58
56
  end
59
- memo
60
57
  end
61
58
  end
62
59
 
@@ -11,5 +11,8 @@ module TheGeomGeoJSON
11
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
12
  montreal_canada: '{"type":"Polygon","coordinates":[[[-74.064,45.694],[-73.641,45.775],[-73.256,45.614],[-73.234,45.325],[-73.674,45.228],[-74.069,45.34],[-74.064,45.694]]]}',
13
13
  northampton_ma_point: '{"type":"Point","coordinates":[-72.638,42.318]}',
14
+ colorado: '{"type":"MultiPolygon","coordinates":[[[[-109.043488,37.4846840000001],[-109.050076,41.0006590000001],[-102.051717,41.0023590000001],[-102.042089,36.993016],[-109.045223,36.999084],[-109.043488,37.4846840000001]]]]}',
15
+ denver: '{"type":"MultiPolygon","coordinates":[[[[-105.829662,39.5648650000001],[-105.78323,39.629937],[-105.926681,39.6735880000001],[-105.887622,39.7966000000001],[-105.735925,39.804985],[-105.675798,39.9324450000001],[-105.147342,39.913886],[-104.979344,40.043951],[-103.705701,40.0013660000001],[-103.719664,38.8668270000001],[-104.055528,38.868868],[-104.051589,39.1283700000001],[-105.330444,39.1296850000001],[-105.329134,38.6972049999999],[-105.96975,38.6935510000001],[-105.925123,38.872178],[-106.192954,39.0177090000001],[-106.183972,39.3093539999999],[-106.135529,39.3795460000001],[-106.021966,39.361713],[-105.829662,39.5648650000001]]]]}',
16
+ colorado_springs: '{"type":"MultiPolygon","coordinates":[[[[-104.917757,38.883883],[-104.775825,39.035133],[-104.618156,38.744333],[-104.843785,38.72282],[-104.917757,38.883883]]]]}',
14
17
  }
15
18
  end
@@ -1,3 +1,3 @@
1
1
  module TheGeomGeoJSON
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.2'
3
3
  end
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.1.0
4
+ version: 0.1.2
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-10-19 00:00:00.000000000 Z
11
+ date: 2014-11-07 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activerecord