Skip to content

Instantly share code, notes, and snippets.

@akirahrkw
Created January 18, 2017 04:02
Show Gist options
  • Save akirahrkw/ce6964b0328ebf8f3ea19a0f6b5349e8 to your computer and use it in GitHub Desktop.
Save akirahrkw/ce6964b0328ebf8f3ea19a0f6b5349e8 to your computer and use it in GitHub Desktop.
to find places using ST_Contains( a point within a polygon)
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