earthlab / firedpy

A Python Command Line Interface for classifying fire events from the Collection 6 MODIS Burned Area Product.
MIT License
36 stars 20 forks source link

buildpoints is called twice #79

Closed EllieLindrooth closed 2 years ago

EllieLindrooth commented 2 years ago

buildPoints is called in both buildFireAttributes and buildPolygons. It may make more sense to call it in main and pass the gdf that it returns as an argument to these other functions instead of having to run it twice.

EllieLindrooth commented 2 years ago

I realized this does need to be called twice, but I think this is why the points are off by half a pixel. By calling it a second time, it moves the already centered pixel coords another half a pixel

admahood commented 2 years ago

One idea is to just add an argument to the build points function, i.e. shift=True, where you can just turn off the half pixel adjustment the second time the function is called