Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
ST_MakeValid and other functions on libspatialite/GDAL on MacOS with Homebrew
$ brew install liblwgeom
$ export LDFLAGS="-L/usr/local/opt/liblwgeom/lib"
$ export CPPFLAGS="-I/usr/local/opt/liblwgeom/include"
$ brew edit libspatialite
(add --enable-lwgeom to configure)
$ brew reinstall -s libspatialite
$ brew install -s gdal
@openfirmware

This comment has been minimized.

Copy link
Owner Author

@openfirmware openfirmware commented Mar 29, 2019

Hmm, I am having issues with PostGIS now. Maybe the FLAGS need to refer to postgis instead of liblwgeom.

@ryanmark

This comment has been minimized.

Copy link

@ryanmark ryanmark commented Aug 23, 2019

The export variables didn't work for me. Had to add the following to the libspatialite brew recipe:

    lwgeom = Formula["liblwgeom"]
    ENV.append "LDFLAGS", "-L#{lwgeom.opt_lib}"
    ENV.append "CFLAGS", "-I#{lwgeom.opt_include}"
@robsalasco

This comment has been minimized.

Copy link

@robsalasco robsalasco commented Feb 5, 2020

thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment