New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support GEOS Installation from Library #291
base: main
Are you sure you want to change the base?
Conversation
…int error on buffer_with_style test
…or. Removed self-intersecting is_simple? test on CAPIPolygons because this will be version dependent.
Replace a manual validity check on MultiPolygon, which was iterating on each polygon combination, by a direct call of GEOSisValid.
This make for less C code on our part, and allowed to fix a MacOS related bug.
Get rid of `lenient_assertions` in favor of another way of handling validity: never fail fast, fail when impossible to do otherwise. Co-authored-by: Keith Doggett <keith.doggett887@gmail.com> Co-authored-by: Quentin Wentzler <quentin.wentzler@klaxit.com> Co-authored-by: Ulysse Buonomo <buonomo.ulysse@gmail.com>
@keithdoggett that's nice thanks, indeed the fallback may be really missleading if someone is expecting the build from a specific library. Also, and more importantly, I'm not sure where we want to go with this. E.g. in which circumstances someone would want to load geos from somewhere else? And in that case, why not loading geos from somewhere in the path of this library (#272). Hence I think this is a nice step towards getting in that place, since we'll only have to specify GEOS's local path then, but I just want to be sure about the reason why you started from that end :) |
@BuonOmo yeah the main reason was to make that packaging easier eventually. I guess I figured that this was the hard part since I hadn't seen a C extension built in this way before, but there are some other use cases.
|
I definitely agree with you
I've seen some, for instance the ruby-sass! |
Summary
Allows GEOS to be linked with a library (.so, .a, .dll, etc.) by specifying the
RGEO_GEOS_LIB_DIR
environment variable.Other Information
This works, but there are still a couple issues that need to be discussed/resolved
find_library
works iflibgeos_c
is not found in theRGEO_GEOS_LIB_DIR
directory and it is installed on the system (/usr/local/lib
for example), it will silently fall back on the system installed version instead of raising an error.geos-config
flow if there is an error during the from library flow.