Found bug where pixels weren't being added. Changed min to max, doy.
Finished first draft! Need to create rpc method