From: Phrogz Date: 2010-09-02T12:40:10+09:00 Subject: Re: Determine if point is within bounding box On Sep 1, 2:14 pm, Daniel Berger wrote: > Using georuby, how would you determine if a given point is within a > given bounding box? I've never used GeoRuby, but looking at the implementation of bounding_box for various classes, how about: # untested class GeoRuby::SimpleFeatures::Geometry def point_in_bounds?( point ) min, max = bounding_box point.x >= min.x && point.x <= max.x && point.y >= min.y && point.y <= max.y && min.z && point.z >= min.z && point.z <= max.z end end