Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Masking error for complex multipolygon cutlines with holes

See original GitHub issue

Issue Description

rio-tiler version: rio-tiler==2.0.0rc4


from import COGReader
import matplotlib.pyplot as plt

feature = ... # huge multipolygon I'll attach separately

with COGReader('') as cog:
    data, mask = cog.feature(feature['geometry'])



Tried the .buffer(0) trick as well with no change to the result. Geometry returns True for is_valid

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:9 (8 by maintainers)

github_iconTop GitHub Comments

Fernigithubcommented, Apr 14, 2022

Of course, my pleasure 👍 Fernando

vincentsaragocommented, Apr 14, 2022

Screen Shot 2022-04-14 at 7 12 00 PM

Confirming that latest version fix the original bug 🙏

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error when clipping raster by mask layer (polygon) in QGIS
Running Clip raster by mask layer , I get the following error: ... You have a very complex polygon layer, containing holes, slivers...
Read more >
HOW TO FIX CLIPPING MASK ISSUE - Adobe Illustrator Tutorial
Have you ever ran into that annoying error or problem that doesn't let you mask an image or shape into a complex mask...
Read more >
Technical error with qGIS clipping raster by vector mask layer?
I have been clipping a raster by a vector mask layer, and obtaining the following error: ... ERROR 1: Cutline polygon is invalid....
Read more >
Issue with mask and Polygon containing hole · Issue #93 · rspatial ...
When masking a grid with a non-disaggregated multipart polygon feature, where one of the polygons has a hole, the hole is not masked...
Read more >
Getting Started — gdstk 0.9.35 documentation
GDSII files contain a hierarchical representation of any polygonal geometry. They are mainly used in the microelectronics industry for the design of mask...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Post

No results found

github_iconTop Related Hashnode Post

No results found