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

Zero-length linestrings on edge of raster grid #50

Open
thomas-fred opened this issue Dec 20, 2022 · 0 comments
Open

Zero-length linestrings on edge of raster grid #50

thomas-fred opened this issue Dec 20, 2022 · 0 comments

Comments

@thomas-fred
Copy link

thomas-fred commented Dec 20, 2022

Splitting sometimes returns zero-length linestrings on edge of raster

See below for example linestring on eastern (lon=70W) extent of box

(Pdb) geometry.coords.xy
(array('d', [-70.0, -70.0]), array('d', [18.445832920952196, 18.445832920952196]))

This split geometry has: j = raster_width
However j should be in range: 0 <= j < raster_width
As a hacky workaround, drop any splits with length 0

For more context to the above, see workflow/scripts/intersection.py in open-gira

Do we need a nudge off a cell boundary somewhere when performing the splits in snail?

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

1 participant