本文整理汇总了C++中OGRPoint::clone方法的典型用法代码示例。如果您正苦于以下问题:C++ OGRPoint::clone方法的具体用法?C++ OGRPoint::clone怎么用?C++ OGRPoint::clone使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OGRPoint
的用法示例。
在下文中一共展示了OGRPoint::clone方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: while
//.........这里部分代码省略.........
return NULL;
}
OGRGeometry *geom = poParent->papoBuiltGeometries[nRefNr];
if (geom->getGeometryType() == wkbLineString) {
OGRLineString *poCurve = (OGRLineString*)geom;
if (nRefStatus == LC_MED_DIG) { /* clockwise */
poInner->addSubLineString(poCurve);
} else if (nRefStatus == LC_MOT_DIG) { /* counter-clockwise */
poInner->addSubLineString(poCurve,poCurve->getNumPoints()-1,0);
} else {
CPLError( CE_Failure, CPLE_OpenFailed, "Internal error: GRF_*_OY encountered.");
return NULL;
}
} else {
CPLError( CE_Warning, CPLE_AppDefined, "Element %li composed of non-linestrings (REF %li of type %i). Ignored.", oNextSerial.lNr, nRefNr, geom->getGeometryType());
}
}
nRefCount = LC_GetRefFlate(&oGrfStat, GRF_INDRE, &nRefNr, &nRefStatus, 1);
}
poGeom = poLy;
}
break;
}
case L_KURVE: /* curve */
case L_LINJE: /* curve, not simplifyable */
case L_BUEP: { /* curve, interpolated from circular arc */
oGType = wkbLineString;
OGRLineString *poCurve = (OGRLineString*)(poParent->papoBuiltGeometries[oNextSerial.lNr]);
if (poCurve == NULL) {
CPLError( CE_Fatal, CPLE_AppDefined, "Curve %li was not initialized.", oNextSerial.lNr);
return NULL;
}
poGeom = poCurve->clone();
break;
}
case L_TEKST: { /* text */
oGType = wkbMultiPoint;
OGRMultiPoint *poMP = (OGRMultiPoint*)(poParent->papoBuiltGeometries[oNextSerial.lNr]);
if (poMP == NULL) {
CPLError( CE_Fatal, CPLE_AppDefined, "Tekst %li was not initialized.", oNextSerial.lNr);
return NULL;
}
poGeom = poMP->clone();
break;
}
case L_SYMBOL: {
//CPLError( CE_Warning, CPLE_OpenFailed, "Geometry of type SYMBOL treated as point (PUNKT).");
}
case L_PUNKT: { /* point */
oGType = wkbPoint;
OGRPoint *poPoint = (OGRPoint*)(poParent->papoBuiltGeometries[oNextSerial.lNr]);
if (poPoint == NULL) {
CPLError( CE_Fatal, CPLE_AppDefined, "Point %li was not initialized.", oNextSerial.lNr);
return NULL;
}
poGeom = poPoint->clone();
break;
}
case L_DEF: /* skip user definitions and headers here */
case L_HODE: {
break;
}
default: { /* complain a bit about anything else that is not implemented */
CPLError( CE_Failure, CPLE_OpenFailed, "Unrecognized geometry of type %i.", nName);