Created
January 18, 2017 04:02
-
-
Save akirahrkw/ce6964b0328ebf8f3ea19a0f6b5349e8 to your computer and use it in GitHub Desktop.
to find places using ST_Contains( a point within a polygon)
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Place.where("ST_Contains(polygon::geometry, ST_PointFromText('POINT(#{lon} #{lat})' , 4326 ) )") |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment