spatial_features 2.2.1 → 2.2.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/models/feature.rb +6 -2
- data/lib/spatial_features/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: 719c3ecae256a4ccc467f6ae09f2db52f7a087b4
|
4
|
+
data.tar.gz: 06d8012355564e46386fbfe327e915f3b9fa832d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: e6e2990a278cf521a7857e6d1614c2d5be861c534e1f18dfeb1f2f81999808a54f51b2bc348745ffed684857dd62dbc36913ef9b92d7ba10c1cd4c78579cefc5
|
7
|
+
data.tar.gz: a236dcca05df37c76befe0be99b318aea0118e120822e0783d6415444ebdde7ca08c1315a1a9258c5eff3b1d05e51c182bad04d4599750ac374bf45e5fd91f9a
|
data/app/models/feature.rb
CHANGED
@@ -78,14 +78,18 @@ class Feature < ActiveRecord::Base
|
|
78
78
|
centroid = ST_PointOnSurface(geog::geometry)
|
79
79
|
SQL
|
80
80
|
|
81
|
-
invalid('geom').update_all <<-SQL
|
82
|
-
geom
|
81
|
+
invalid('geom').update_all <<-SQL.squish
|
82
|
+
geom = ST_Buffer(geom, 0)
|
83
83
|
SQL
|
84
84
|
|
85
85
|
update_all <<-SQL.squish
|
86
86
|
geom_lowres = ST_SimplifyPreserveTopology(geom, #{options[:lowres_simplification]})
|
87
87
|
SQL
|
88
88
|
|
89
|
+
invalid('geom_lowres').update_all <<-SQL.squish
|
90
|
+
geom_lowres = ST_Buffer(geom_lowres, 0)
|
91
|
+
SQL
|
92
|
+
|
89
93
|
update_all <<-SQL.squish
|
90
94
|
kml = ST_AsKML(geog, 6),
|
91
95
|
kml_lowres = ST_AsKML(geom_lowres, #{options[:lowres_precision]}),
|