Using GPT's WriteImage Operator to output GeoTIFF

Please enter here to ask a question about any NASA Science related topics!
simkins
Posts: 21
Joined: Wed Oct 18, 2017 10:25 pm America/New_York

Using GPT's WriteImage Operator to output GeoTIFF

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

Tags:

gnwiii
Posts: 606
Joined: Fri Jan 29, 2021 5:51 pm America/New_York
Answers: 1

Using GPT's WriteImage Operator to output GeoTIFF

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.

simkins
Posts: 21
Joined: Wed Oct 18, 2017 10:25 pm America/New_York

Using GPT's WriteImage Operator to output GeoTIFF

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?

Thanks!

OB SeaDAS - knowles
Subject Matter Expert
Subject Matter Expert
Posts: 221
Joined: Mon Apr 07, 2008 4:40 pm America/New_York

Using GPT's WriteImage Operator to output GeoTIFF

by OB SeaDAS - knowles » Fri Dec 01, 2017 12:23 pm America/New_York

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? 

Danny

simkins
Posts: 21
Joined: Wed Oct 18, 2017 10:25 pm America/New_York

Using GPT's WriteImage Operator to output GeoTIFF

by simkins » Mon Dec 04, 2017 11:45 am America/New_York

Hi Danny,

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?

Thanks!

OB SeaDAS - knowles
Subject Matter Expert
Subject Matter Expert
Posts: 221
Joined: Mon Apr 07, 2008 4:40 pm America/New_York

Using GPT's WriteImage Operator to output GeoTIFF

by OB SeaDAS - knowles » Mon Dec 04, 2017 12:02 pm America/New_York

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.) 

Danny

simkins
Posts: 21
Joined: Wed Oct 18, 2017 10:25 pm America/New_York

Using GPT's WriteImage Operator to output GeoTIFF

by simkins » Mon Dec 04, 2017 1:08 pm America/New_York

Good to know, thanks! Will I be able to reproject/mosaic the l2bin file or the l3mapgen file afterwards? I have some specific instructions regarding pixel sizing, lat/lon, etc.

OB SeaDAS - knowles
Subject Matter Expert
Subject Matter Expert
Posts: 221
Joined: Mon Apr 07, 2008 4:40 pm America/New_York

Using GPT's WriteImage Operator to output GeoTIFF

by OB SeaDAS - knowles » Mon Dec 04, 2017 1:30 pm America/New_York

Yes, once you have created the level3 file (output of l3mapgen) you can use mosaic or the other SeaDAS tools on that file. 

Danny

simkins
Posts: 21
Joined: Wed Oct 18, 2017 10:25 pm America/New_York

Using GPT's WriteImage Operator to output GeoTIFF

by simkins » Mon Dec 04, 2017 3:53 pm America/New_York

Is there a reason that only "band_1" of SST is published with the l3mapgen TIFF? Here is my workflow;

l2bin infile=SV_L2_file ofile=binned l3bprod="sst"

l3mapgen ifile=binned ofile=sst.tif \
product="sst" oformat=TIFF apply_pal=no \
  resolution=375

gnwiii
Posts: 606
Joined: Fri Jan 29, 2021 5:51 pm America/New_York
Answers: 1

Using GPT's WriteImage Operator to output GeoTIFF

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.

Post Reply