rgeo / rgeo-activerecord

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

Add Cartesian::* classes to GeometryMixin #52

Closed andreasknoepfle closed 5 years ago

andreasknoepfle commented 5 years ago

Hello 👋

while updating gems in one of our client projects I noticed that with the current version of RGeo (2.0.1) is that all of the RGeo::Cartesian features produce a stack level too deep error when serializing them to JSON (the project currently works with RGeo 0.4 😱 and I'd love to update). Since RGeo is heavily used in this project I had a quick look and it seems that unlike other feature classes those do not get the GeometryMixin. With that mixin it seems that the classes can be serialized again.

irb(main):007:0> RGeo::Cartesian.simple_factory.point(1,2).as_json
SystemStackError (stack level too deep)

I added the Cartesian.* classes in the list below. I'd be happy to change my contribution accoring to you r feedback (in case it makes sense) although I am not super familiar with the RGeo project, so bear with me 😄 .

Cheers, Andi

andreasknoepfle commented 5 years ago

I also have no luck in getting the CI run green, since it seems that there is something flaky with RVM and JRuby.

teeparham commented 5 years ago

Thanks! I re-ran the failed builds on CI & they worked.

teeparham commented 5 years ago

This fix is released in 6.2.1.