本文整理汇总了C++中ilwis::IRasterCoverage类的典型用法代码示例。如果您正苦于以下问题:C++ IRasterCoverage类的具体用法?C++ IRasterCoverage怎么用?C++ IRasterCoverage使用的例子?那么, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了IRasterCoverage类的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: canUse
bool ApplyUndefinedValueDefinition::canUse(const IIlwisObject &obj, const QString &name) const
{
if (!obj.isValid())
return false;
if ( obj->ilwisType() == itRASTER) {
Ilwis::IRasterCoverage raster = obj.as<RasterCoverage>();
return hasType(raster->datadef().domain()->ilwisType(), itNUMERICDOMAIN);
}
return false;
}
示例2: 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");
}
示例3: 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");
}
示例4: sin
Ilwis::IRasterCoverage sin(const Ilwis::IRasterCoverage &raster1)
{
QString name = ANONYMOUS_PREFIX;
QString stmt = QString("script %1=sin(%2)").arg(name).arg(raster1->name());
return doRasterOperation(stmt);
}
示例5: sqrt
Ilwis::IRasterCoverage sqrt(const Ilwis::IRasterCoverage &raster1)
{
QString name = Identity::newAnonymousName();;
QString stmt = QString("script %1=sqrt(%2)").arg(name).arg(raster1->name());
return doRasterOperation(stmt);
}