Skip to content
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

How to enable st_make_valid in sf on Windows (get sf to link to liblwgeom) #487

Closed
Zedseayou opened this issue Sep 21, 2017 · 4 comments
Closed

Comments

@Zedseayou
Copy link
Contributor

Zedseayou commented Sep 21, 2017

Hi all,

Apologies in advance for some probably fairly naive questions. I am working on Windows and trying to get started using st_make_valid. The info here and on this page indicate that st_make_valid needs sf to be installed from source, with liblwgeom present, for a link to happen when I call library(sf).

I have not been able to figure out what is meant by having liblwgeom "present". I installed PostgreSQL 9.6.5 and PostGIS 2.3.3 from the instructions on this link. I had thought that after doing this liblwgeom would be present, but sf still did not detect it.

This info here from March seems to suggest that a dev version of liblwgeom is needed, but not what that entails? Alternatively, what is meant by sf "detecting" liblwgeom? Do I need to point it somewhere in particular? This previous issue was the only thing I could find on getting sf installed with liblwgeom on Windows, but it did not seem to be the same issue. Is there some other major misunderstanding that I have given a lack of experience with PostGIS in the first place?

Any help would be greatly appreciated, including if this question should be directed elsewhere.

Thanks in advance.

EDIT 2 Oct: Saw some more queries here and here on this. Attempting to get st_buffer trick to work in the meantime!

@edzer
Copy link
Member

edzer commented Sep 25, 2017

Compiling R packages on windows from source is not trivial if there are external dependencies, and it looks like nobody has so far sorted this out and shared it in such a way that you can carry it out like a recipe. liblwgeom is, like gdal, a "library of libraries", and hence may need some special care, compared to stand-alone libraries like proj or geos.

@tim-salabim
Copy link
Member

I haven't had any luck so far. But for most cases the trick w st_buffer(x, 0) seems to work just fine.

@edzer
Copy link
Member

edzer commented Nov 5, 2017

Closing here, as we've split off lwgeom to its own R package.

@edzer edzer closed this as completed Nov 5, 2017
@edzer
Copy link
Member

edzer commented Nov 8, 2017

https://twitter.com/edzerpebesma/status/928367268605591555 see appveyor button in README of the lwgeom pkg.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants