本文整理汇总了C++中ilwis::IRasterCoverage::pix2value方法的典型用法代码示例。如果您正苦于以下问题:C++ IRasterCoverage::pix2value方法的具体用法?C++ IRasterCoverage::pix2value怎么用?C++ IRasterCoverage::pix2value使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ilwis::IRasterCoverage
的用法示例。
在下文中一共展示了IRasterCoverage::pix2value方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: addition
void Rastercalc::addition() {
Ilwis::IRasterCoverage map1;
DOTEST(map1.prepare(makeInputPath("U_1001A.NTF")),"loading erdas imagine file");
Ilwis::IRasterCoverage cov = map1 + 100.0;
DOCOMPARE(cov->pix2value(Ilwis::Pixel(0,0)),225.0,"Checking pix(269,339) for expression raster <operator> number");
DOCOMPARE(cov->pix2value(Ilwis::Pixel(269,339)),139.0,"Checking pix(269,339) for expression raster <operator> number");
DOCOMPARE(cov->pix2value(Ilwis::Pixel(29,996)),127.0,"Checking pix(29,996) for expression raster <operator> number");
}
示例2: substract
void Rastercalc::substract(){
Ilwis::IRasterCoverage map1;
DOTEST(map1.prepare(makeInputPath("U_1001A.NTF")),"loading erdas imagine file");
Ilwis::IRasterCoverage cov = 100.0 - map1;
DOCOMPARE(cov->pix2value(Ilwis::Pixel(0,0)),-25.0,"Checking pix(269,339) for expression number <operator> raster");
map1.prepare("small.mpl");
Ilwis::IRasterCoverage cov4 = map1 + 100;
map1.prepare("n000302_sub_kenya.mpr");
Ilwis::IRasterCoverage map2("kenya_2009ndvi_cor_22.mpr");
Ilwis::IRasterCoverage cov2 = map1 + map2 / 3;
DOCOMPARE(cov2->pix2value(Ilwis::Pixel(50,50)),148.18,"Checking pix(50,50) for compound expression");
Ilwis::IRasterCoverage cov3 = sqrt(cov2);
DOCOMPARE(cov3->pix2value(Ilwis::Pixel(50,50)),12.173,"Checking pix(50,50) for sqrt");
}