Exemplo n.º 1
0
SDTSPointReader *SDTSTransfer::GetLayerPointReader( int iEntry )

{
    SDTSPointReader     *poPointReader;
    
    if( iEntry < 0
        || iEntry >= nLayers
        || oCATD.GetEntryType( panLayerCATDEntry[iEntry] ) != SLTPoint )
    {
        return NULL;
    }

    
    poPointReader = new SDTSPointReader( &oIREF );
    
    if( !poPointReader->Open(
                        oCATD.GetEntryFilePath( panLayerCATDEntry[iEntry] ) ) )
    {
        delete poPointReader;
        return NULL;
    }
    else
    {
        return poPointReader;
    }
}
Exemplo n.º 2
0
SDTSPointReader *SDTSTransfer::GetLayerPointReader( int iEntry )

{
    if( iEntry < 0
        || iEntry >= nLayers
        || oCATD.GetEntryType( panLayerCATDEntry[iEntry] ) != SLTPoint )
    {
        return nullptr;
    }

    SDTSPointReader *poPointReader = new SDTSPointReader( &oIREF );

    if( !poPointReader->Open(
                        oCATD.GetEntryFilePath( panLayerCATDEntry[iEntry] ) ) )
    {
        panLayerCATDEntry[iEntry] = SLTUnknown; // to prevent further attempt
        delete poPointReader;
        return nullptr;
    }

    return poPointReader;
}