• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C++ GetNextRawFeature函数代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C++中GetNextRawFeature函数的典型用法代码示例。如果您正苦于以下问题:C++ GetNextRawFeature函数的具体用法?C++ GetNextRawFeature怎么用?C++ GetNextRawFeature使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。



在下文中一共展示了GetNextRawFeature函数的18个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。

示例1: while

OGRFeature *OGRIdrisiLayer::GetNextFeature()
{
    OGRFeature  *poFeature;

    while(TRUE)
    {
        if (bEOF)
            return NULL;

        poFeature = GetNextRawFeature();
        if (poFeature == NULL)
        {
            bEOF = TRUE;
            return NULL;
        }

        if((m_poFilterGeom == NULL
            || FilterGeometry( poFeature->GetGeometryRef() ) )
        && (m_poAttrQuery == NULL
            || m_poAttrQuery->Evaluate( poFeature )) )
        {
            return poFeature;
        }
        else
            delete poFeature;
    }
}
开发者ID:rashadkm,项目名称:lib_gdal,代码行数:27,代码来源:ogridrisilayer.cpp


示例2: while

OGRFeature *OGRHTFLayer::GetNextFeature()
{
    OGRFeature  *poFeature;

    if (fpHTF == NULL || bEOF)
        return NULL;

    while(!bEOF)
    {
        poFeature = GetNextRawFeature();
        if (poFeature == NULL)
            return NULL;

        if((m_poFilterGeom == NULL
            || FilterGeometry( poFeature->GetGeometryRef() ) )
        && (m_poAttrQuery == NULL
            || m_poAttrQuery->Evaluate( poFeature )) )
        {
            return poFeature;
        }
        else
            delete poFeature;
    }

    return NULL;
}
开发者ID:AsherBond,项目名称:MondocosmOS,代码行数:26,代码来源:ogrhtflayer.cpp


示例3: GetLayerDefn

OGRFeature *OGRGFTLayer::GetNextFeature()
{
    GetLayerDefn();

    while( true )
    {
        if (nNextInSeq < nOffset ||
            nNextInSeq >= nOffset + static_cast<int>(aosRows.size()))
        {
            if (bEOF)
                return nullptr;

            nOffset += static_cast<int>(aosRows.size());
            if (!FetchNextRows())
                return nullptr;
        }

        OGRFeature *poFeature = GetNextRawFeature();
        if (poFeature == nullptr)
            return nullptr;

        if((m_poFilterGeom == nullptr
            || FilterGeometry( poFeature->GetGeometryRef() ) )
        && (m_poAttrQuery == nullptr
            || m_poAttrQuery->Evaluate( poFeature )) )
        {
            return poFeature;
        }
        else
            delete poFeature;
    }
}
开发者ID:koordinates,项目名称:gdal,代码行数:32,代码来源:ogrgftlayer.cpp


示例4: ResetReading

OGRFeature *OGROGDILayer::GetNextFeature()

{
    OGRFeature  *poFeature;

    /* Reset reading if we are not the current layer */
    /* WARNING : this does not allow interleaved reading of layers */
    if( m_poODS->GetCurrentLayer() != this )
    {
        m_poODS->SetCurrentLayer(this);
        ResetReading();
    }

    while( true )
    {
        poFeature = GetNextRawFeature();
        if( poFeature == NULL )
            return NULL;

    /* -------------------------------------------------------------------- */
    /*      Do we need to apply an attribute test?                          */
    /* -------------------------------------------------------------------- */
        if( (m_poAttrQuery != NULL
            && !m_poAttrQuery->Evaluate( poFeature ) )
            || (m_poFilterGeom != NULL
                && !FilterGeometry( poFeature->GetGeometryRef() ) ) )
        {
            m_nFilteredOutShapes ++;
            delete poFeature;
        }
        else
            return poFeature;
    }
}
开发者ID:Wedjaa,项目名称:node-gdal,代码行数:34,代码来源:ogrogdilayer.cpp


示例5: ClearStatement

OGRFeature *OGRWalkTableLayer::GetFeature( long nFeatureId )

{
    if( pszFIDColumn == NULL )
        return OGRWalkLayer::GetFeature( nFeatureId );

    ClearStatement();

    iNextShapeId = nFeatureId;

    poStmt = new CPLODBCStatement( poDS->GetSession() );
    poStmt->Append( "SELECT * FROM " );
    poStmt->Append( poFeatureDefn->GetName() );
    poStmt->Append( "Features" );
    poStmt->Appendf( " WHERE %s = %ld", pszFIDColumn, nFeatureId );

    if( !poStmt->ExecuteSQL() )
    {
        delete poStmt;
        poStmt = NULL;
        return NULL;
    }

    return GetNextRawFeature();
}
开发者ID:samalone,项目名称:gdal-ios,代码行数:25,代码来源:ogrwalktablelayer.cpp


示例6: GetNextRawFeature

OGRFeature *OGRPGResultLayer::GetNextFeature()

{
    OGRPGGeomFieldDefn* poGeomFieldDefn = NULL;
    if( poFeatureDefn->GetGeomFieldCount() != 0 )
        poGeomFieldDefn = poFeatureDefn->myGetGeomFieldDefn(m_iGeomFieldFilter);

    for( ; TRUE; )
    {
        OGRFeature      *poFeature;

        poFeature = GetNextRawFeature();
        if( poFeature == NULL )
            return NULL;

        if( (m_poFilterGeom == NULL
            || poGeomFieldDefn == NULL
            || poGeomFieldDefn->ePostgisType == GEOM_TYPE_GEOMETRY
            || poGeomFieldDefn->ePostgisType == GEOM_TYPE_GEOGRAPHY
            || FilterGeometry( poFeature->GetGeomFieldRef(m_iGeomFieldFilter) ) )
            && (m_poAttrQuery == NULL
                || m_poAttrQuery->Evaluate( poFeature )) )
            return poFeature;

        delete poFeature;
    }
}
开发者ID:0004c,项目名称:node-gdal,代码行数:27,代码来源:ogrpgresultlayer.cpp


示例7: GetLayerDefn

OGRFeature *OGRGFTLayer::GetNextFeature()
{
    OGRFeature  *poFeature;

    GetLayerDefn();

    while(TRUE)
    {
        if (nNextInSeq < nOffset ||
            nNextInSeq >= nOffset + (int)aosRows.size())
        {
            if (bEOF)
                return NULL;

            nOffset += aosRows.size();
            if (!FetchNextRows())
                return NULL;
        }

        poFeature = GetNextRawFeature();
        if (poFeature == NULL)
            return NULL;

        if((m_poFilterGeom == NULL
            || FilterGeometry( poFeature->GetGeometryRef() ) )
        && (m_poAttrQuery == NULL
            || m_poAttrQuery->Evaluate( poFeature )) )
        {
            return poFeature;
        }
        else
            delete poFeature;
    }
}
开发者ID:samalone,项目名称:gdal-ios,代码行数:34,代码来源:ogrgftlayer.cpp


示例8: while

OGRFeature *OGRGMELayer::GetNextFeature()
{
    OGRFeature *poFeature = NULL;
    
    while( TRUE )
    {
        poFeature = GetNextRawFeature();
        if( poFeature == NULL )
            break;

        // incremeted in GetNextRawFeature()
        // m_nFeaturesRead++;

        if( (m_poFilterGeom == NULL
             || poFeature->GetGeometryRef() == NULL 
             || FilterGeometry( poFeature->GetGeometryRef() ) )
            && (m_poAttrQuery == NULL
                || m_poAttrQuery->Evaluate( poFeature )) )
            break;

        delete poFeature;
    }

    return poFeature;
}
开发者ID:samalone,项目名称:gdal-ios,代码行数:25,代码来源:ogrgmelayer.cpp


示例9: ClearQuery

OGRFeature *OGRIDBTableLayer::GetFeature( GIntBig nFeatureId )

{
    if( pszFIDColumn == NULL )
        return OGRIDBLayer::GetFeature( nFeatureId );

    ClearQuery();

    iNextShapeId = nFeatureId;

    poCurr = new ITCursor( *poDS->GetConnection() );

    // Create list of fields
    CPLString osFields;

    if ( poFeatureDefn->GetFieldIndex( pszFIDColumn ) == -1 )
        osFields += pszFIDColumn;

    if ( pszGeomColumn )
    {
        if ( ! osFields.empty() )
            osFields += ",";

        osFields += "st_asbinary(";
        osFields += pszGeomColumn;
        osFields += ") as ";
        osFields += pszGeomColumn;
    }

    for( int i = 0; i < poFeatureDefn->GetFieldCount(); i++ )
    {
        if ( ! osFields.empty() )
            osFields += ",";

        osFields += poFeatureDefn->GetFieldDefn(i)->GetNameRef();
    }

    CPLString sql;

    sql.Printf( "SELECT %s FROM %s WHERE %s = %d",
                osFields.c_str(), poFeatureDefn->GetName(),
                pszFIDColumn, nFeatureId );

    CPLDebug( "OGR_IDB", "ExecuteSQL(%s)", sql.c_str() );
    if( !poCurr->Prepare( sql.c_str() ) ||
        !poCurr->Open(ITCursor::ReadOnly) )
    {
        delete poCurr;
        poCurr = NULL;
        return NULL;
    }

    return GetNextRawFeature();
}
开发者ID:Wedjaa,项目名称:node-gdal,代码行数:54,代码来源:ogridbtablelayer.cpp


示例10: GetNextRawFeature

OGRFeature *OGRPLScenesLayer::GetNextFeature()
{
    if( !bFilterMustBeClientSideEvaluated )
        return GetNextRawFeature();

    while( true )
    {
        OGRFeature *poFeature = NULL;
        poFeature = GetNextRawFeature();
        if (poFeature == NULL)
            return NULL;

        if((m_poFilterGeom == NULL
            || FilterGeometry( poFeature->GetGeometryRef() ) )
        && (m_poAttrQuery == NULL
            || m_poAttrQuery->Evaluate( poFeature )) )
        {
            return poFeature;
        }
        else
            delete poFeature;
    }
}
开发者ID:ryandavid,项目名称:rotobox,代码行数:23,代码来源:ogrplsceneslayer.cpp


示例11: SetSpatialFilter

OGRFeature *OGROGDILayer::GetFeature( GIntBig nFeatureId )

{
    ecs_Result  *psResult;

    if (m_nTotalShapeCount != -1 && nFeatureId > m_nTotalShapeCount)
        return NULL;

    /* Unset spatial filter */
    OGRGeometry* poOldFilterGeom = ( m_poFilterGeom != NULL ) ? m_poFilterGeom->clone() : NULL;
    if( poOldFilterGeom != NULL )
        SetSpatialFilter(NULL);

    /* Reset reading if we are not the current layer */
    /* WARNING : this does not allow interleaved reading of layers */
    if( m_poODS->GetCurrentLayer() != this )
    {
        m_poODS->SetCurrentLayer(this);
        ResetReading();
    }
    else if ( nFeatureId < m_iNextShapeId )
        ResetReading();

    while(m_iNextShapeId != nFeatureId)
    {
        psResult = cln_GetNextObject(m_nClientID);
        if (ECSSUCCESS(psResult))
            m_iNextShapeId++;
        else
        {
            // We probably reached EOF... keep track of shape count.
            m_nTotalShapeCount = m_iNextShapeId;
            if( poOldFilterGeom != NULL )
            {
                SetSpatialFilter(poOldFilterGeom);
                delete poOldFilterGeom;
            }
            return NULL;
        }
    }

    // OK, we're ready to read the requested feature...
    OGRFeature* poFeature = GetNextRawFeature();
    if( poOldFilterGeom != NULL )
    {
        SetSpatialFilter(poOldFilterGeom);
        delete poOldFilterGeom;
    }
    return poFeature;
}
开发者ID:Wedjaa,项目名称:node-gdal,代码行数:50,代码来源:ogrogdilayer.cpp


示例12: while

OGRFeature *OGRWalkLayer::GetNextFeature()

{
    while( true )
    {
        OGRFeature *poFeature = GetNextRawFeature();
        if( poFeature == nullptr )
            return nullptr;

        if( (m_poFilterGeom == nullptr
            || FilterGeometry( poFeature->GetGeometryRef() ) )
            && (m_poAttrQuery == nullptr
                || m_poAttrQuery->Evaluate( poFeature )) )
            return poFeature;

        delete poFeature;
    }
}
开发者ID:koordinates,项目名称:gdal,代码行数:18,代码来源:ogrwalklayer.cpp


示例13: while

OGRFeature *OGRIngresLayer::GetNextFeature()

{
    while( true )
    {
        OGRFeature *poFeature = GetNextRawFeature();
        if( poFeature == NULL )
            return NULL;

        if( (m_poFilterGeom == NULL
            || FilterGeometry( poFeature->GetGeometryRef() ) )
            && (m_poAttrQuery == NULL
                || m_poAttrQuery->Evaluate( poFeature )) )
            return poFeature;

        delete poFeature;
    }
}
开发者ID:Mavrx-inc,项目名称:gdal,代码行数:18,代码来源:ogringreslayer.cpp


示例14: GetNextRawFeature

OGRFeature *OGRMDBLayer::GetNextFeature()

{
    for( ; TRUE; )
    {
        OGRFeature      *poFeature;

        poFeature = GetNextRawFeature();
        if( poFeature == NULL )
            return NULL;

        if( (m_poFilterGeom == NULL
            || FilterGeometry( poFeature->GetGeometryRef() ) )
            && (m_poAttrQuery == NULL
                || m_poAttrQuery->Evaluate( poFeature )) )
            return poFeature;

        delete poFeature;
    }
}
开发者ID:0004c,项目名称:node-gdal,代码行数:20,代码来源:ogrmdblayer.cpp


示例15: GetLayerDefn

OGRFeature *OGRXLSLayer::GetNextFeature()
{
    GetLayerDefn();

    while( true )
    {
        OGRFeature *poFeature = GetNextRawFeature();
        if (poFeature == nullptr)
            return nullptr;

        if(/*(m_poFilterGeom == NULL
            || FilterGeometry( poFeature->GetGeometryRef() ) )
        && */ (m_poAttrQuery == nullptr
            || m_poAttrQuery->Evaluate( poFeature )) )
        {
            return poFeature;
        }
        else
            delete poFeature;
    }
}
开发者ID:OSGeo,项目名称:gdal,代码行数:21,代码来源:ogrxlslayer.cpp


示例16: while

OGRFeature *OGROpenAirLayer::GetNextFeature()
{
    OGRFeature  *poFeature;

    while(TRUE)
    {
        poFeature = GetNextRawFeature();
        if (poFeature == NULL)
            return NULL;

        if((m_poFilterGeom == NULL
            || FilterGeometry( poFeature->GetGeometryRef() ) )
        && (m_poAttrQuery == NULL
            || m_poAttrQuery->Evaluate( poFeature )) )
        {
            return poFeature;
        }
        else
            delete poFeature;
    }
}
开发者ID:drownedout,项目名称:datamap,代码行数:21,代码来源:ogropenairlayer.cpp


示例17: while

OGRFeature *OGRAeronavFAALayer::GetNextFeature()
{
    while( true )
    {
        if( bEOF )
            return nullptr;

        OGRFeature  *poFeature = GetNextRawFeature();
        if (poFeature == nullptr)
            return nullptr;

        if((m_poFilterGeom == nullptr
            || FilterGeometry( poFeature->GetGeometryRef() ) )
        && (m_poAttrQuery == nullptr
            || m_poAttrQuery->Evaluate( poFeature )) )
        {
            return poFeature;
        }
        else
            delete poFeature;
    }
}
开发者ID:koordinates,项目名称:gdal,代码行数:22,代码来源:ograeronavfaalayer.cpp


示例18: ClearStatement

OGRFeature *OGRMSSQLSpatialTableLayer::GetFeature( long nFeatureId )

{
    if( pszFIDColumn == NULL )
        return OGRMSSQLSpatialLayer::GetFeature( nFeatureId );

    ClearStatement();

    iNextShapeId = nFeatureId;

    poStmt = new CPLODBCStatement( poDS->GetSession() );
    CPLString osFields = BuildFields();
    poStmt->Appendf( "select %s from %s where %s = %ld", osFields.c_str(), 
        poFeatureDefn->GetName(), pszFIDColumn, nFeatureId );

    if( !poStmt->ExecuteSQL() )
    {
        delete poStmt;
        poStmt = NULL;
        return NULL;
    }

    return GetNextRawFeature();
}
开发者ID:sylvainallard,项目名称:gdal,代码行数:24,代码来源:ogrmssqlspatialtablelayer.cpp



注:本文中的GetNextRawFeature函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C++ GetNextSelectedItem函数代码示例发布时间:2022-05-30
下一篇:
C++ GetNextNode函数代码示例发布时间:2022-05-30
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap