Click or drag to resize
XDL

XRSSaveFile Class

XRSSaveFile클래스는 상용 영상이나 표준 영상 포맷으로 저장한다. 영상 저장은 XRasterIO클래스를 이용하여 수행된다.
Inheritance Hierarchy
SystemObject
  Pixoneer.NXDL.NRSXRSSaveFile

Namespace: Pixoneer.NXDL.NRS
Assembly: NXDLrs (in NXDLrs.dll) Version: 2.0.3.38
Syntax
C#
public class XRSSaveFile : IDisposable

The XRSSaveFile type exposes the following members.

Constructors
 NameDescription
Public methodXRSSaveFile XRSSaveFile클래스의 기본 생성자로서, 멤버변수에 대하여 초기화를 수행한다.
Top
Properties
 NameDescription
Public propertyFileName 저장될 파일의 이름를 얻는다.
Public propertyFilePath 저장될 파일의 경로를 얻는다.
Public propertyCode exampleMetaData 저장될 파일에 대한 메타데이터를 설정한다.
Public propertyNumBand 저장될 파일의 Band의 수를 얻는다.
Public propertyOrbit SAR 영상일 경우 저장될 파일에 대한 Orbit 정보를 설정한다.
Public propertySarParameters SAR 영상일 경우 저장될 파일에 대한 Sar Parameter를 설정한다.
Public propertySR 저장될 파일에 대한 적용 좌표 시스템를 얻거나 설정한다.
Public propertyXPixelSize X축 방향에 대한 1픽셀에 대한 공간 크기를 얻는다.
Public propertyYPixelSize Y축 방향에 대한 1픽셀에 대한 공간 크기를 얻는다.
Top
Methods
 NameDescription
Public methodAddBand Band를 추가한다.
Public methodAddGCPSet GCP Set을 추가한다.
Public methodGetBandAt(Int32) 입력 인덱스에 해당하는 Band를 얻는다.
Public methodGetBandAt(Int32, XDMBand) 입력 인덱스에 해당하는 Band를 얻는다.
Public methodGetBoundRect 설정된 Bounary값을 얻는다.
Top
Example
영상을 로딩하여 XRSSaveFile 객체를 생성해서 새로운 파일로 저장한다.
C#
using Pixoneer.NXDL;
using Pixoneer.NXDL.NRS;
using Pixoneer.NXDL.NIO;

XRasterIO RasterIO = new XRasterIO();
String strError = "";
if (RasterIO.Initialize(out strError) == false)
{
    return;
}

String strFilePathLoad = "D:\\Sample\\IKONOS.xdm";
XRSLoadFile xrsFileInput = RasterIO.LoadFile(strFilePathLoad, out strError, false, eIOCreateXLDMode.All_NoMsg);

// Create XRSSaveFile
XRSSaveFile fileSave = new XRSSaveFile();
for (int i = 0; i < xrsFileInput.NumBand; i++)
{
    XDMBand band = (XDMBand)xrsFileInput.GetBandAt(i);
    fileSave.AddBand(ref band);
}

XThread thd = null;
String strFilePathSave = "D:\\Sample\\Out_Save.xdm";
if (!RasterIO.Export(ref fileSave, strFilePathSave, "XDM", out strError, thd))
{
    return;
}
See Also