the_geom_geojson 0.1.0 → 0.1.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b0cb34abb081e5fdf3f64760adc9b8ed2a4b2690
4
- data.tar.gz: c370e1e32937b9bdf8b0f668dfdea446f224df75
3
+ metadata.gz: ae043cc4cfd9148c6fc66a1023ff397f6766234d
4
+ data.tar.gz: 1fcce54797e6207af51344a08adfc0bf41a5fa00
5
5
  SHA512:
6
- metadata.gz: 7286bb6c4c26277a6e18a5c2598e8068e4e1057ad569e820cfa625e890263a6801866912ecf1d423b170908b1bbeb30514681c7c890de5135f004375ccf58f70
7
- data.tar.gz: 43525ed84188d6306b38803a783912397b5260caf39781d3bebf6659e8d75b324b76dd218d0459dd631f1ceec34d7c21ef39202263aedff4b5e8ae2e6f29e6f3
6
+ metadata.gz: c91ad78475eed749ce3e02c6b97f01c540379dafa5587538760089efee4581f3c19b74285a9acad8bce7bba960990eb3a98214d6fdbf1a8f69836e5da8520757
7
+ data.tar.gz: 59b101b7aa9660dbee0c7c8ee5dffc930e3a3ebb73549d0d66c9dfba9616a34b818ee6cf1c1485af2b797e8a169c494819534cff259a540c4aecf2ee86710443
data/CHANGELOG CHANGED
@@ -1,3 +1,9 @@
1
+ 0.1.1 / 2014-10-19
2
+
3
+ * Enhancements
4
+
5
+ * Going back to using PostGIS to convert to GeoJSON, clumsier but faster in worse case.
6
+
1
7
  0.1.0 / 2014-10-19
2
8
 
3
9
  * 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
 
@@ -1,3 +1,3 @@
1
1
  module TheGeomGeoJSON
2
- VERSION = '0.1.0'
2
+ VERSION = '0.1.1'
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
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.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Seamus Abshere