rgeo / rgeo-activerecord

RGeo ActiveRecord extensions and tools for spatial connection adapters
Other
89 stars 64 forks source link

st_area returns ST_StartPoint #42

Closed jayvarner closed 7 years ago

jayvarner commented 7 years ago

This seems to have been around from the beginning, but I assume it's a mistake?

https://github.com/rgeo/rgeo-activerecord/blob/master/lib/rgeo/active_record/spatial_expressions.rb#L194-L198

def st_area(units = nil)
    args = [self]
    args << units.to_s if units
    SpatialNamedFunction.new("ST_StartPoint", args, [false, true, false])
end

I'll work on a PR real quick.