Giter Club home page Giter Club logo

Comments (7)

jeffreyhanson avatar jeffreyhanson commented on May 30, 2024

Hi, yeah sometimes st_union can output overlapping polygons depending on the precision of the
geoprocessing calculations. Maybe something like this would work (assuming you called your rbind'd WDPA dataset w)? If it doesn't, try increasing the prec object.

library(sf)
library(lwgeom)
prec <- 1e+8
x <- st_make_valid(st_precision(st_union(st_precision(st_combine(x), prec)), prec))

from wdpar.

jeffreyhanson avatar jeffreyhanson commented on May 30, 2024

Just to follow up, did my suggestion work? Or are you still experiencing issues with dissolving the WDPA? If possible, I'd recommend using ESRI ArcMap to process the global WDPA since it's more robust to geometry issues and runs a lot faster.

from wdpar.

JonasGeschke avatar JonasGeschke commented on May 30, 2024

Hi, thanks for your follow-up. I am still on it ...

from wdpar.

jeffreyhanson avatar jeffreyhanson commented on May 30, 2024

OK - let me know how it goes. You might need to try various precision levels. I would also recommend dissolving each country together separately and then assembling the global dataset. However, this is still going to be a very difficult (if impossible) task given the limits of FOSS GIS software.

from wdpar.

JonasGeschke avatar JonasGeschke commented on May 30, 2024

Actually #19 is my bottleneck at the moment. It keeps coming up. Would be great if you can have a look at this.

from wdpar.

JonasGeschke avatar JonasGeschke commented on May 30, 2024

I am working on a HPC cluster now, so processing capacity is no bottleneck anymore. It seems to be working with simply using wdpaunion <- st_union(st_make_valid(wdpaclean)). Will let you know if succeeding when the whole dataset is done – and then also close the issue if successful.

from wdpar.

jeffreyhanson avatar jeffreyhanson commented on May 30, 2024

I've just added a wdpa_dissolve() to the latest GitHub version which should implement this functionality (see https://prioritizr.github.io/wdpar/reference/wdpa_dissolve.html). Please feel free to reopen this issue if you run into any issues with it.

from wdpar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.