lib/spatial_features/utils.rb in spatial_features-2.20.0 vs lib/spatial_features/utils.rb in spatial_features-3.0.0

- old
+ new

@@ -57,9 +57,9 @@ ActiveRecord::Base.connection.select_value(query) end # Convert a hash of GeoJSON data into a PostGIS geometry object def geom_from_json(geometry) - select_db_value("SELECT ST_GeomFromGeoJSON('#{geometry.to_json}')") + RGeo::GeoJSON.decode(geometry.to_json).as_text end end end