本文整理汇总了C++中IRasterCoverage::assign方法的典型用法代码示例。如果您正苦于以下问题:C++ IRasterCoverage::assign方法的具体用法?C++ IRasterCoverage::assign怎么用?C++ IRasterCoverage::assign使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IRasterCoverage
的用法示例。
在下文中一共展示了IRasterCoverage::assign方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: resample
bool OperationHelperRaster::resample(IRasterCoverage& raster1, IRasterCoverage& raster2, ExecutionContext *ctx) {
if ( !raster1.isValid())
return false;
IGeoReference commonGeoref = raster1->georeference();
if ( ctx->_masterGeoref != sUNDEF) {
if(!commonGeoref.prepare(ctx->_masterGeoref))
return false;
}
if (raster1->georeference()!= commonGeoref ){
Resource res;
res.prepare();
QString expr = QString("%3=resample(%1,%2,bicubic)").arg(raster1->source().url().toString()).arg(commonGeoref->source().url().toString()).arg(res.name());
ExecutionContext ctxLocal;
SymbolTable symtabLocal;
if(!commandhandler()->execute(expr,&ctxLocal,symtabLocal))
return false;
QVariant var = symtabLocal.getValue(res.name());
raster1 = var.value<IRasterCoverage>();
}
if ( raster2.isValid() && raster2->georeference()!= commonGeoref ){
Resource res;
res.prepare();
QString expr = QString("%3=resample(%1,%2,bicubic)").arg(raster2->source().url().toString()).arg(commonGeoref->source().url().toString()).arg(res.name());
ExecutionContext ctxLocal;
SymbolTable symtabLocal;
if(!commandhandler()->execute(expr,&ctxLocal,symtabLocal))
return false;
QVariant var = symtabLocal.getValue(res.name());
IRasterCoverage outRaster = var.value<IRasterCoverage>();
raster2.assign(outRaster);
}
return true;
}