Skip to content

Instantly share code, notes, and snippets.

@ashaw
Created April 12, 2011 16:28
Show Gist options
  • Save ashaw/915846 to your computer and use it in GitHub Desktop.
Save ashaw/915846 to your computer and use it in GitHub Desktop.
irb(main):034:0> Shape.first.the_geom.boundary.first.points[0]
=> #<RGeo::Geos::PointImpl:0x81750c70 "POINT (-87.7805499999999910 32.4882309999999990)">
irb(main):035:0> Shape.first.the_geom.boundary.first.points[0].x
=> -87.78055
irb(main):036:0> Shape.first.the_geom.boundary.first.points[0].y
=> 32.488231
select name, ST_AsGeoJSON(the_geom) from shapes as json limit 1;
where st_contains(hoods.the_goem, the_geom) or ST_overlaps(hoods.the_goem, the_geom) and hoods.id in [36047, 36048]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment