Click or drag to resize
XDL

XsmGenerateRPCModel Method (XSensorModel, Int32, Int32, Double, Double)

센서모델객체(XSensorModel객체)를 입력 받아 RPC를 XRpc객체를 통해 생성한다.

Namespace:  Pixoneer.NXDL.NSM
Assembly:  NXDLsm (in NXDLsm.dll) Version: 1.2.817.72
Syntax
C#
public static XRpc GenerateRPCModel(
	XSensorModel sm,
	int NumPixelX,
	int NumPixelY,
	double minHgt,
	double maxHgt
)

Parameters

sm
Type: Pixoneer.NXDL.NSMXSensorModel
[In] 입력 센서 모델.
NumPixelX
Type: SystemInt32
[In] X축 방향 이미지 화소의 수
NumPixelY
Type: SystemInt32
[In] Y축 방향 이미지 화소의 수
minHgt
Type: SystemDouble
[In] 최소 RPC 모델의 고도
maxHgt
Type: SystemDouble
[In] 최대 RPC 모델의 고도

Return Value

Type: XRpc
return RPC Model객체(XPpc 객체)
Examples
This is example #1:
XGeoPoint geo = new XGeoPoint();
XVertex3d ecr = new XVertex3d();
geo.lond = 127;
geo.latd = 36;
geo.hgt = 1200;

Xfn.GeoToEcr(geo, ref ecr);
// To generate rpc, SensorPos must 
XFrameSensorParams smParam = new XFrameSensorParams();
smParam.FocalLength = 0.12;
smParam.SensorPos.x = ecr.x;
smParam.SensorPos.y = ecr.y;
smParam.SensorPos.z = ecr.z;
smParam.SensorYaw = XAngle.FromDegree(-0.09862);
smParam.SensorPitch = XAngle.FromDegree(0.08007);
smParam.SensorRoll = XAngle.FromDegree(-0.30901);
smParam.PSX = 0.0000012;
smParam.PSY = 0.0000012;
smParam.Width = 7680;
smParam.Height = 13824;
smParam.XPO = 0.0;
smParam.YPO = 0.0;
smParam.TopStartY = false;
smParam.SensorSR = null;

XFrameSensor smFrame = new XFrameSensor();
XVertex2d ptImg = new XVertex2d(0, 0);
XVertex3d ptMap1= new XVertex3d();
XVertex3d ptMap2 = new XVertex3d();
double hGeo = 100;

smFrame.SetParamsEarth(smParam);
if (!smFrame.ImageToWorldE(ptImg, hGeo, out ptMap1)) return;

XRpc rpc = Xsm.GenerateRPCModel((XSensorModel)smFrame, 7680, 13824, 0, 2000);

if (!rpc.ImageToWorldE(ptImg, hGeo, out ptMap2)) return;
XGeoPoint geo1 = new XGeoPoint();
XGeoPoint geo2 = new XGeoPoint();

Xfn.EcrToGeo(ptMap1, ref geo1);
Xfn.EcrToGeo(ptMap2, ref geo2);
See Also