Skip to content

Proposal for a third rasterization strategy #259

@bet-bit

Description

@bet-bit

Hello,

Reading the documentation about Rasterization strategy I see there are two current possible strategies:

  • default : pixel is included if its centroid is within the geometry)
  • all_touched : pixel is included if it intersects the geometry in any way
    I was wondering if implementing a third possibility, coming naturally afther those two, would be useful:
  • only_within (or somehing like that) : pixel is included only if it is contained by the geometry.

The use case I had in mind was, when working with satellite data combined with vector layer of polygons, being able to assure that all the pixels you include are totally within the polygon, in order to discard noisy pixels with information coming from other regions outside the geometry.

I guess a workaround is to make a buffer of \sqrt(2*pixel_size) and use the default stategy, but this extra processing might take longer than having it already implemented.

Hope that idea can be useful. Or maybe not that much? in that case I'll be eager to know why !

Thanks for the work you put on that,

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions