本文整理汇总了C++中OGRGeometryCollection::getGeometryType方法的典型用法代码示例。如果您正苦于以下问题:C++ OGRGeometryCollection::getGeometryType方法的具体用法?C++ OGRGeometryCollection::getGeometryType怎么用?C++ OGRGeometryCollection::getGeometryType使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OGRGeometryCollection
的用法示例。
在下文中一共展示了OGRGeometryCollection::getGeometryType方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OGRCreateFromGeomedia
//.........这里部分代码省略.........
memcpy(&dfZ, pabyGeom + 16, 8);
CPL_LSBPTR64(&dfZ);
poRing->setPoint(i, dfX, dfY, dfZ);
pabyGeom += 24;
}
OGRPolygon* poPoly = new OGRPolygon();
poPoly->addRingDirectly(poRing);
*ppoGeom = poPoly;
return OGRERR_NONE;
}
else if ( nGeomType == GEOMEDIA_BOUNDARY )
{
if (nBytes < 4)
return OGRERR_FAILURE;
int nExteriorSize;
memcpy(&nExteriorSize, pabyGeom, 4);
CPL_LSBPTR32(&nExteriorSize);
pabyGeom += 4;
nBytes -= 4;
if (nBytes < nExteriorSize)
return OGRERR_FAILURE;
OGRGeometry* poExteriorGeom = NULL;
if (OGRCreateFromGeomedia( pabyGeom, &poExteriorGeom, nExteriorSize ) != OGRERR_NONE)
return OGRERR_FAILURE;
if ( wkbFlatten( poExteriorGeom->getGeometryType() ) != wkbPolygon )
{
delete poExteriorGeom;
return OGRERR_FAILURE;
}
pabyGeom += nExteriorSize;
nBytes -= nExteriorSize;
if (nBytes < 4)
{
delete poExteriorGeom;
return OGRERR_FAILURE;
}
int nInteriorSize;
memcpy(&nInteriorSize, pabyGeom, 4);
CPL_LSBPTR32(&nInteriorSize);
pabyGeom += 4;
nBytes -= 4;
if (nBytes < nInteriorSize)
{
delete poExteriorGeom;
return OGRERR_FAILURE;
}
OGRGeometry* poInteriorGeom = NULL;
if (OGRCreateFromGeomedia( pabyGeom, &poInteriorGeom, nInteriorSize ) != OGRERR_NONE)
{
delete poExteriorGeom;
return OGRERR_FAILURE;