natcap / pygeoprocessing

Geoprocessing operations for Python

Home Page:https://pygeoprocessing.readthedocs.io/en/latest/

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Refactor pixel snapping into a single solution?

phargogh opened this issue · comments

We have 3 functions that snap pixel coordinates to a raster's grid in similar but slightly different ways:

  • warp_raster and create_raster_from_bounding_box both take the same approach
  • align_bbox (used by zonal_statistics, added in #333 )

The approaches are similar but slightly different. Now that we have 3 use cases, it might be worth looking at whether it makes sense to refactor in a way that covers these 3 cases and reduces duplication.