Welcome to the Earthdata User Forum! Here, subject matter experts from several NASA Distributed Active Archive Centers (DAAC) can discuss general questions, research needs and data applications. Users can query how to access, view and interpret the data.
by simkins » Thu Nov 30, 2017 12:01 pm America/New_York
I'm trying to output VIIRS L2 data via GeoTIFF with grayscale color scheme. I've identified 2 options thus far;1) Use GPT's WriteImage operator to output a grayscaled Geotiff (writeimage.xml)- Even if I specify output to be GeoTIFF, the output will remain as a PNG2) Add CPD definitions to GPT's Write operator inside my mosaic xml and output a grayscaled GeoTIFF (write.mosaic.xml)- GPTs Write Operator does not recognize CPDAre there tweaks that I can make to achieve this goal using either of these methods or a new method?Thanks!attachment 1attachment 2
by gnwiii » Thu Nov 30, 2017 2:09 pm America/New_York
Do you want to use the GeoTIFF with grayscale just for viewing or to import into some GIS for quantitative use? GeoTIFF's can be 8-bit indexed colour/grayscale (useless for most quantitative purposes), scaled ints of various bit sizes, or 32-bit floats. 3rd party support for GeoTIFF's with floats is uneven.
by simkins » Thu Nov 30, 2017 2:14 pm America/New_York
I suppose it doesn't need to be a GeoTIFF, it can be a normal TIF file, but it does need to be grayscale. This is for viewing only, not for quantitative analysis. Do you have any examples on how to add the grayscale in?
GPT does not yet support the addition of the palette and its criteria in the workflow of the nodes, with the exception of the WriteImage operator which can do this, but it is limited to only writing an image (and you are correct, currently only in png format). In SeaDAS 7.5 (coming soon) the WriteImage operator will support GeoTIFF.
However ... using the SeaDAS OCSSW processor l2bin followed by l3mapgen will accomplish what you want and create the TIFF file with a palette of your choosing. Have you tried this route?
by simkins » Mon Dec 04, 2017 11:45 am America/New_York
Thanks for your response. I haven't tried that route yet and am a little inexperienced with l2bin and l3mapgen. I am currently stuck with l2bin and can't get it to run. Here is my workflow;
1) Generate L0 VIIRS files from raw data 2) Split into 16 channels for all variables offered 3) Run l2gen 4) Reproject and mosaic data 5) l2bin 6) l3mapgen and output a TIFF file
l2bin returns this error; L2BIN 4.1.0 (Jun 16 2016 12:31:25) Programming error: file /data3/swdev/V2016.2/build/src/l2bin/l2bin_input.c, line 133
Here is my l2bin syntax; l2bin parfile=anc.par infile=mosaic.reproject.nc ofile=binned.nc
I've tried it with and without the parfile but haven't had any success. Any ideas as to what is going on? Is the problem that I'm trying to run l2bin with a file that has been reprojected and mosaiced?
Yes, you cannot send the mosaic file into l2bin (and it is not needed). The OCSSW processing file flow and file formats are completely separate from the Mosaic file flow. Send the level-2 files (outputted by l2gen) directly into l2bin (if more than one level2 file, which is likely your case, make a text file which lists these files and this will be your infile for l2bin.)
by gnwiii » Mon Dec 04, 2017 6:05 pm America/New_York
TIFF is an open ended standard. Band names are not supported in basic TIFF or GeoTIFF files, so nd_2", many applications supply "band_1" for the first band in the file, baetc. ESA BEAM GeoTIFFifp)Product Files (t usee some application specific "tags" to provide additional metadata. Unfortunately, some applications refuse to process files with unknown tags.