|
TNTmips Downloads Menu

|
RGB_to_GeoTIFF_Export.sml
# RGB_to_GeoTIFF_Export.sml
#
# This is a simple example showing how to set up a HASH of RVC_OBJITEMS for use in the
# function "DlgGetObjectSet()" and the method "MieHANDLE::ExportObjects()". When run,
# the script will prompt the user to select the 3 R-G-B bands, and then export them to a single
# GeoTIFF file also selected by the user.
#
# Date Written: 12 December 2006
# Written By: Dave Breitwisch
#
# Requires TNTmips2006:72
#
clear();
class RVC_OBJITEM objitemlist[];
class RVC_DESCRIPTOR descriptor;
descriptor.SetName("Red");
objitemlist[1].SetDescriptor(descriptor);
descriptor.SetName("Green");
objitemlist[2].SetDescriptor(descriptor);
descriptor.SetName("Blue");
objitemlist[3].SetDescriptor(descriptor);
class STRINGLIST labels;
labels.AddToEnd("Red");
labels.AddToEnd("Green");
labels.AddToEnd("Blue");
DlgGetObjectSet("Select Input RGB bands", "Raster", labels, objitemlist, "ExistingOnly,AllowAutoName");
class FILEPATH tgtpath = GetOutputFileName("c:/test.tif", "Select Output GeoTIFF file", "tif");
class MieGeoTIFF geotiff;
geotiff.ExportObjects(objitemlist, tgtpath);
©MicroImages, Inc. 2013 Published in the United States of America
11th Floor - Sharp Tower, 206 South 13th Street, Lincoln NE 68508-2010 USA
Business & Sales: (402)477-9554 Support: (402)477-9562 Fax: (402)477-9559
Business info@microimages.com
Support support@microimages.com
Web webmaster@microimages.com
| |