You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am introducing this gem to a Rails project for the first time, so I'm on the latest version of the gem. I did some digging myself and I don't think this method was ever written for the class. In the code snippet, the class is RGeo::Cartesian::PolygonImpl and the make_valid method just throws an error and nothing else
@phil-the-dev do you have geos installed? You can check if it's properly linked by running RGeo::Geos.supported?.
RGeo uses different backends depending on system configuration and what factory you specify. Cartesian factories will try to use geos as a backend if possible, but will fallback to the ruby implementation if it's not available. The geos backend has more methods implemented and is much more performant than the ruby implementation (https://github.com/rgeo/rgeo/blob/main/doc/Factory-Compatibility.md). That table doesn't include make_valid, but I know that we haven't implemented make_valid for ruby backends.
We have plans to bundle geos with the gem and automatically install it to avoid issues like this, but for now unless you're doing a simple project we recommend installing geos yourself and using the geos backend.
I am introducing this gem to a Rails project for the first time, so I'm on the latest version of the gem. I did some digging myself and I don't think this method was ever written for the class. In the code snippet, the class is
RGeo::Cartesian::PolygonImpl
and themake_valid
method just throws an error and nothing elseSteps to reproduce
I used the first code snippet from the Geometry-Validity.md
Expected behavior
The code can run without error
Actual behavior
bowtie_polygon.make_valid
throws an error:System configuration
Ruby version: 3.1.4
OS: macOS 13.3.1
The text was updated successfully, but these errors were encountered: