nasa-gibs / onearth

High-performance web services for tiled raster imagery and vector tiles
Apache License 2.0
176 stars 47 forks source link

RasterCount check for JPEGs #187

Open zmoon opened 3 hours ago

zmoon commented 3 hours ago

https://github.com/nasa-gibs/onearth/blob/628ccc072c1dfe89f288bdf0aa084a590588d196/src/mrfgen/mrfgen.py#L1894-L1897

For my example I'm working, which @jtroberts helped with, I had to disable this check so my input files weren't skipped. But mrfgen seemed to work fine. My files for now are one-band grayscale instead of three-band RGB.

Some thoughts:

jtroberts commented 3 hours ago

I don't think we've tried one-band JPEG inputs for mrfgen. One-band grayscale PNG or TIFF inputs are okay, but not JPEG. I don't recall if there was a technical reason that it can't be supported or that we simply never came across it before. We can try removing the highlighted lines and do some testing.

Colormap is only needed when mrf_compression_type is set to "PPNG" (8-bit Palette PNGs). If you set mrf_compression_type to JPEG or PNG then it should produce a one-band grayscale MRF. What are you setting mrf_compression_type to?