Example #1
0
TigerCompleteChain::TigerCompleteChain( OGRTigerDataSource * poDSIn,
                                        CPL_UNUSED const char * pszPrototypeModule )
{
    poDS = poDSIn;
    poFeatureDefn = new OGRFeatureDefn( "CompleteChain" );
    poFeatureDefn->Reference();
    poFeatureDefn->SetGeomType( wkbLineString );


    if (poDS->GetVersion() >= TIGER_2002) {
      psRT1Info = &rt1_2002_info;
      bUsingRT3 = FALSE;
    } else {
      psRT1Info = &rt1_info;
      bUsingRT3 = TRUE;
    }

    psRT2Info = &rt2_info;

    nRT1RecOffset = 0;

    if (poDS->GetVersion() >= TIGER_2000_Redistricting) {
      psRT3Info = &rt3_2000_Redistricting_info;
    } else {
      psRT3Info = &rt3_info;
    }

    fpRT3 = NULL;

    panShapeRecordId = NULL;
    fpShape = NULL;
    
    /* -------------------------------------------------------------------- */
    /*      Fields from type 1 record.                                      */
    /* -------------------------------------------------------------------- */

    AddFieldDefns( psRT1Info, poFeatureDefn );

    /* -------------------------------------------------------------------- */
    /*      Fields from type 3 record.  Eventually we should verify that    */
    /*      a .RT3 file is available before adding these fields.            */
    /* -------------------------------------------------------------------- */
    if( bUsingRT3 ) {
      AddFieldDefns( psRT3Info, poFeatureDefn );
    }
}
Example #2
0
TigerPolygon::TigerPolygon( OGRTigerDataSource * poDSIn,
                                  const char * pszPrototypeModule )

{
    poDS = poDSIn;
    poFeatureDefn = new OGRFeatureDefn( "Polygon" );
    poFeatureDefn->Reference();
    poFeatureDefn->SetGeomType( wkbNone );

    fpRTS = NULL;
    bUsingRTS = TRUE;

    if( poDS->GetVersion() >= TIGER_2004 ) {
        psRTAInfo = &rtA_2004_info;
    } else if( poDS->GetVersion() >= TIGER_2003 ) {
        psRTAInfo = &rtA_2003_info;
    } else if( poDS->GetVersion() >= TIGER_2002 ) {
        psRTAInfo = &rtA_2002_info;
    } else {
        psRTAInfo = &rtA_info;
    }

    if( poDS->GetVersion() >= TIGER_2002 ) {
      psRTSInfo = &rtS_2002_info;
    } else if( poDS->GetVersion() >= TIGER_2000_Redistricting ) {
      psRTSInfo = &rtS_2000_Redistricting_info;
    } else {
      psRTSInfo = &rtS_info;
    }

    /* -------------------------------------------------------------------- */
    /*      Fields from type A record.                                      */
    /* -------------------------------------------------------------------- */

    AddFieldDefns(psRTAInfo, poFeatureDefn);

    /* -------------------------------------------------------------------- */
    /*      Add the RTS records if it is available.                         */
    /* -------------------------------------------------------------------- */

    if( bUsingRTS ) {
      AddFieldDefns(psRTSInfo, poFeatureDefn);
    }
}
Example #3
0
TigerOverUnder::TigerOverUnder( OGRTigerDataSource * poDSIn,
                                CPL_UNUSED const char * pszPrototypeModule ) :
    TigerPoint(TRUE, &rtU_info, FILE_CODE)
{
    poDS = poDSIn;
    poFeatureDefn = new OGRFeatureDefn( "OverUnder" );
    poFeatureDefn->Reference();
    poFeatureDefn->SetGeomType( wkbNone );

    AddFieldDefns( psRTInfo, poFeatureDefn );

}
Example #4
0
TigerPolygonEconomic::TigerPolygonEconomic( OGRTigerDataSource * poDSIn,
                                            CPL_UNUSED const char * pszPrototypeModule ) : TigerFileBase(&rtE_info, FILE_CODE)
{
    poDS = poDSIn;
    poFeatureDefn = new OGRFeatureDefn( "PolygonEconomic" );
    poFeatureDefn->Reference();
    poFeatureDefn->SetGeomType( wkbNone );

    /* -------------------------------------------------------------------- */
    /*      Fields from type E record.                                      */
    /* -------------------------------------------------------------------- */

    AddFieldDefns( psRTInfo, poFeatureDefn );
}
Example #5
0
TigerIDHistory::TigerIDHistory( OGRTigerDataSource * poDSIn,
                            const char * pszPrototypeModule ) : TigerFileBase(&rtH_info, FILE_CODE)

{
    poDS = poDSIn;
    poFeatureDefn = new OGRFeatureDefn( "IDHistory" );
    poFeatureDefn->Reference();
    poFeatureDefn->SetGeomType( wkbNone );

    /* -------------------------------------------------------------------- */
    /*      Fields from record type H                                       */
    /* -------------------------------------------------------------------- */

    AddFieldDefns(psRTInfo, poFeatureDefn);
}
Example #6
0
TigerZipCodes::TigerZipCodes( OGRTigerDataSource * poDSIn,
                                  const char * pszPrototypeModule ) : TigerFileBase(&rt6_info, FILE_CODE)

{
    poDS = poDSIn;
    poFeatureDefn = new OGRFeatureDefn( "ZipCodes" );
    poFeatureDefn->Reference();
    poFeatureDefn->SetGeomType( wkbNone );

    /* -------------------------------------------------------------------- */
    /*      Fields from type 6 record.                                      */
    /* -------------------------------------------------------------------- */

    AddFieldDefns( psRTInfo, poFeatureDefn );
}
TigerSpatialMetadata::TigerSpatialMetadata( OGRTigerDataSource * poDSIn,
                                            CPL_UNUSED const char * pszPrototypeModule ) :
    TigerFileBase(&rtM_info, FILE_CODE)

{
    poDS = poDSIn;
    poFeatureDefn = new OGRFeatureDefn( "SpatialMetadata" );
    poFeatureDefn->Reference();
    poFeatureDefn->SetGeomType( wkbNone );

    /* -------------------------------------------------------------------- */
    /*      Fields from record type H                                       */
    /* -------------------------------------------------------------------- */

    AddFieldDefns(psRTInfo, poFeatureDefn);
}
Example #8
0
TigerPIP::TigerPIP( OGRTigerDataSource * poDSIn,
                    CPL_UNUSED const char * pszPrototypeModule )
  : TigerPoint(TRUE, NULL, FILE_CODE)
{
    poDS = poDSIn;
    poFeatureDefn = new OGRFeatureDefn( "PIP" );
    poFeatureDefn->Reference();
    poFeatureDefn->SetGeomType( wkbPoint );

    if (poDS->GetVersion() >= TIGER_2002) {
        psRTInfo = &rtP_2002_info;
    } else {
        psRTInfo = &rtP_info;
    }
    AddFieldDefns( psRTInfo, poFeatureDefn );
}
TigerLandmarks::TigerLandmarks( OGRTigerDataSource * poDSIn,
                                const char * pszPrototypeModule )
  : TigerPoint(FALSE)
{
    poDS = poDSIn;
    poFeatureDefn = new OGRFeatureDefn( "Landmarks" );
    poFeatureDefn->Reference();
    poFeatureDefn->SetGeomType( wkbPoint );

    if (poDS->GetVersion() >= TIGER_2002) {
        psRT7Info = &rt7_2002_info;
    } else {
        psRT7Info = &rt7_info;
    }

    AddFieldDefns( psRT7Info, poFeatureDefn );
}
Example #10
0
TigerAltName::TigerAltName( OGRTigerDataSource * poDSIn,
                            CPL_UNUSED const char * pszPrototypeModule ) :
    TigerFileBase(&rt4_info, FILE_CODE)
{
    OGRFieldDefn        oField("",OFTInteger);

    poDS = poDSIn;
    poFeatureDefn = new OGRFeatureDefn( "AltName" );
    poFeatureDefn->Reference();
    poFeatureDefn->SetGeomType( wkbNone );

    /* -------------------------------------------------------------------- */
    /*      Fields from type 4 record.                                      */
    /* -------------------------------------------------------------------- */

    AddFieldDefns( psRTInfo, poFeatureDefn );
}
Example #11
0
TigerFeatureIds::TigerFeatureIds( OGRTigerDataSource * poDSIn,
                                  CPL_UNUSED const char * pszPrototypeModule ) :
    TigerFileBase(NULL, FILE_CODE)
{
  poDS = poDSIn;
  poFeatureDefn = new OGRFeatureDefn( "FeatureIds" );
    poFeatureDefn->Reference();
  poFeatureDefn->SetGeomType( wkbNone );

  if (poDS->GetVersion() >= TIGER_2002) {
    psRTInfo = &rt5_2002_info;
  } else {
    psRTInfo = &rt5_info;
  }

  AddFieldDefns( psRTInfo, poFeatureDefn );
}
TigerPolygonCorrections::TigerPolygonCorrections(
    OGRTigerDataSource * poDSIn,
    const char * /* pszPrototypeModule */ ) :
    TigerFileBase(&rtB_info, FILE_CODE)
{
    OGRFieldDefn        oField("",OFTInteger);

    poDS = poDSIn;
    poFeatureDefn = new OGRFeatureDefn( "PolygonCorrections" );
    poFeatureDefn->Reference();
    poFeatureDefn->SetGeomType( wkbNone );

    /* -------------------------------------------------------------------- */
    /*      Fields from type B record.                                      */
    /* -------------------------------------------------------------------- */
    AddFieldDefns( psRTInfo, poFeatureDefn );
}
TigerFeatureIds::TigerFeatureIds( OGRTigerDataSource * poDSIn,
                                  const char * pszPrototypeModule )

{
  OGRFieldDefn        oField("",OFTInteger);
  poDS = poDSIn;
  poFeatureDefn = new OGRFeatureDefn( "FeatureIds" );
    poFeatureDefn->Reference();
  poFeatureDefn->SetGeomType( wkbNone );

  if (poDS->GetVersion() >= TIGER_2002) {
    psRT5Info = &rt5_2002_info;
  } else {
    psRT5Info = &rt5_info;
  }

  AddFieldDefns( psRT5Info, poFeatureDefn );
}
Example #14
0
TigerEntityNames::TigerEntityNames( OGRTigerDataSource * poDSIn,
                            const char * pszPrototypeModule ) : TigerFileBase(NULL, FILE_CODE)

{
    poDS = poDSIn;
    poFeatureDefn = new OGRFeatureDefn( "EntityNames" );
    poFeatureDefn->Reference();
    poFeatureDefn->SetGeomType( wkbPoint );

    if( poDS->GetVersion() >= TIGER_2002 ) {
      psRTInfo = &rtC_2002_info;
    } else if( poDS->GetVersion() >= TIGER_2000_Redistricting ) {
      psRTInfo = &rtC_2000_Redistricting_info;
    } else {
      psRTInfo = &rtC_info;
    }

    AddFieldDefns( psRTInfo, poFeatureDefn );
}
TigerAreaLandmarks::TigerAreaLandmarks( OGRTigerDataSource * poDSIn,
                                  const char * pszPrototypeModule )

{
    OGRFieldDefn        oField("",OFTInteger);

    poDS = poDSIn;
    poFeatureDefn = new OGRFeatureDefn( "AreaLandmarks" );
    poFeatureDefn->Reference();
    poFeatureDefn->SetGeomType( wkbNone );

    psRT8Info = &rt8_info;

    /* -------------------------------------------------------------------- */
    /*      Fields from type 8 record.                                      */
    /* -------------------------------------------------------------------- */

    AddFieldDefns( psRT8Info, poFeatureDefn );

}
TigerZeroCellID::TigerZeroCellID( OGRTigerDataSource * poDSIn,
                              const char * pszPrototypeModule )

{
    OGRFieldDefn        oField("",OFTInteger);

    poDS = poDSIn;
    poFeatureDefn = new OGRFeatureDefn( "ZeroCellID" );
    poFeatureDefn->Reference();
    poFeatureDefn->SetGeomType( wkbNone );

    psRTTInfo = &rtT_info;

/* -------------------------------------------------------------------- */
/*      Fields from type T record.                                      */
/* -------------------------------------------------------------------- */

    AddFieldDefns( psRTTInfo, poFeatureDefn );

}
Example #17
0
TigerTLIDRange::TigerTLIDRange( OGRTigerDataSource * poDSIn,
                                CPL_UNUSED const char * pszPrototypeModule ) :
    TigerFileBase(nullptr, FILE_CODE)
{
    poDS = poDSIn;
    poFeatureDefn = new OGRFeatureDefn( "TLIDRange" );
    poFeatureDefn->Reference();
    poFeatureDefn->SetGeomType( wkbNone );

    if (poDS->GetVersion() >= TIGER_2002) {
      psRTInfo = &rtR_2002_info;
    } else {
      psRTInfo = &rtR_info;
    }

    /* -------------------------------------------------------------------- */
    /*      Fields from type R record.                                      */
    /* -------------------------------------------------------------------- */

    AddFieldDefns( psRTInfo, poFeatureDefn );
}
Example #18
0
TigerPolyChainLink::TigerPolyChainLink( OGRTigerDataSource * poDSIn,
                                        CPL_UNUSED const char * pszPrototypeModule ) :
    TigerFileBase(NULL, FILE_CODE)
{
    OGRFieldDefn        oField("",OFTInteger);

    poDS = poDSIn;
    poFeatureDefn = new OGRFeatureDefn( "PolyChainLink" );
    poFeatureDefn->Reference();
    poFeatureDefn->SetGeomType( wkbNone );

    if (poDS->GetVersion() >= TIGER_2002) {
      psRTInfo = &rtI_2002_info;
    } else {
      psRTInfo = &rtI_info;
    }

    /* -------------------------------------------------------------------- */
    /*      Fields from type I record.                                      */
    /* -------------------------------------------------------------------- */

    AddFieldDefns( psRTInfo, poFeatureDefn );
}