本文整理汇总了C++中OGRGeometryCollection::assignSpatialReference方法的典型用法代码示例。如果您正苦于以下问题:C++ OGRGeometryCollection::assignSpatialReference方法的具体用法?C++ OGRGeometryCollection::assignSpatialReference怎么用?C++ OGRGeometryCollection::assignSpatialReference使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类OGRGeometryCollection
的用法示例。
在下文中一共展示了OGRGeometryCollection::assignSpatialReference方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: getCurveGeometry
OGRGeometry* OGRGeometryCollection::getCurveGeometry(
const char* const* papszOptions) const
{
OGRGeometryCollection* poGC =
OGRGeometryFactory::createGeometry(
OGR_GT_GetCurve(getGeometryType()))->toGeometryCollection();
if( poGC == nullptr )
return nullptr;
poGC->assignSpatialReference( getSpatialReference() );
bool bHasCurveGeometry = false;
for( int iGeom = 0; iGeom < nGeomCount; iGeom++ )
{
OGRGeometry* poSubGeom =
papoGeoms[iGeom]->getCurveGeometry(papszOptions);
if( poSubGeom->hasCurveGeometry() )
bHasCurveGeometry = true;
poGC->addGeometryDirectly( poSubGeom );
}
if( !bHasCurveGeometry )
{
delete poGC;
return clone();
}
return poGC;
}
示例2: getSpatialReference
OGRGeometry *OGRGeometryCollection::clone() const
{
OGRGeometryCollection *poNewGC;
poNewGC = new OGRGeometryCollection;
poNewGC->assignSpatialReference( getSpatialReference() );
for( int i = 0; i < nGeomCount; i++ )
{
poNewGC->addGeometry( papoGeoms[i] );
}
return poNewGC;
}
示例3: getLinearGeometry
OGRGeometry* OGRGeometryCollection::getLinearGeometry(double dfMaxAngleStepSizeDegrees,
const char* const* papszOptions) const
{
OGRGeometryCollection* poGC = (OGRGeometryCollection*)
OGRGeometryFactory::createGeometry(OGR_GT_GetLinear(getGeometryType()));
if( poGC == NULL )
return NULL;
poGC->assignSpatialReference( getSpatialReference() );
for( int iGeom = 0; iGeom < nGeomCount; iGeom++ )
{
OGRGeometry* poSubGeom = papoGeoms[iGeom]->getLinearGeometry(dfMaxAngleStepSizeDegrees,
papszOptions);
poGC->addGeometryDirectly( poSubGeom );
}
return poGC;
}
示例4: toGeometryCollection
OGRGeometry *OGRGeometryCollection::clone() const
{
OGRGeometryCollection *poNewGC =
OGRGeometryFactory::createGeometry(getGeometryType())->
toGeometryCollection();
poNewGC->assignSpatialReference( getSpatialReference() );
poNewGC->flags = flags;
for( auto&& poSubGeom: *this )
{
if( poNewGC->addGeometry( poSubGeom ) != OGRERR_NONE )
{
delete poNewGC;
return nullptr;
}
}
return poNewGC;
}
示例5: getSpatialReference
OGRGeometry *OGRGeometryCollection::clone() const
{
OGRGeometryCollection *poNewGC;
poNewGC = (OGRGeometryCollection*)
OGRGeometryFactory::createGeometry(getGeometryType());
if( poNewGC == NULL )
return NULL;
poNewGC->assignSpatialReference( getSpatialReference() );
poNewGC->flags = flags;
for( int i = 0; i < nGeomCount; i++ )
{
if( poNewGC->addGeometry( papoGeoms[i] ) != OGRERR_NONE )
{
delete poNewGC;
return NULL;
}
}
return poNewGC;
}