Sha256: 1783b79ff3286d8bf0ce489f457a9d27516defd7411e43886731fb650894e52e
Contents?: true
Size: 400 Bytes
Versions: 20
Compression:
Stored size: 400 Bytes
Contents
def clip_to_region(p1, p2, lat_column_name, lon_column_name) min_lat = [p1[0], p2[0]].min max_lat = [p1[0], p2[0]].max min_lon = [p1[1], p2[1]].min max_lon = [p1[1], p2[1]].max %Q|'(row[#{c0(lat_column_name)}]>=#{min_lat} && |+ %Q|row[#{c0(lat_column_name)}]<=#{max_lat}) && |+ %Q|(row[#{c0(lon_column_name)}]>=#{min_lon} && |+ %Q|row[#{c0(lon_column_name)}]<=#{max_lon})'| end
Version data entries
20 entries across 20 versions & 1 rubygems