本文整理汇总了C++中CoordinateSystem::setDescription方法的典型用法代码示例。如果您正苦于以下问题:C++ CoordinateSystem::setDescription方法的具体用法?C++ CoordinateSystem::setDescription怎么用?C++ CoordinateSystem::setDescription使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类CoordinateSystem
的用法示例。
在下文中一共展示了CoordinateSystem::setDescription方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: if
IlwisObject *InternalIlwisObjectFactory::createCsyFromCode(const Resource& resource, const IOOptions &options) const {
QString code = resource.code();
bool isUnknown = code == "unknown" || code == "csy:unknown";
QString projParms = code;
if ( code.left(6) == "proj4:"){
projParms = code.mid(6);
}else if(!isUnknown && code.left(5) == "epsg:"){
QString query = QString("select * from projectedcsy where code='%1'").arg(code);
InternalDatabaseConnection db;
if ( db.exec(query)) {
if (db.next()) {
QSqlRecord rec = db.record();
projParms = rec.value("proj_params").toString();
} else {
kernel()->issues()->log(TR(ERR_COULDNT_CREATE_OBJECT_FOR_2).arg("coordinatesystem", resource.name()));
return 0;
}
}
}
CoordinateSystem *csy = 0;
if ( isUnknown){
csy = createFromResource<BoundsOnlyCoordinateSystem>(resource, options);
csy->name("unknown");
csy->code("unknown");
csy->setDescription(TR("Unknown coordinate system"));
}else {
csy = createFromResource<ConventionalCoordinateSystem>(resource, options);
csy->setDescription(resource.name());
csy->prepare("proj4=" + projParms);
}
return csy;
}