@pablobm commented on this pull request.


> +#  id         :bigint           not null, primary key
+#  name       :string
+#  zone       :geography        geometry, 4326
+#  created_at :datetime         not null
+#  updated_at :datetime         not null
+#
+class GeoblockZone < ApplicationRecord
+  def self.falls_within_any?(opts = {})
+    lon = opts.fetch(:lon)
+    lat = opts.fetch(:lat)
+
+    GeoblockZone.exists?(
+      [
+        # FIXME: do proper interpolation of lon/lat
+        <<~SQL.squish
+          ST_Covers(

I have gone back to `ST_Contains` following @pnorman's comment re: geography vs 
geometry.

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/pull/6713#discussion_r2713590456
You are receiving this because you are subscribed to this thread.

Message ID: 
<openstreetmap/openstreetmap-website/pull/6713/review/[email protected]>
_______________________________________________
rails-dev mailing list
[email protected]
https://lists.openstreetmap.org/listinfo/rails-dev

Reply via email to