Fiona: 1.8.13.post1 causes mask filter to act like a bounding box filter

Expected behavior and actual behavior.

I have a script that summarizes features in dataset A that intersect with features in dataset B. This code relies on .items(mask=geometry_B) to select the features of dataset A that exist within each feature of dataset B.

This code works fine in Fiona 1.8.13. But in 1.8.13.post1, it seems to filter by bounding box, rather than the actual feature geometry.

Steps to reproduce the problem.

This is a simplified version of the code in question. I am unable to share the data, but I could come up with other data to reproduce the problem, if it becomes necessary.

with fiona.open('dataset_b.gpkg') as dataset_b:
    for feature in dataset_b:
        with fiona.open('dataset_a.gpkg') as dataset_a:
            items = dataset_a.items(mask=feature["geometry"])

Operating system

macOS 10.15.3

Fiona and GDAL version and provenance

Fiona: 1.8.13.post1 GDAL: 2.4.2 (built from source)

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 16 (12 by maintainers)

Most upvoted comments

Thank you @sgillies and @rbuffat for all your work figuring this out!