int OGRFeatureDefn::IsSame( OGRFeatureDefn * poOtherFeatureDefn ) { if (strcmp(GetName(), poOtherFeatureDefn->GetName()) == 0 && GetFieldCount() == poOtherFeatureDefn->GetFieldCount() && GetGeomFieldCount() == poOtherFeatureDefn->GetGeomFieldCount()) { int i; for(i=0;i<nFieldCount;i++) { const OGRFieldDefn* poFldDefn = GetFieldDefn(i); const OGRFieldDefn* poOtherFldDefn = poOtherFeatureDefn->GetFieldDefn(i); if (!poFldDefn->IsSame(poOtherFldDefn)) { return FALSE; } } for(i=0;i<nGeomFieldCount;i++) { OGRGeomFieldDefn* poGFldDefn = GetGeomFieldDefn(i); OGRGeomFieldDefn* poOtherGFldDefn = poOtherFeatureDefn->GetGeomFieldDefn(i); if (!poGFldDefn->IsSame(poOtherGFldDefn)) { return FALSE; } } return TRUE; } return FALSE; }