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

make_transition no longer accepts multipolygons #252

Open
jackVanish opened this issue Dec 13, 2024 · 1 comment
Open

make_transition no longer accepts multipolygons #252

jackVanish opened this issue Dec 13, 2024 · 1 comment
Assignees

Comments

@jackVanish
Copy link
Contributor

Some code in Remora that I've been working on relies on Glatos' make_transition function. Previously it used make_transition2, but now that that's been deprecated, I've had to pivot to using the one make_transition function. However, make_transition no longer accepts the multipolygon object I had been passing to make_transition2. I don't know if this is intentional functionality or an oversight, so I'm opening a ticket against it. Attached are a couple of screenshots of the output from make_transition and the object I'm passing to it.

image
image

On Mike O'Brien's suggestion I tried running st_as_sf on the multipolygon object (this didn't occur naturally because I generate that object by running st_as_sf on a different spatial object. That does produce an object that make_transition accepts, but I've yet to fully test that output, and having to change less of my code would be preferable if make_transition can be made to accept multipolygons like make_transition2 did.

Screen Shot 2024-12-13 at 10 26 21 AM
@chrisholbrook
Copy link
Collaborator

Unfortunately, as of glatos 0.8.0, I'm not confident make_transition supports sfc_MULTIPOLYGON. If your fix described above seems to work, do check the result carefully, as I imagine it may work with certain multipolygon constructs but not others. It will take some time to sort this out. If the current version is not acceptable, you may need to roll back to earlier version or find another way. The current version was intended to be a temporary bridge to a more reliable method... @haydento has pushed a PR (work in progress), but I have not yet been able to process it.

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

2 participants