~ubuntu-branches/debian/sid/gdal/sid

« back to all changes in this revision

Viewing changes to ogr/ogrsf_frmts/tiger/tigerpoint.cpp

  • Committer: Package Import Robot
  • Author(s): Francesco Paolo Lovergine
  • Date: 2012-05-07 15:04:42 UTC
  • mfrom: (5.5.16 experimental)
  • Revision ID: package-import@ubuntu.com-20120507150442-2eks97loeh6rq005
Tags: 1.9.0-1
* Ready for sid, starting transition.
* All symfiles updated to latest builds.
* Added dh_numpy call in debian/rules to depend on numpy ABI.
* Policy bumped to 3.9.3, no changes required.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
/******************************************************************************
2
 
 * $Id: tigerpoint.cpp 12745 2007-11-13 14:18:11Z dron $
 
2
 * $Id: tigerpoint.cpp 22961 2011-08-20 17:09:59Z rouault $
3
3
 *
4
4
 * Project:  TIGER/Line Translator
5
5
 * Purpose:  Implements TigerPoint class.
30
30
#include "ogr_tiger.h"
31
31
#include "cpl_conv.h"
32
32
 
33
 
CPL_CVSID("$Id: tigerpoint.cpp 12745 2007-11-13 14:18:11Z dron $");
 
33
CPL_CVSID("$Id: tigerpoint.cpp 22961 2011-08-20 17:09:59Z rouault $");
34
34
 
35
35
/************************************************************************/
36
36
/*                             TigerPoint()                             */
37
37
/************************************************************************/
38
 
TigerPoint::TigerPoint( int bRequireGeom )
 
38
TigerPoint::TigerPoint( int bRequireGeom, const TigerRecordInfo *psRTInfoIn,
 
39
                        const char            *m_pszFileCodeIn ) : TigerFileBase(psRTInfoIn, m_pszFileCodeIn)
39
40
{
40
41
    this->bRequireGeom = bRequireGeom;
41
42
}
42
43
 
43
 
TigerPoint::~TigerPoint()
44
 
{
45
 
}
46
 
 
47
 
/************************************************************************/
48
 
/*                             SetModule()                              */
49
 
/************************************************************************/
50
 
int TigerPoint::SetModule( const char * pszModule, const char *pszFileCode )
51
 
{
52
 
    if( !OpenFile( pszModule, pszFileCode ) )
53
 
        return FALSE;
54
 
    EstablishFeatureCount();
55
 
    return TRUE;
56
 
}
57
 
 
58
44
/************************************************************************/
59
45
/*                             GetFeature()                             */
60
46
/************************************************************************/
61
47
OGRFeature *TigerPoint::GetFeature( int nRecordId,
62
 
                                    TigerRecordInfo *psRTInfo,
63
48
                                    int nX0, int nX1,
64
49
                                    int nY0, int nY1 )
65
50
{
121
106
/*                           CreateFeature()                            */
122
107
/************************************************************************/
123
108
OGRErr TigerPoint::CreateFeature( OGRFeature *poFeature, 
124
 
                                  TigerRecordInfo *psRTInfo,
125
 
                                  int pointIndex,
126
 
                                  const char *pszFileCode)
 
109
                                  int pointIndex)
127
110
 
128
111
{
129
112
    char        szRecord[OGR_TIGER_RECBUF_LEN];
130
113
    OGRPoint    *poPoint = (OGRPoint *) poFeature->GetGeometryRef();
131
114
 
132
 
    if( !SetWriteModule( pszFileCode, psRTInfo->nRecordLength+2, poFeature ) )
 
115
    if( !SetWriteModule( m_pszFileCode, psRTInfo->nRecordLength+2, poFeature ) )
133
116
        return OGRERR_FAILURE;
134
117
 
135
118
    memset( szRecord, ' ', psRTInfo->nRecordLength );
146
129
        }
147
130
    }
148
131
 
149
 
    WriteRecord( szRecord, psRTInfo->nRecordLength, pszFileCode );
 
132
    WriteRecord( szRecord, psRTInfo->nRecordLength, m_pszFileCode );
150
133
 
151
134
    return OGRERR_NONE;
152
135
}