We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mosaic of the count of images covering this area
does gdal have a count method?
The text was updated successfully, but these errors were encountered:
No. We would need to use gdal_calc. Seems like a "gdal fn reduce" implmentation is needed for both this & #17
Sorry, something went wrong.
A reduce implementation for count would look something like:
reduce( lambda a,b: b+int(a > 0), list_of_images)
for #17 it might be like:
reduce( max, list_of_images)
Done using vrt methods described on #17
<VRTRasterBand dataType="Byte" band="1" subClass="VRTDerivedRasterBand"> <PixelFunctionType>count</PixelFunctionType> <PixelFunctionLanguage>Python</PixelFunctionLanguage> <PixelFunctionCode><![CDATA[ import numpy as np def count(in_ar, out_ar, xoff, yoff, xsize, ysize, raster_xsize, raster_ysize, buf_radius, gt, **kwargs): np.clip(np.count_nonzero(in_ar, axis = 0),0,15, out = out_ar) ]]> </PixelFunctionCode>
edit: changed clip 255 to 15
Tested w/ clip 255 on my pc:
[tylar@tylar-pc circe_output]$ time gdaladdo -ro swtx_2019-12-05_coverage.vrt 10 0...10...20...30...40...50...60...70...80...90...100 - done. real 226m20.006s user 203m30.257s sys 21m17.668s
7yl4r
No branches or pull requests
mosaic of the count of images covering this area
does gdal have a count method?
The text was updated successfully, but these errors were encountered: