Example #1
0
OGRNASRelationLayer::OGRNASRelationLayer( OGRNASDataSource *poDSIn )

{
    poDS = poDSIn;

    iNextFeature = 0;
    bPopulated = FALSE;

/* -------------------------------------------------------------------- */
/*      Establish the layer fields.                                     */
/* -------------------------------------------------------------------- */
    poFeatureDefn = new OGRFeatureDefn( "ALKIS_beziehungen" );
    poFeatureDefn->Reference();
    poFeatureDefn->SetGeomType( wkbNone );

    OGRFieldDefn  oFD( "", OFTString );

    oFD.SetName( "beziehung_von" );
    poFeatureDefn->AddFieldDefn( &oFD );

    oFD.SetName( "beziehungsart" );
    poFeatureDefn->AddFieldDefn( &oFD );

    oFD.SetName( "beziehung_zu" );
    poFeatureDefn->AddFieldDefn( &oFD );
}
OGRNASRelationLayer::OGRNASRelationLayer( OGRNASDataSource *poDSIn ) :
    poFeatureDefn(new OGRFeatureDefn( "ALKIS_beziehungen" )),
    poDS(poDSIn),
    bPopulated(false),
    iNextFeature(0)
{
/* -------------------------------------------------------------------- */
/*      Establish the layer fields.                                     */
/* -------------------------------------------------------------------- */
    SetDescription( poFeatureDefn->GetName() );
    poFeatureDefn->Reference();
    poFeatureDefn->SetGeomType( wkbNone );

    OGRFieldDefn oFD( "", OFTString );

    oFD.SetName( "beziehung_von" );
    poFeatureDefn->AddFieldDefn( &oFD );

    oFD.SetName( "beziehungsart" );
    poFeatureDefn->AddFieldDefn( &oFD );

    oFD.SetName( "beziehung_zu" );
    poFeatureDefn->AddFieldDefn( &oFD );
}