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
module YCombinator | |
def y_comb(&generator) | |
proc { |x| | |
proc { |*args| | |
generator.call(x.call(x)).call(*args) | |
} | |
}.call(proc { |x| | |
proc { |*args| | |
generator.call(x.call(x)).call(*args) | |
} |
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
# | |
# Return UTM Zone for a geom | |
# | |
# Return Integer | |
def utm_zone | |
geomgeog = srid == 4326 ? self[get_column_name] : transform(4326) | |
puts geomgeog.class | |
geom = case geomgeog | |
when Point then geomgeog | |
when LineString then geomgeog.first |