92 changes: 46 additions & 46 deletions gdal/apps/test_ogrsf.cpp

Large diffs are not rendered by default.

10 changes: 5 additions & 5 deletions gdal/frmts/pcidsk/ogrpcidsklayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -467,14 +467,14 @@ int OGRPCIDSKLayer::TestCapability( const char * pszCap )
}

/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/************************************************************************/

GIntBig OGRPCIDSKLayer::GetFeatureCount64( int bForce )
GIntBig OGRPCIDSKLayer::GetFeatureCount( int bForce )

{
if( m_poFilterGeom != NULL || m_poAttrQuery != NULL )
return OGRLayer::GetFeatureCount64( bForce );
return OGRLayer::GetFeatureCount( bForce );
else
{
try {
Expand Down Expand Up @@ -597,7 +597,7 @@ OGRErr OGRPCIDSKLayer::ICreateFeature( OGRFeature *poFeature )
try {

PCIDSK::ShapeId id = poVecSeg->CreateShape(
(PCIDSK::ShapeId) poFeature->GetFID64() );
(PCIDSK::ShapeId) poFeature->GetFID() );

poFeature->SetFID( (long) id );

Expand Down Expand Up @@ -628,7 +628,7 @@ OGRErr OGRPCIDSKLayer::ICreateFeature( OGRFeature *poFeature )
OGRErr OGRPCIDSKLayer::ISetFeature( OGRFeature *poFeature )

{
PCIDSK::ShapeId id = (PCIDSK::ShapeId) poFeature->GetFID64();
PCIDSK::ShapeId id = (PCIDSK::ShapeId) poFeature->GetFID();

/* -------------------------------------------------------------------- */
/* Translate attribute fields. */
Expand Down
2 changes: 1 addition & 1 deletion gdal/frmts/pcidsk/pcidskdataset2.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ class OGRPCIDSKLayer : public OGRLayer
virtual OGRErr CreateField( OGRFieldDefn *poField,
int bApproxOK = TRUE );

GIntBig GetFeatureCount64( int );
GIntBig GetFeatureCount( int );
OGRErr GetExtent( OGREnvelope *psExtent, int bForce );
};

Expand Down
4 changes: 2 additions & 2 deletions gdal/frmts/pdf/pdfreadvectors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ int PDFDataset::OpenVectorLayers(GDALPDFDictionary* poPageDict)
int bEmptyDS = TRUE;
for(int i=0;i<nLayers;i++)
{
if (papoLayers[i]->GetFeatureCount64() != 0)
if (papoLayers[i]->GetFeatureCount() != 0)
{
bEmptyDS = FALSE;
break;
Expand Down Expand Up @@ -1648,7 +1648,7 @@ void PDFDataset::ExploreContentsNonStructured(GDALPDFObject* poContents,
int i = 0;
while(i < nLayers)
{
if (papoLayers[i]->GetFeatureCount64() == 0)
if (papoLayers[i]->GetFeatureCount() == 0)
{
delete papoLayers[i];
if (i < nLayers - 1)
Expand Down
2 changes: 1 addition & 1 deletion gdal/frmts/rasterlite/rasterlitecreatecopy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -657,7 +657,7 @@ RasterliteCreateCopy( const char * pszFilename, GDALDataset *poSrcDS,

OGR_L_CreateFeature(hRasterLayer, hFeat);
/* Query raster ID to set it as the ID of the associated metadata */
int nRasterID = (int)OGR_F_GetFID64(hFeat);
int nRasterID = (int)OGR_F_GetFID(hFeat);

OGR_F_Destroy(hFeat);

Expand Down
6 changes: 3 additions & 3 deletions gdal/frmts/rasterlite/rasterlitedataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ CPLErr RasterliteBand::IReadBlock( int nBlockXOff, int nBlockYOff, void * pImage
#ifdef RASTERLITE_DEBUG
if (nBand == 1)
{
printf("nTiles = %d\n", OGR_L_GetFeatureCount64(hSQLLyr, TRUE));
printf("nTiles = %d\n", OGR_L_GetFeatureCount(hSQLLyr, TRUE));
}
#endif

Expand Down Expand Up @@ -1137,7 +1137,7 @@ GDALDataset* RasterliteDataset::Open(GDALOpenInfo* poOpenInfo)
hSQLLyr = OGR_DS_ExecuteSQL(hDS, osSQL.c_str(), NULL, NULL);
if (hSQLLyr != NULL)
{
nResolutions = OGR_L_GetFeatureCount64(hSQLLyr, TRUE);
nResolutions = OGR_L_GetFeatureCount(hSQLLyr, TRUE);
if( nResolutions == 0 )
{
OGR_DS_ReleaseResultSet(hDS, hSQLLyr);
Expand All @@ -1159,7 +1159,7 @@ GDALDataset* RasterliteDataset::Open(GDALOpenInfo* poOpenInfo)
if (hSQLLyr == NULL)
goto end;

nResolutions = OGR_L_GetFeatureCount64(hSQLLyr, TRUE);
nResolutions = OGR_L_GetFeatureCount(hSQLLyr, TRUE);

if (nResolutions == 0)
{
Expand Down
4 changes: 2 additions & 2 deletions gdal/frmts/rasterlite/rasterliteoverviews.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ CPLErr RasterliteDataset::ReloadOverviews()
/* Rebuild arrays */
/* -------------------------------------------------------------------- */

nResolutions = OGR_L_GetFeatureCount64(hSQLLyr, TRUE);
nResolutions = OGR_L_GetFeatureCount(hSQLLyr, TRUE);

padfXResolutions =
(double*)CPLMalloc(sizeof(double) * nResolutions);
Expand Down Expand Up @@ -570,7 +570,7 @@ CPLErr RasterliteDataset::CreateOverviewLevel(const char * pszResampling,

OGR_L_CreateFeature(hRasterLayer, hFeat);
/* Query raster ID to set it as the ID of the associated metadata */
int nRasterID = (int)OGR_F_GetFID64(hFeat);
int nRasterID = (int)OGR_F_GetFID(hFeat);

OGR_F_Destroy(hFeat);

Expand Down
8 changes: 4 additions & 4 deletions gdal/gcore/gdaldataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3911,13 +3911,13 @@ OGRLayer *GDALDataset::CopyLayer( OGRLayer *poSrcLayer,
{
CPLError( CE_Failure, CPLE_AppDefined,
"Unable to translate feature " CPL_FRMT_GIB " from layer %s.\n",
poFeature->GetFID64(), poSrcDefn->GetName() );
poFeature->GetFID(), poSrcDefn->GetName() );
OGRFeature::DestroyFeature( poFeature );
CPLFree(panMap);
return poDstLayer;
}

poDstFeature->SetFID( poFeature->GetFID64() );
poDstFeature->SetFID( poFeature->GetFID() );

OGRFeature::DestroyFeature( poFeature );

Expand Down Expand Up @@ -3962,13 +3962,13 @@ OGRLayer *GDALDataset::CopyLayer( OGRLayer *poSrcLayer,
{
CPLError( CE_Failure, CPLE_AppDefined,
"Unable to translate feature " CPL_FRMT_GIB " from layer %s.\n",
poFeature->GetFID64(), poSrcDefn->GetName() );
poFeature->GetFID(), poSrcDefn->GetName() );
OGRFeature::DestroyFeature( poFeature );
bStopTransfer = TRUE;
break;
}

papoDstFeature[nFeatCount]->SetFID( poFeature->GetFID64() );
papoDstFeature[nFeatCount]->SetFID( poFeature->GetFID() );

OGRFeature::DestroyFeature( poFeature );
}
Expand Down
6 changes: 2 additions & 4 deletions gdal/ogr/ogr_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -392,8 +392,7 @@ OGRErr CPL_DLL OGR_F_SetGeomFieldDirectly( OGRFeatureH hFeat,
OGRErr CPL_DLL OGR_F_SetGeomField( OGRFeatureH hFeat,
int iField, OGRGeometryH hGeom );

long CPL_DLL OGR_F_GetFID( OGRFeatureH ) CPL_WARN_DEPRECATED("Use OGR_F_GetFID64() instead");
GIntBig CPL_DLL OGR_F_GetFID64( OGRFeatureH );
GIntBig CPL_DLL OGR_F_GetFID( OGRFeatureH );
OGRErr CPL_DLL OGR_F_SetFID( OGRFeatureH, GIntBig );
void CPL_DLL OGR_F_DumpReadable( OGRFeatureH, FILE * );
OGRErr CPL_DLL OGR_F_SetFrom( OGRFeatureH, OGRFeatureH, int );
Expand Down Expand Up @@ -444,8 +443,7 @@ OGRErr CPL_DLL OGR_L_DeleteFeature( OGRLayerH, GIntBig );
OGRFeatureDefnH CPL_DLL OGR_L_GetLayerDefn( OGRLayerH );
OGRSpatialReferenceH CPL_DLL OGR_L_GetSpatialRef( OGRLayerH );
int CPL_DLL OGR_L_FindFieldIndex( OGRLayerH, const char *, int bExactMatch );
int CPL_DLL OGR_L_GetFeatureCount( OGRLayerH, int ) CPL_WARN_DEPRECATED("Use OGR_L_GetFeatureCount64() instead");
GIntBig CPL_DLL OGR_L_GetFeatureCount64( OGRLayerH, int );
GIntBig CPL_DLL OGR_L_GetFeatureCount( OGRLayerH, int );
OGRErr CPL_DLL OGR_L_GetExtent( OGRLayerH, OGREnvelope *, int );
OGRErr CPL_DLL OGR_L_GetExtentEx( OGRLayerH, int iGeomField,
OGREnvelope *psExtent, int bForce );
Expand Down
3 changes: 1 addition & 2 deletions gdal/ogr/ogr_feature.h
Original file line number Diff line number Diff line change
Expand Up @@ -367,8 +367,7 @@ class CPL_DLL OGRFeature
nYear, nMonth, nDay,
nHour, nMinute, nSecond, nTZFlag ); }

long GetFID() CPL_WARN_DEPRECATED("Use GetFID64()");
GIntBig GetFID64() { return nFID; }
GIntBig GetFID() { return nFID; }
virtual OGRErr SetFID( GIntBig nFIDIn );

void DumpReadable( FILE *, char** papszOptions = NULL );
Expand Down
12 changes: 2 additions & 10 deletions gdal/ogr/ograpispy.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -540,14 +540,6 @@ void OGRAPISpy_L_GetFeatureCount( OGRLayerH hLayer, int bForce )
OGRAPISpyFileClose();
}

void OGRAPISpy_L_GetFeatureCount64( OGRLayerH hLayer, int bForce )
{
OGRAPISpyFlushDiffered();
fprintf(fpSpyFile, "%s.GetFeatureCount(force = %d)\n",
OGRAPISpyGetLayerVar(hLayer).c_str(), bForce);
OGRAPISpyFileClose();
}

void OGRAPISpy_L_GetExtent( OGRLayerH hLayer, int bForce )
{
OGRAPISpyFlushDiffered();
Expand Down Expand Up @@ -609,8 +601,8 @@ static void OGRAPISpyDumpFeature( OGRLayerH hLayer, OGRFeatureH hFeat )
CPLAssert(poFeature->GetDefnRef()->IsSame(poLayer->GetLayerDefn()));
fprintf(fpSpyFile, "f = ogr.Feature(%s_defn)\n",
OGRAPISpyGetLayerVar(hLayer).c_str());
if( poFeature->GetFID64() != -1 )
fprintf(fpSpyFile, "f.SetFID(" CPL_FRMT_GIB ")\n", poFeature->GetFID64());
if( poFeature->GetFID() != -1 )
fprintf(fpSpyFile, "f.SetFID(" CPL_FRMT_GIB ")\n", poFeature->GetFID());
int i;
for(i = 0; i < poFeature->GetFieldCount(); i++)
{
Expand Down
1 change: 0 additions & 1 deletion gdal/ogr/ograpispy.h
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,6 @@ void OGRAPISpy_DS_CreateLayer( OGRDataSourceH hDS,
void OGRAPISpy_DS_DeleteLayer( OGRDataSourceH hDS, int iLayer, OGRErr eErr );

void OGRAPISpy_L_GetFeatureCount( OGRLayerH hLayer, int bForce );
void OGRAPISpy_L_GetFeatureCount64( OGRLayerH hLayer, int bForce );
void OGRAPISpy_L_GetExtent( OGRLayerH hLayer, int bForce );
void OGRAPISpy_L_GetExtentEx( OGRLayerH hLayer, int iGeomField, int bForce );
void OGRAPISpy_L_SetAttributeFilter( OGRLayerH hLayer, const char* pszFilter );
Expand Down
79 changes: 13 additions & 66 deletions gdal/ogr/ogrfeature.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -795,7 +795,7 @@ OGRFeature *OGRFeature::Clone()
if( GetStyleString() != NULL )
poNew->SetStyleString(GetStyleString());

poNew->SetFID( GetFID64() );
poNew->SetFID( GetFID() );

return poNew;
}
Expand Down Expand Up @@ -1110,7 +1110,7 @@ int OGRFeature::IsFieldSet( int iField )
switch (iSpecialField)
{
case SPF_FID:
return ((OGRFeature *)this)->GetFID64() != OGRNullFID;
return ((OGRFeature *)this)->GetFID() != OGRNullFID;

case SPF_OGR_GEOM_WKT:
case SPF_OGR_GEOMETRY:
Expand Down Expand Up @@ -1517,7 +1517,7 @@ double OGRFeature::GetFieldAsDouble( int iField )
switch (iSpecialField)
{
case SPF_FID:
return GetFID64();
return GetFID();

case SPF_OGR_GEOM_AREA:
if( GetGeomFieldCount() == 0 || papoGeometries[0] == NULL )
Expand Down Expand Up @@ -1617,7 +1617,7 @@ const char *OGRFeature::GetFieldAsString( int iField )
switch (iSpecialField)
{
case SPF_FID:
snprintf( szTempBuffer, TEMP_BUFFER_SIZE, CPL_FRMT_GIB, GetFID64() );
snprintf( szTempBuffer, TEMP_BUFFER_SIZE, CPL_FRMT_GIB, GetFID() );
return m_pszTmpFieldValue = CPLStrdup( szTempBuffer );

case SPF_OGR_GEOMETRY:
Expand Down Expand Up @@ -3681,7 +3681,7 @@ void OGRFeature::DumpReadable( FILE * fpOut, char** papszOptions )
if( fpOut == NULL )
fpOut = stdout;

fprintf( fpOut, "OGRFeature(%s):" CPL_FRMT_GIB "\n", poDefn->GetName(), GetFID64() );
fprintf( fpOut, "OGRFeature(%s):" CPL_FRMT_GIB "\n", poDefn->GetName(), GetFID() );

const char* pszDisplayFields =
CSLFetchNameValue(papszOptions, "DISPLAY_FIELDS");
Expand Down Expand Up @@ -3775,90 +3775,37 @@ void OGR_F_DumpReadable( OGRFeatureH hFeat, FILE *fpOut )
/************************************************************************/

/**
* \fn GIntBig OGRFeature::GetFID();
*
* \brief Get feature identifier.
*
* This method is the same as the C function OGR_F_GetFID().
* Note: since GDAL 2.0, this method returns a GIntBig (previously a long)
*
* @return feature id or OGRNullFID if none has been assigned.
* @deprecated Use GetFID64() instead
*/
long OGRFeature::GetFID()
{
if( (GIntBig)(long)nFID != nFID )
{
CPLError(CE_Warning, CPLE_AppDefined,
"Integer overflow occured when trying to return 64bit integer. Use GetFID64() instead");
}
return (long)nFID;
}

/************************************************************************/
/* OGR_F_GetFID() */
/* OGR_F_GetFID() */
/************************************************************************/

/**
* \brief Get feature identifier.
*
* This function is the same as the C++ method OGRFeature::GetFID().
* Note: since GDAL 2.0, this method returns a GIntBig (previously a long)
*
* @param hFeat handle to the feature from which to get the feature
* identifier.
* @return feature id or OGRNullFID if none has been assigned.
* @deprecated Use OGR_F_GetFID64() instead
*/

long OGR_F_GetFID( OGRFeatureH hFeat )
GIntBig OGR_F_GetFID( OGRFeatureH hFeat )

{
VALIDATE_POINTER1( hFeat, "OGR_F_GetFID", 0 );

GIntBig nFID64 = ((OGRFeature *) hFeat)->GetFID64();
long nFID = (long)nFID64;

if( (GIntBig)nFID != nFID64 )
{
CPLError(CE_Warning, CPLE_AppDefined,
"Integer overflow occured when trying to return 64bit integer. Use OGR_F_GetFID64() instead");
}
return nFID;
}

/************************************************************************/
/* GetFID64() */
/************************************************************************/

/**
* \fn GIntBig OGRFeature::GetFID64();
*
* \brief Get feature identifier.
*
* This method is the same as the C function OGR_F_GetFID64().
*
* @return feature id or OGRNullFID if none has been assigned.
* @since GDAL 2.0
*/

/************************************************************************/
/* OGR_F_GetFID64() */
/************************************************************************/

/**
* \brief Get feature identifier.
*
* This function is the same as the C++ method OGRFeature::GetFID64().
*
* @param hFeat handle to the feature from which to get the feature
* identifier.
* @return feature id or OGRNullFID if none has been assigned.
* @since GDAL 2.0
*/

GIntBig OGR_F_GetFID64( OGRFeatureH hFeat )

{
VALIDATE_POINTER1( hFeat, "OGR_F_GetFID64", 0 );

return ((OGRFeature *) hFeat)->GetFID64();
return ((OGRFeature *) hFeat)->GetFID();
}

/************************************************************************/
Expand Down Expand Up @@ -3940,7 +3887,7 @@ OGRBoolean OGRFeature::Equal( OGRFeature * poFeature )
if( poFeature == this )
return TRUE;

if( GetFID64() != poFeature->GetFID64() )
if( GetFID() != poFeature->GetFID() )
return FALSE;

if( GetDefnRef() != poFeature->GetDefnRef() )
Expand Down
4 changes: 2 additions & 2 deletions gdal/ogr/ogrsf_frmts/arcobjects/aolayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -513,10 +513,10 @@ OGRFeature *AOLayer::GetFeature( GIntBig oid )


/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/************************************************************************/

GIntBig AOLayer::GetFeatureCount64( int bForce )
GIntBig AOLayer::GetFeatureCount( int bForce )
{
HRESULT hr;

Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/arcobjects/ogr_ao.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ class AOLayer : public OGRLayer


virtual OGRErr GetExtent( OGREnvelope *psExtent, int bForce );
virtual GIntBig GetFeatureCount64( int bForce );
virtual GIntBig GetFeatureCount( int bForce );
virtual OGRErr SetAttributeFilter( const char *pszQuery );
virtual void SetSpatialFilterRect (double dfMinX, double dfMinY, double dfMaxX, double dfMaxY);
virtual void SetSpatialFilter( OGRGeometry * );
Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/avc/ogr_avc.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ class OGRAVCE00Layer : public OGRAVCLayer
void ResetReading();
OGRFeature * GetNextFeature();
OGRFeature *GetFeature( GIntBig nFID );
GIntBig GetFeatureCount64(int bForce);
GIntBig GetFeatureCount(int bForce);
int CheckSetupTable(AVCE00Section *psTblSectionIn);
int AppendTableFields( OGRFeature *poFeature );
};
Expand Down
4 changes: 2 additions & 2 deletions gdal/ogr/ogrsf_frmts/avc/ogravcbinlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,7 @@ OGRFeature *OGRAVCBinLayer::GetNextFeature()
OGRFeature *poFeature = GetFeature( -3 );

// Skip universe polygon.
if( poFeature != NULL && poFeature->GetFID64() == 1
if( poFeature != NULL && poFeature->GetFID() == 1
&& psSection->eType == AVCFilePAL )
{
OGRFeature::DestroyFeature( poFeature );
Expand Down Expand Up @@ -424,7 +424,7 @@ int OGRAVCBinLayer::AppendTableFields( OGRFeature *poFeature )
void *hRecord;

if( nTableAttrIndex == -1 )
nRecordId = poFeature->GetFID64();
nRecordId = poFeature->GetFID();
else
nRecordId = poFeature->GetFieldAsInteger( nTableAttrIndex );

Expand Down
10 changes: 5 additions & 5 deletions gdal/ogr/ogrsf_frmts/avc/ogravce00layer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ OGRFeature *OGRAVCE00Layer::GetNextFeature()
OGRFeature *poFeature = GetFeature( -3 );

// Skip universe polygon.
if( poFeature != NULL && poFeature->GetFID64() == 1
if( poFeature != NULL && poFeature->GetFID() == 1
&& psSection->eType == AVCFilePAL )
{
OGRFeature::DestroyFeature( poFeature );
Expand Down Expand Up @@ -491,7 +491,7 @@ int OGRAVCE00Layer::AppendTableFields( OGRFeature *poFeature )
void *hRecord;

if( nTableAttrIndex == -1 )
nRecordId = poFeature->GetFID64();
nRecordId = poFeature->GetFID();
else
nRecordId = poFeature->GetFieldAsInteger( nTableAttrIndex );

Expand Down Expand Up @@ -522,16 +522,16 @@ int OGRAVCE00Layer::AppendTableFields( OGRFeature *poFeature )
}


GIntBig OGRAVCE00Layer::GetFeatureCount64(int bForce)
GIntBig OGRAVCE00Layer::GetFeatureCount(int bForce)
{
if (m_poAttrQuery != NULL || m_poFilterGeom != NULL)
return OGRAVCLayer::GetFeatureCount64(bForce);
return OGRAVCLayer::GetFeatureCount(bForce);

if (bForce && nFeatureCount < 0)
{
if (psSection->nFeatureCount < 0)
{
nFeatureCount = OGRLayer::GetFeatureCount64(bForce);
nFeatureCount = OGRLayer::GetFeatureCount(bForce);
}
else
{
Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/bna/ogrbnalayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -322,7 +322,7 @@ OGRErr OGRBNALayer::ICreateFeature( OGRFeature *poFeature )
return OGRERR_FAILURE;
}

if( poFeature->GetFID64() == OGRNullFID )
if( poFeature->GetFID() == OGRNullFID )
poFeature->SetFID( nFeatures++ );

VSILFILE* fp = poDS->GetOutputFP();
Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/cartodb/ogr_cartodb.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class OGRCARTODBTableLayer : public OGRCARTODBLayer
virtual const char* GetName() { return osName.c_str(); }
virtual OGRFeatureDefn * GetLayerDefnInternal(json_object* poObjIn);

virtual GIntBig GetFeatureCount64( int bForce = TRUE );
virtual GIntBig GetFeatureCount( int bForce = TRUE );
virtual OGRFeature *GetFeature( GIntBig nFeatureId );

virtual int TestCapability( const char * );
Expand Down
18 changes: 9 additions & 9 deletions gdal/ogr/ogrsf_frmts/cartodb/ogrcartodbtablelayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ OGRErr OGRCARTODBTableLayer::ICreateFeature( OGRFeature *poFeature )
}

if( !bHasUserFieldMatchingFID &&
osFIDColName.size() && (poFeature->GetFID64() != OGRNullFID || nNextFID >= 0) )
osFIDColName.size() && (poFeature->GetFID() != OGRNullFID || nNextFID >= 0) )
{
if( bMustComma )
osSQL += ", ";
Expand Down Expand Up @@ -506,14 +506,14 @@ OGRErr OGRCARTODBTableLayer::ICreateFeature( OGRFeature *poFeature )
poFeature->SetFID(nNextFID);
nNextFID ++;
}
else if( osFIDColName.size() && poFeature->GetFID64() != OGRNullFID )
else if( osFIDColName.size() && poFeature->GetFID() != OGRNullFID )
{
if( bMustComma )
osSQL += ", ";
else
bMustComma = TRUE;

osSQL += CPLSPrintf(CPL_FRMT_GIB, poFeature->GetFID64());
osSQL += CPLSPrintf(CPL_FRMT_GIB, poFeature->GetFID());
}
}

Expand Down Expand Up @@ -595,7 +595,7 @@ OGRErr OGRCARTODBTableLayer::ISetFeature( OGRFeature *poFeature )
return OGRERR_FAILURE;
}

if (poFeature->GetFID64() == OGRNullFID)
if (poFeature->GetFID() == OGRNullFID)
{
CPLError( CE_Failure, CPLE_AppDefined,
"FID required on features given to SetFeature()." );
Expand Down Expand Up @@ -670,7 +670,7 @@ OGRErr OGRCARTODBTableLayer::ISetFeature( OGRFeature *poFeature )

osSQL += CPLSPrintf(" WHERE %s = " CPL_FRMT_GIB,
OGRCARTODBEscapeIdentifier(osFIDColName).c_str(),
poFeature->GetFID64());
poFeature->GetFID());

if( bInTransaction )
{
Expand Down Expand Up @@ -881,10 +881,10 @@ OGRFeature* OGRCARTODBTableLayer::GetFeature( GIntBig nFeatureId )
}

/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/************************************************************************/

GIntBig OGRCARTODBTableLayer::GetFeatureCount64(int bForce)
GIntBig OGRCARTODBTableLayer::GetFeatureCount(int bForce)
{

if( bDifferedCreation && RunDifferedCreationIfNecessary() != OGRERR_NONE )
Expand All @@ -906,14 +906,14 @@ GIntBig OGRCARTODBTableLayer::GetFeatureCount64(int bForce)
{
if( poObj != NULL )
json_object_put(poObj);
return OGRCARTODBLayer::GetFeatureCount64(bForce);
return OGRCARTODBLayer::GetFeatureCount(bForce);
}

json_object* poCount = json_object_object_get(poRowObj, "count");
if( poCount == NULL || json_object_get_type(poCount) != json_type_int )
{
json_object_put(poObj);
return OGRCARTODBLayer::GetFeatureCount64(bForce);
return OGRCARTODBLayer::GetFeatureCount(bForce);
}

GIntBig nRet = (GIntBig)json_object_get_int64(poCount);
Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/couchdb/ogr_couchdb.h
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ class OGRCouchDBTableLayer : public OGRCouchDBLayer

virtual const char * GetName() { return osName.c_str(); }

virtual GIntBig GetFeatureCount64( int bForce = TRUE );
virtual GIntBig GetFeatureCount( int bForce = TRUE );
virtual OGRErr GetExtent(OGREnvelope *psExtent, int bForce = TRUE);

virtual OGRFeature * GetFeature( GIntBig nFID );
Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/couchdb/ogrcouchdblayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ OGRFeature *OGRCouchDBLayer::GetNextRawFeature()
return NULL;

OGRFeature* poFeature = TranslateFeature(aoFeatures[nNextInSeq - nOffset]);
if (poFeature != NULL && poFeature->GetFID64() == OGRNullFID)
if (poFeature != NULL && poFeature->GetFID() == OGRNullFID)
poFeature->SetFID(nNextInSeq);

nNextInSeq ++;
Expand Down
22 changes: 11 additions & 11 deletions gdal/ogr/ogrsf_frmts/couchdb/ogrcouchdbtablelayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -891,10 +891,10 @@ OGRFeatureDefn * OGRCouchDBTableLayer::GetLayerDefn()
}

/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/************************************************************************/

GIntBig OGRCouchDBTableLayer::GetFeatureCount64(int bForce)
GIntBig OGRCouchDBTableLayer::GetFeatureCount(int bForce)
{
GetLayerDefn();

Expand Down Expand Up @@ -965,13 +965,13 @@ GIntBig OGRCouchDBTableLayer::GetFeatureCount64(int bForce)
}

if (m_poFilterGeom != NULL || m_poAttrQuery != NULL)
return OGRCouchDBLayer::GetFeatureCount64(bForce);
return OGRCouchDBLayer::GetFeatureCount(bForce);

return GetTotalFeatureCount();
}

/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/************************************************************************/

int OGRCouchDBTableLayer::GetTotalFeatureCount()
Expand Down Expand Up @@ -1082,19 +1082,19 @@ static json_object* OGRCouchDBWriteFeature( OGRFeature* poFeature,
json_object_object_add( poObj, "_id",
json_object_new_string(pszId) );

if ( poFeature->GetFID64() != OGRNullFID &&
strcmp(CPLSPrintf("%09ld", (long)poFeature->GetFID64()), pszId) != 0 )
if ( poFeature->GetFID() != OGRNullFID &&
strcmp(CPLSPrintf("%09ld", (long)poFeature->GetFID()), pszId) != 0 )
{
CPLDebug("CouchDB",
"_id field = %s, but FID = %09ld --> taking into account _id field only",
pszId,
(long)poFeature->GetFID64());
(long)poFeature->GetFID());
}
}
else if ( poFeature->GetFID64() != OGRNullFID )
else if ( poFeature->GetFID() != OGRNullFID )
{
json_object_object_add( poObj, "_id",
json_object_new_string(CPLSPrintf("%09ld", (long)poFeature->GetFID64())) );
json_object_new_string(CPLSPrintf("%09ld", (long)poFeature->GetFID())) );
}

if (poFeature->IsFieldSet(_REV_FIELD))
Expand Down Expand Up @@ -1305,9 +1305,9 @@ OGRErr OGRCouchDBTableLayer::ICreateFeature( OGRFeature *poFeature )
if (!poFeature->IsFieldSet(_ID_FIELD) ||
!CSLTestBoolean(CPLGetConfigOption("COUCHDB_PRESERVE_ID_ON_INSERT", "FALSE")))
{
if (poFeature->GetFID64() != OGRNullFID)
if (poFeature->GetFID() != OGRNullFID)
{
nFID = (int)poFeature->GetFID64();
nFID = (int)poFeature->GetFID();
}
osFID = CPLSPrintf("%09d", nFID);

Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/csv/ogr_csv.h
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class OGRCSVLayer : public OGRLayer
void SetCreateCSVT(int bCreateCSVT);
void SetWriteBOM(int bWriteBOM);

virtual GIntBig GetFeatureCount64( int bForce = TRUE );
virtual GIntBig GetFeatureCount( int bForce = TRUE );

OGRErr WriteHeader();
};
Expand Down
6 changes: 3 additions & 3 deletions gdal/ogr/ogrsf_frmts/csv/ogrcsvlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1948,13 +1948,13 @@ void OGRCSVLayer::SetWriteBOM(int bWriteBOM)
}

/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/************************************************************************/

GIntBig OGRCSVLayer::GetFeatureCount64( int bForce )
GIntBig OGRCSVLayer::GetFeatureCount( int bForce )
{
if (bInWriteMode || m_poFilterGeom != NULL || m_poAttrQuery != NULL)
return OGRLayer::GetFeatureCount64(bForce);
return OGRLayer::GetFeatureCount(bForce);

if (nTotalFeatures >= 0)
return nTotalFeatures;
Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/dgn/ogr_dgn.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class OGRDGNLayer : public OGRLayer
OGRFeature * GetNextFeature();
OGRFeature * GetFeature( GIntBig nFeatureId );

virtual GIntBig GetFeatureCount64( int bForce = TRUE );
virtual GIntBig GetFeatureCount( int bForce = TRUE );
virtual OGRErr GetExtent(OGREnvelope *psExtent, int bForce = TRUE);

OGRFeatureDefn * GetLayerDefn() { return poFeatureDefn; }
Expand Down
8 changes: 4 additions & 4 deletions gdal/ogr/ogrsf_frmts/dgn/ogrdgnlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ OGRFeature *OGRDGNLayer::GetFeature( GIntBig nFeatureId )
if( poFeature == NULL )
return NULL;

if( poFeature->GetFID64() != nFeatureId )
if( poFeature->GetFID() != nFeatureId )
{
delete poFeature;
return NULL;
Expand Down Expand Up @@ -749,18 +749,18 @@ int OGRDGNLayer::TestCapability( const char * pszCap )
}

/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/************************************************************************/

GIntBig OGRDGNLayer::GetFeatureCount64( int bForce )
GIntBig OGRDGNLayer::GetFeatureCount( int bForce )

{
/* -------------------------------------------------------------------- */
/* If any odd conditions are in effect collect the information */
/* normally. */
/* -------------------------------------------------------------------- */
if( m_poFilterGeom != NULL || m_poAttrQuery != NULL )
return OGRLayer::GetFeatureCount64( bForce );
return OGRLayer::GetFeatureCount( bForce );

/* -------------------------------------------------------------------- */
/* Otherwise scan the index. */
Expand Down
4 changes: 2 additions & 2 deletions gdal/ogr/ogrsf_frmts/dods/ogr_dods.h
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,7 @@ class OGRDODSSequenceLayer : public OGRDODSLayer

virtual OGRFeature *GetFeature( GIntBig nFeatureId );

virtual GIntBig GetFeatureCount64( int );
virtual GIntBig GetFeatureCount( int );
};

/************************************************************************/
Expand Down Expand Up @@ -289,7 +289,7 @@ class OGRDODSGridLayer : public OGRDODSLayer

virtual OGRFeature *GetFeature( GIntBig nFeatureId );

virtual GIntBig GetFeatureCount64( int );
virtual GIntBig GetFeatureCount( int );

};

Expand Down
6 changes: 3 additions & 3 deletions gdal/ogr/ogrsf_frmts/dods/ogrdodsgrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -586,14 +586,14 @@ int OGRDODSGridLayer::ProvideDataDDS()
}

/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/************************************************************************/

GIntBig OGRDODSGridLayer::GetFeatureCount64( int bForce )
GIntBig OGRDODSGridLayer::GetFeatureCount( int bForce )

{
if( m_poFilterGeom == NULL && m_poAttrQuery == NULL )
return nMaxRawIndex;
else
return OGRDODSLayer::GetFeatureCount64( bForce );
return OGRDODSLayer::GetFeatureCount( bForce );
}
4 changes: 2 additions & 2 deletions gdal/ogr/ogrsf_frmts/dods/ogrdodssequencelayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -846,10 +846,10 @@ OGRFeature *OGRDODSSequenceLayer::GetFeature( GIntBig nFeatureId )
}

/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/************************************************************************/

GIntBig OGRDODSSequenceLayer::GetFeatureCount64( int bForce )
GIntBig OGRDODSSequenceLayer::GetFeatureCount( int bForce )

{
if( !bDataLoaded && !bForce )
Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/dxf/ogrdxfwriterlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -212,7 +212,7 @@ OGRErr OGRDXFWriterLayer::WriteCore( OGRFeature *poFeature )
/* Also, for reasons I don't understand these ids seem to have */
/* to start somewhere around 0x50 hex (80 decimal). */
/* -------------------------------------------------------------------- */
poFeature->SetFID( poDS->WriteEntityID(fp,poFeature->GetFID64()) );
poFeature->SetFID( poDS->WriteEntityID(fp,poFeature->GetFID()) );

/* -------------------------------------------------------------------- */
/* For now we assign everything to the default layer - layer */
Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/edigeo/ogr_edigeo.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ class OGREDIGEOLayer : public OGRLayer
virtual void ResetReading();
virtual OGRFeature * GetNextFeature();
virtual OGRFeature * GetFeature(GIntBig nFID);
virtual GIntBig GetFeatureCount64( int bForce );
virtual GIntBig GetFeatureCount( int bForce );

virtual OGRFeatureDefn * GetLayerDefn() { return poFeatureDefn; }

Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/edigeo/ogredigeodatasource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1475,7 +1475,7 @@ void OGREDIGEODataSource::ReadEDIGEO()
/* -------------------------------------------------------------------- */
for(i=0;i<nLayers;/*nothing*/)
{
if (papoLayers[i]->GetFeatureCount64(TRUE) == 0)
if (papoLayers[i]->GetFeatureCount(TRUE) == 0)
{
delete papoLayers[i];
if (i < nLayers - 1)
Expand Down
6 changes: 3 additions & 3 deletions gdal/ogr/ogrsf_frmts/edigeo/ogredigeolayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -179,13 +179,13 @@ OGRErr OGREDIGEOLayer::GetExtent(OGREnvelope *psExtent, int bForce)
}

/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/************************************************************************/

GIntBig OGREDIGEOLayer::GetFeatureCount64( int bForce )
GIntBig OGREDIGEOLayer::GetFeatureCount( int bForce )
{
if (m_poFilterGeom != NULL || m_poAttrQuery != NULL)
return OGRLayer::GetFeatureCount64(bForce);
return OGRLayer::GetFeatureCount(bForce);

return (int)aosFeatures.size();
}
Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/elastic/ogr_elastic.h
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ class OGRElasticLayer : public OGRLayer {

int TestCapability(const char *);

GIntBig GetFeatureCount64(int bForce);
GIntBig GetFeatureCount(int bForce);

void PushIndex();
CPLString BuildMap();
Expand Down
4 changes: 2 additions & 2 deletions gdal/ogr/ogrsf_frmts/elastic/ogrelasticlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -346,10 +346,10 @@ int OGRElasticLayer::TestCapability(const char * pszCap) {
}

/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/************************************************************************/

GIntBig OGRElasticLayer::GetFeatureCount64(CPL_UNUSED int bForce) {
GIntBig OGRElasticLayer::GetFeatureCount(CPL_UNUSED int bForce) {
CPLError(CE_Failure, CPLE_NotSupported,
"Cannot read features when writing a Elastic file");
return 0;
Expand Down
10 changes: 5 additions & 5 deletions gdal/ogr/ogrsf_frmts/filegdb/FGdbLayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ OGRErr FGdbLayer::ICreateFeature( OGRFeature *poFeature )

/* Cannot write to FID field - it is managed by GDB*/
//std::wstring wfield_name = StringToWString(m_strOIDFieldName);
//hr = fgdb_row.SetInteger(wfield_name, poFeature->GetFID64());
//hr = fgdb_row.SetInteger(wfield_name, poFeature->GetFID());

/* Write the row to the table */
hr = fgdb_table->Insert(fgdb_row);
Expand Down Expand Up @@ -695,7 +695,7 @@ OGRErr FGdbLayer::ISetFeature( OGRFeature* poFeature )
if( !m_pDS->GetUpdate() )
return OGRERR_FAILURE;

if( poFeature->GetFID64() == OGRNullFID )
if( poFeature->GetFID() == OGRNullFID )
{
CPLError( CE_Failure, CPLE_AppDefined,
"SetFeature() with unset FID fails." );
Expand All @@ -704,7 +704,7 @@ OGRErr FGdbLayer::ISetFeature( OGRFeature* poFeature )

EndBulkLoad();

if (GetRow(enumRows, row, poFeature->GetFID64()) != OGRERR_NONE)
if (GetRow(enumRows, row, poFeature->GetFID()) != OGRERR_NONE)
return OGRERR_FAILURE;

/* Populate the row with the feature content */
Expand Down Expand Up @@ -2437,10 +2437,10 @@ OGRFeature *FGdbLayer::GetFeature( GIntBig oid )


/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/************************************************************************/

GIntBig FGdbLayer::GetFeatureCount64( CPL_UNUSED int bForce )
GIntBig FGdbLayer::GetFeatureCount( CPL_UNUSED int bForce )
{
long hr;
int32 rowCount = 0;
Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/filegdb/ogr_fgdb.h
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ class FGdbLayer : public FGdbBaseLayer
virtual OGRErr DeleteFeature( GIntBig nFID );

virtual OGRErr GetExtent( OGREnvelope *psExtent, int bForce );
virtual GIntBig GetFeatureCount64( int bForce );
virtual GIntBig GetFeatureCount( int bForce );
virtual OGRErr SetAttributeFilter( const char *pszQuery );
virtual void SetSpatialFilterRect (double dfMinX, double dfMinY, double dfMaxX, double dfMaxY);
virtual void SetSpatialFilter( OGRGeometry * );
Expand Down
4 changes: 2 additions & 2 deletions gdal/ogr/ogrsf_frmts/fme/fme2ogr.h
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ class OGRFMELayerCached : public OGRFMELayer

virtual void ResetReading();
virtual OGRFeature *GetNextFeature();
virtual GIntBig GetFeatureCount64( int bForce );
virtual GIntBig GetFeatureCount( int bForce );

virtual OGRErr GetExtent(OGREnvelope *psExtent, int bForce = TRUE);

Expand Down Expand Up @@ -138,7 +138,7 @@ class OGRFMELayerDB : public OGRFMELayer

virtual void ResetReading();
virtual OGRFeature *GetNextFeature();
virtual GIntBig GetFeatureCount64( int bForce );
virtual GIntBig GetFeatureCount( int bForce );

virtual int TestCapability( const char * );

Expand Down
8 changes: 4 additions & 4 deletions gdal/ogr/ogrsf_frmts/fme/ogrfmelayercached.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ OGRFeature *OGRFMELayerCached::GetNextFeature()
poFeature = ReadNextIndexFeature();

if( poFeature != NULL )
nPreviousFeature = poFeature->GetFID64();
nPreviousFeature = poFeature->GetFID();
else
break;

Expand Down Expand Up @@ -245,10 +245,10 @@ void OGRFMELayerCached::ResetReading()
}

/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/************************************************************************/

GIntBig OGRFMELayerCached::GetFeatureCount64( int bForce )
GIntBig OGRFMELayerCached::GetFeatureCount( int bForce )

{
int nResult;
Expand All @@ -257,7 +257,7 @@ GIntBig OGRFMELayerCached::GetFeatureCount64( int bForce )

if( m_poAttrQuery != NULL || poIndex == NULL )
{
nResult = OGRLayer::GetFeatureCount64( bForce );
nResult = OGRLayer::GetFeatureCount( bForce );
}
else
{
Expand Down
6 changes: 3 additions & 3 deletions gdal/ogr/ogrsf_frmts/fme/ogrfmelayerdb.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -428,16 +428,16 @@ int OGRFMELayerDB::CreateReader()
}

/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/************************************************************************/

GIntBig OGRFMELayerDB::GetFeatureCount64( int bForce )
GIntBig OGRFMELayerDB::GetFeatureCount( int bForce )

{
/*
** This could be improved by just reading through the FME Features
** without having to convert to OGRFeatures. Optimization deferred.
*/

return OGRLayer::GetFeatureCount64( bForce );
return OGRLayer::GetFeatureCount( bForce );
}
16 changes: 8 additions & 8 deletions gdal/ogr/ogrsf_frmts/generic/ogr_gensql.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -684,10 +684,10 @@ OGRErr OGRGenSQLResultsLayer::GetExtent( int iGeomField,
}

/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/************************************************************************/

GIntBig OGRGenSQLResultsLayer::GetFeatureCount64( int bForce )
GIntBig OGRGenSQLResultsLayer::GetFeatureCount( int bForce )

{
swq_select *psSelectInfo = (swq_select *) pSelectInfo;
Expand All @@ -709,9 +709,9 @@ GIntBig OGRGenSQLResultsLayer::GetFeatureCount64( int bForce )
else if( psSelectInfo->query_mode != SWQM_RECORDSET )
return 1;
else if( m_poAttrQuery == NULL && !MustEvaluateSpatialFilterOnGenSQL() )
return poSrcLayer->GetFeatureCount64( bForce );
return poSrcLayer->GetFeatureCount( bForce );
else
return OGRLayer::GetFeatureCount64( bForce );
return OGRLayer::GetFeatureCount( bForce );
}

/************************************************************************/
Expand Down Expand Up @@ -846,14 +846,14 @@ int OGRGenSQLResultsLayer::PrepareSummary()

/* -------------------------------------------------------------------- */
/* We treat COUNT(*) as a special case, and fill with */
/* GetFeatureCount64(). */
/* GetFeatureCount(). */
/* -------------------------------------------------------------------- */

if( psSelectInfo->result_columns == 1
&& psSelectInfo->column_defs[0].col_func == SWQCF_COUNT
&& psSelectInfo->column_defs[0].field_index < 0 )
{
GIntBig nRes = poSrcLayer->GetFeatureCount64( TRUE );
GIntBig nRes = poSrcLayer->GetFeatureCount( TRUE );
poSummaryFeature->SetField( 0, nRes );

if( (GIntBig)(int)nRes == nRes )
Expand Down Expand Up @@ -1249,7 +1249,7 @@ OGRFeature *OGRGenSQLResultsLayer::TranslateFeature( OGRFeature *poSrcFeat )
/* -------------------------------------------------------------------- */
poDstFeat = new OGRFeature( poDefn );

poDstFeat->SetFID( poSrcFeat->GetFID64() );
poDstFeat->SetFID( poSrcFeat->GetFID() );

poDstFeat->SetStyleString( poSrcFeat->GetStyleString() );

Expand Down Expand Up @@ -1793,7 +1793,7 @@ void OGRGenSQLResultsLayer::CreateOrderByIndex()
}
}

panFIDList[nIndexSize] = poSrcFeat->GetFID64();
panFIDList[nIndexSize] = poSrcFeat->GetFID();
delete poSrcFeat;

nIndexSize++;
Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/generic/ogr_gensql.h
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@ class CPL_DLL OGRGenSQLResultsLayer : public OGRLayer

virtual OGRFeatureDefn *GetLayerDefn();

virtual GIntBig GetFeatureCount64( int bForce = TRUE );
virtual GIntBig GetFeatureCount( int bForce = TRUE );
virtual OGRErr GetExtent(OGREnvelope *psExtent, int bForce = TRUE) { return GetExtent(0, psExtent, bForce); }
virtual OGRErr GetExtent(int iGeomField, OGREnvelope *psExtent, int bForce = TRUE);

Expand Down
4 changes: 2 additions & 2 deletions gdal/ogr/ogrsf_frmts/generic/ogr_miattrind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -622,7 +622,7 @@ OGRErr OGRMILayerAttrIndex::AddToIndex( OGRFeature *poFeature,
{
OGRErr eErr = OGRERR_NONE;

if( poFeature->GetFID64() == OGRNullFID )
if( poFeature->GetFID() == OGRNullFID )
{
CPLError( CE_Failure, CPLE_AppDefined,
"Attempt to index feature with no FID." );
Expand All @@ -641,7 +641,7 @@ OGRErr OGRMILayerAttrIndex::AddToIndex( OGRFeature *poFeature,

eErr =
papoIndexList[i]->AddEntry( poFeature->GetRawFieldRef( iField ),
poFeature->GetFID64() );
poFeature->GetFID() );
}

return eErr;
Expand Down
71 changes: 14 additions & 57 deletions gdal/ogr/ogrsf_frmts/generic/ogrlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -165,10 +165,10 @@ int OGR_L_GetRefCount( OGRLayerH hLayer )
}

/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/************************************************************************/

GIntBig OGRLayer::GetFeatureCount64( int bForce )
GIntBig OGRLayer::GetFeatureCount( int bForce )

{
OGRFeature *poFeature;
Expand All @@ -189,63 +189,20 @@ GIntBig OGRLayer::GetFeatureCount64( int bForce )
}

/************************************************************************/
/* GetFeatureCount() */
/* OGR_L_GetFeatureCount() */
/************************************************************************/

int OGRLayer::GetFeatureCount( int bForce )
GIntBig OGR_L_GetFeatureCount( OGRLayerH hLayer, int bForce )

{
GIntBig nVal = GetFeatureCount64(bForce);
if( (GIntBig)(int)nVal != nVal )
{
CPLError(CE_Warning, CPLE_AppDefined,
"Result of GetFeatureCount() does not fit on 32 bit integer. "
"Use GetFeatureCount64() instead");
nVal = INT_MAX;
}
return (int)nVal;
}

/************************************************************************/
/* OGR_L_GetFeatureCount() */
/************************************************************************/

int OGR_L_GetFeatureCount( OGRLayerH hLayer, int bForce )

{
VALIDATE_POINTER1( hLayer, "OGR_L_GetFeature", 0 );
VALIDATE_POINTER1( hLayer, "OGR_L_GetFeatureCount", 0 );

#ifdef OGRAPISPY_ENABLED
if( bOGRAPISpyEnabled )
OGRAPISpy_L_GetFeatureCount(hLayer, bForce);
#endif

GIntBig nVal = ((OGRLayer *) hLayer)->GetFeatureCount64(bForce);
if( (GIntBig)(int)nVal != nVal )
{
CPLError(CE_Warning, CPLE_AppDefined,
"Result of GetFeatureCount() does not fit on 32 bit integer. "
"Use OGR_L_GetFeatureCount64() instead");
nVal = INT_MAX;
}
return (int)nVal;
}

/************************************************************************/
/* OGR_L_GetFeatureCount64() */
/************************************************************************/

GIntBig OGR_L_GetFeatureCount64( OGRLayerH hLayer, int bForce )

{
VALIDATE_POINTER1( hLayer, "OGR_L_GetFeatureCount64", 0 );

#ifdef OGRAPISPY_ENABLED
if( bOGRAPISpyEnabled )
OGRAPISpy_L_GetFeatureCount64(hLayer, bForce);
#endif

return ((OGRLayer *) hLayer)->GetFeatureCount64(bForce);
return ((OGRLayer *) hLayer)->GetFeatureCount(bForce);
}

/************************************************************************/
Expand Down Expand Up @@ -502,7 +459,7 @@ OGRFeature *OGRLayer::GetFeature( GIntBig nFID )
ResetReading();
while( (poFeature = GetNextFeature()) != NULL )
{
if( poFeature->GetFID64() == nFID )
if( poFeature->GetFID() == nFID )
break;
else
delete poFeature;
Expand Down Expand Up @@ -2071,7 +2028,7 @@ OGRErr OGRLayer::Intersection( OGRLayer *pLayerMethod,
int *mapMethod = NULL;
OGREnvelope sEnvelopeMethod;
GBool bEnvelopeSet;
double progress_max = GetFeatureCount64(0);
double progress_max = GetFeatureCount(0);
double progress_counter = 0;
double progress_ticker = 0;
int bSkipFailures = CSLTestBoolean(CSLFetchNameValueDef(papszOptions, "SKIP_FAILURES", "NO"));
Expand Down Expand Up @@ -2336,7 +2293,7 @@ OGRErr OGRLayer::Union( OGRLayer *pLayerMethod,
OGRGeometry *pGeometryInputFilter = NULL;
int *mapInput = NULL;
int *mapMethod = NULL;
double progress_max = GetFeatureCount64(0) + pLayerMethod->GetFeatureCount64(0);
double progress_max = GetFeatureCount(0) + pLayerMethod->GetFeatureCount(0);
double progress_counter = 0;
double progress_ticker = 0;
int bSkipFailures = CSLTestBoolean(CSLFetchNameValueDef(papszOptions, "SKIP_FAILURES", "NO"));
Expand Down Expand Up @@ -2680,7 +2637,7 @@ OGRErr OGRLayer::SymDifference( OGRLayer *pLayerMethod,
OGRGeometry *pGeometryInputFilter = NULL;
int *mapInput = NULL;
int *mapMethod = NULL;
double progress_max = GetFeatureCount64(0) + pLayerMethod->GetFeatureCount64(0);
double progress_max = GetFeatureCount(0) + pLayerMethod->GetFeatureCount(0);
double progress_counter = 0;
double progress_ticker = 0;
int bSkipFailures = CSLTestBoolean(CSLFetchNameValueDef(papszOptions, "SKIP_FAILURES", "NO"));
Expand Down Expand Up @@ -2990,7 +2947,7 @@ OGRErr OGRLayer::Identity( OGRLayer *pLayerMethod,
OGRGeometry *pGeometryMethodFilter = NULL;
int *mapInput = NULL;
int *mapMethod = NULL;
double progress_max = GetFeatureCount64(0);
double progress_max = GetFeatureCount(0);
double progress_counter = 0;
double progress_ticker = 0;
int bSkipFailures = CSLTestBoolean(CSLFetchNameValueDef(papszOptions, "SKIP_FAILURES", "NO"));
Expand Down Expand Up @@ -3264,7 +3221,7 @@ OGRErr OGRLayer::Update( OGRLayer *pLayerMethod,
OGRGeometry *pGeometryMethodFilter = NULL;
int *mapInput = NULL;
int *mapMethod = NULL;
double progress_max = GetFeatureCount64(0) + pLayerMethod->GetFeatureCount64(0);
double progress_max = GetFeatureCount(0) + pLayerMethod->GetFeatureCount(0);
double progress_counter = 0;
double progress_ticker = 0;
int bSkipFailures = CSLTestBoolean(CSLFetchNameValueDef(papszOptions, "SKIP_FAILURES", "NO"));
Expand Down Expand Up @@ -3537,7 +3494,7 @@ OGRErr OGRLayer::Clip( OGRLayer *pLayerMethod,
OGRFeatureDefn *poDefnResult = NULL;
OGRGeometry *pGeometryMethodFilter = NULL;
int *mapInput = NULL;
double progress_max = GetFeatureCount64(0);
double progress_max = GetFeatureCount(0);
double progress_counter = 0;
double progress_ticker = 0;
int bSkipFailures = CSLTestBoolean(CSLFetchNameValueDef(papszOptions, "SKIP_FAILURES", "NO"));
Expand Down Expand Up @@ -3773,7 +3730,7 @@ OGRErr OGRLayer::Erase( OGRLayer *pLayerMethod,
OGRFeatureDefn *poDefnResult = NULL;
OGRGeometry *pGeometryMethodFilter = NULL;
int *mapInput = NULL;
double progress_max = GetFeatureCount64(0);
double progress_max = GetFeatureCount(0);
double progress_counter = 0;
double progress_ticker = 0;
int bSkipFailures = CSLTestBoolean(CSLFetchNameValueDef(papszOptions, "SKIP_FAILURES", "NO"));
Expand Down
4 changes: 2 additions & 2 deletions gdal/ogr/ogrsf_frmts/generic/ogrlayerdecorator.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -133,9 +133,9 @@ OGRSpatialReference *OGRLayerDecorator::GetSpatialRef()
return m_poDecoratedLayer->GetSpatialRef();
}

GIntBig OGRLayerDecorator::GetFeatureCount64( int bForce )
GIntBig OGRLayerDecorator::GetFeatureCount( int bForce )
{
return m_poDecoratedLayer->GetFeatureCount64(bForce);
return m_poDecoratedLayer->GetFeatureCount(bForce);
}

OGRErr OGRLayerDecorator::GetExtent(OGREnvelope *psExtent, int bForce)
Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/generic/ogrlayerdecorator.h
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,7 @@ class CPL_DLL OGRLayerDecorator : public OGRLayer

virtual OGRSpatialReference *GetSpatialRef();

virtual GIntBig GetFeatureCount64( int bForce = TRUE );
virtual GIntBig GetFeatureCount( int bForce = TRUE );
virtual OGRErr GetExtent(int iGeomField, OGREnvelope *psExtent, int bForce = TRUE);
virtual OGRErr GetExtent(OGREnvelope *psExtent, int bForce = TRUE);

Expand Down
6 changes: 3 additions & 3 deletions gdal/ogr/ogrsf_frmts/generic/ogrlayerpool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -398,13 +398,13 @@ OGRSpatialReference *OGRProxiedLayer::GetSpatialRef()
}

/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/************************************************************************/

GIntBig OGRProxiedLayer::GetFeatureCount64( int bForce )
GIntBig OGRProxiedLayer::GetFeatureCount( int bForce )
{
if( poUnderlyingLayer == NULL && !OpenUnderlyingLayer() ) return 0;
return poUnderlyingLayer->GetFeatureCount64(bForce);
return poUnderlyingLayer->GetFeatureCount(bForce);
}

/************************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/generic/ogrlayerpool.h
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ class OGRProxiedLayer : public OGRAbstractProxiedLayer

virtual OGRSpatialReference *GetSpatialRef();

virtual GIntBig GetFeatureCount64( int bForce = TRUE );
virtual GIntBig GetFeatureCount( int bForce = TRUE );
virtual OGRErr GetExtent(int iGeomField, OGREnvelope *psExtent, int bForce = TRUE);
virtual OGRErr GetExtent(OGREnvelope *psExtent, int bForce = TRUE);

Expand Down
4 changes: 2 additions & 2 deletions gdal/ogr/ogrsf_frmts/generic/ogrmutexedlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -149,10 +149,10 @@ OGRSpatialReference *OGRMutexedLayer::GetSpatialRef()
return OGRLayerDecorator::GetSpatialRef();
}

GIntBig OGRMutexedLayer::GetFeatureCount64( int bForce )
GIntBig OGRMutexedLayer::GetFeatureCount( int bForce )
{
CPLMutexHolderOptionalLockD(m_hMutex);
return OGRLayerDecorator::GetFeatureCount64(bForce);
return OGRLayerDecorator::GetFeatureCount(bForce);
}

OGRErr OGRMutexedLayer::GetExtent(int iGeomField, OGREnvelope *psExtent, int bForce)
Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/generic/ogrmutexedlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ class CPL_DLL OGRMutexedLayer : public OGRLayerDecorator

virtual OGRSpatialReference *GetSpatialRef();

virtual GIntBig GetFeatureCount64( int bForce = TRUE );
virtual GIntBig GetFeatureCount( int bForce = TRUE );
virtual OGRErr GetExtent(int iGeomField, OGREnvelope *psExtent, int bForce = TRUE);
virtual OGRErr GetExtent(OGREnvelope *psExtent, int bForce = TRUE);

Expand Down
18 changes: 9 additions & 9 deletions gdal/ogr/ogrsf_frmts/generic/ogrunionlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -772,7 +772,7 @@ OGRErr OGRUnionLayer::ICreateFeature( OGRFeature* poFeature )
return OGRERR_FAILURE;
}

if( poFeature->GetFID64() != OGRNullFID )
if( poFeature->GetFID() != OGRNullFID )
{
CPLError(CE_Failure, CPLE_NotSupported,
"CreateFeature() not supported when FID is set");
Expand All @@ -799,7 +799,7 @@ OGRErr OGRUnionLayer::ICreateFeature( OGRFeature* poFeature )
poSrcFeature->SetFrom(poFeature, TRUE);
OGRErr eErr = papoSrcLayers[i]->CreateFeature(poSrcFeature);
if( eErr == OGRERR_NONE )
poFeature->SetFID(poSrcFeature->GetFID64());
poFeature->SetFID(poSrcFeature->GetFID());
delete poSrcFeature;
return eErr;
}
Expand Down Expand Up @@ -831,7 +831,7 @@ OGRErr OGRUnionLayer::ISetFeature( OGRFeature* poFeature )
return OGRERR_FAILURE;
}

if( poFeature->GetFID64() == OGRNullFID )
if( poFeature->GetFID() == OGRNullFID )
{
CPLError(CE_Failure, CPLE_NotSupported,
"SetFeature() not supported when FID is not set");
Expand All @@ -856,7 +856,7 @@ OGRErr OGRUnionLayer::ISetFeature( OGRFeature* poFeature )
OGRFeature* poSrcFeature =
new OGRFeature(papoSrcLayers[i]->GetLayerDefn());
poSrcFeature->SetFrom(poFeature, TRUE);
poSrcFeature->SetFID(poFeature->GetFID64());
poSrcFeature->SetFID(poFeature->GetFID());
OGRErr eErr = papoSrcLayers[i]->SetFeature(poSrcFeature);
delete poSrcFeature;
return eErr;
Expand Down Expand Up @@ -953,10 +953,10 @@ void OGRUnionLayer::ApplyAttributeFilterToSrcLayer(int iSubLayer)
}

/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/************************************************************************/

GIntBig OGRUnionLayer::GetFeatureCount64( int bForce )
GIntBig OGRUnionLayer::GetFeatureCount( int bForce )
{
if (nFeatureCount >= 0 &&
m_poFilterGeom == NULL && m_poAttrQuery == NULL)
Expand All @@ -965,15 +965,15 @@ GIntBig OGRUnionLayer::GetFeatureCount64( int bForce )
}

if( !GetAttrFilterPassThroughValue() )
return OGRLayer::GetFeatureCount64(bForce);
return OGRLayer::GetFeatureCount(bForce);

GIntBig nRet = 0;
for(int i = 0; i < nSrcLayers; i++)
{
AutoWarpLayerIfNecessary(i);
ApplyAttributeFilterToSrcLayer(i);
SetSpatialFilterToSourceLayer(papoSrcLayers[i]);
nRet += papoSrcLayers[i]->GetFeatureCount64(bForce);
nRet += papoSrcLayers[i]->GetFeatureCount(bForce);
}
ResetReading();
return nRet;
Expand Down Expand Up @@ -1245,7 +1245,7 @@ OGRFeature* OGRUnionLayer::TranslateFromSrcLayer(OGRFeature* poSrcFeature)
}

if( bPreserveSrcFID )
poFeature->SetFID(poSrcFeature->GetFID64());
poFeature->SetFID(poSrcFeature->GetFID());
else
poFeature->SetFID(nNextFID ++);
return poFeature;
Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/generic/ogrunionlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class OGRUnionLayer : public OGRLayer

virtual OGRSpatialReference *GetSpatialRef();

virtual GIntBig GetFeatureCount64( int );
virtual GIntBig GetFeatureCount( int );

virtual OGRErr SetAttributeFilter( const char * );

Expand Down
12 changes: 6 additions & 6 deletions gdal/ogr/ogrsf_frmts/generic/ogrwarpedlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ OGRFeature *OGRWarpedLayer::SrcFeatureToWarpedFeature(OGRFeature* poSrcFeature)
{
OGRFeature* poFeature = new OGRFeature(GetLayerDefn());
poFeature->SetFrom(poSrcFeature);
poFeature->SetFID(poSrcFeature->GetFID64());
poFeature->SetFID(poSrcFeature->GetFID());

OGRGeometry* poGeom = poFeature->GetGeomFieldRef(m_iGeomField);
if( poGeom == NULL )
Expand All @@ -194,7 +194,7 @@ OGRFeature *OGRWarpedLayer::WarpedFeatureToSrcFeature(OGRFeature* poFeature)
{
OGRFeature* poSrcFeature = new OGRFeature(m_poDecoratedLayer->GetLayerDefn());
poSrcFeature->SetFrom(poFeature);
poSrcFeature->SetFID(poFeature->GetFID64());
poSrcFeature->SetFID(poFeature->GetFID());

OGRGeometry* poGeom = poSrcFeature->GetGeomFieldRef(m_iGeomField);
if( poGeom != NULL )
Expand Down Expand Up @@ -326,15 +326,15 @@ OGRSpatialReference *OGRWarpedLayer::GetSpatialRef()
}

/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/************************************************************************/

GIntBig OGRWarpedLayer::GetFeatureCount64( int bForce )
GIntBig OGRWarpedLayer::GetFeatureCount( int bForce )
{
if( m_poFilterGeom == NULL )
return m_poDecoratedLayer->GetFeatureCount64(bForce);
return m_poDecoratedLayer->GetFeatureCount(bForce);

return OGRLayer::GetFeatureCount64(bForce);
return OGRLayer::GetFeatureCount(bForce);
}

/************************************************************************/
Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/generic/ogrwarpedlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ class OGRWarpedLayer : public OGRLayerDecorator

virtual OGRSpatialReference *GetSpatialRef();

virtual GIntBig GetFeatureCount64( int bForce = TRUE );
virtual GIntBig GetFeatureCount( int bForce = TRUE );
virtual OGRErr GetExtent(int iGeomField, OGREnvelope *psExtent, int bForce = TRUE);
virtual OGRErr GetExtent(OGREnvelope *psExtent, int bForce = TRUE);

Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/geoconcept/geoconcept.c
Original file line number Diff line number Diff line change
Expand Up @@ -2408,7 +2408,7 @@ static OGRFeatureH GCIOAPI_CALL _buildOGRFeature_GCIO (
return NULL;
}
OGR_F_SetFID(f, atol(pszFields[0])); /* FID */
if( OGR_F_GetFID64(f)==OGRNullFID )
if( OGR_F_GetFID(f)==OGRNullFID )
{
OGR_F_SetFID(f, GetGCCurrentLinenum_GCIO(H));
}
Expand Down
14 changes: 7 additions & 7 deletions gdal/ogr/ogrsf_frmts/geoconcept/ogrgeoconceptlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ OGRFeature *OGRGeoconceptLayer::GetNextFeature()
CPLDebug( "GEOCONCEPT",
"FID : " CPL_FRMT_GIB "\n"
"%s : %s",
poFeature? poFeature->GetFID64():-1L,
poFeature? poFeature->GetFID():-1L,
poFeature && poFeature->GetFieldCount()>0? poFeature->GetFieldDefnRef(0)->GetNameRef():"-",
poFeature && poFeature->GetFieldCount()>0? poFeature->GetFieldAsString(0):"");

Expand Down Expand Up @@ -341,7 +341,7 @@ OGRErr OGRGeoconceptLayer::ICreateFeature( OGRFeature* poFeature )

/* 1st feature, let's write header : */
if( GetGCMode_GCIO(GetSubTypeGCHandle_GCIO(_gcFeature)) == vWriteAccess_GCIO &&
GetFeatureCount64(TRUE) == 0 )
GetFeatureCount(TRUE) == 0 )
if( WriteHeader_GCIO(GetSubTypeGCHandle_GCIO(_gcFeature))==NULL )
{
return OGRERR_FAILURE;
Expand All @@ -352,7 +352,7 @@ OGRErr OGRGeoconceptLayer::ICreateFeature( OGRFeature* poFeature )
for( iGeom= 0; iGeom<nbGeom; iGeom++ )
{
nextField= StartWritingFeature_GCIO(_gcFeature,
isSingle? poFeature->GetFID64():OGRNullFID);
isSingle? poFeature->GetFID():OGRNullFID);
while (nextField!=WRITECOMPLETED_GCIO)
{
if( nextField==WRITEERROR_GCIO )
Expand Down Expand Up @@ -427,17 +427,17 @@ OGRSpatialReference *OGRGeoconceptLayer::GetSpatialRef()
}

/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/* */
/* If a spatial filter is in effect, we turn control over to */
/* the generic counter. Otherwise we return the total count. */
/************************************************************************/

GIntBig OGRGeoconceptLayer::GetFeatureCount64( int bForce )
GIntBig OGRGeoconceptLayer::GetFeatureCount( int bForce )

{
if( m_poFilterGeom != NULL || m_poAttrQuery != NULL )
return OGRLayer::GetFeatureCount64( bForce );
return OGRLayer::GetFeatureCount( bForce );
else
return GetSubTypeNbFeatures_GCIO(_gcFeature);
}
Expand Down Expand Up @@ -524,7 +524,7 @@ OGRErr OGRGeoconceptLayer::CreateField( OGRFieldDefn *poField,

if( !(theField= FindFeatureField_GCIO(_gcFeature,pszName)) )
{
if( GetFeatureCount64(TRUE) > 0 )
if( GetFeatureCount(TRUE) > 0 )
{
CPLError( CE_Failure, CPLE_NotSupported,
"Can't create field '%s' on existing Geoconcept layer '%s.%s'.\n",
Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/geoconcept/ogrgeoconceptlayer.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class OGRGeoconceptLayer : public OGRLayer
OGRErr ICreateFeature( OGRFeature* poFeature );
OGRFeatureDefn* GetLayerDefn( ) { return _poFeatureDefn; } // FIXME
OGRSpatialReference* GetSpatialRef( );
GIntBig GetFeatureCount64( int bForce = TRUE );
GIntBig GetFeatureCount( int bForce = TRUE );
OGRErr GetExtent( OGREnvelope *psExtent, int bForce = TRUE );
int TestCapability( const char* pszCap );
// const char* GetInfo( const char* pszTag );
Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/geojson/ogr_geojson.h
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ class OGRGeoJSONLayer : public OGRLayer
//
OGRFeatureDefn* GetLayerDefn();

GIntBig GetFeatureCount64( int bForce = TRUE );
GIntBig GetFeatureCount( int bForce = TRUE );
void ResetReading();
OGRFeature* GetNextFeature();
int TestCapability( const char* pszCap );
Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/geojson/ogresrijsonreader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ OGRESRIJSONReader::ReadFeatureCollection( json_object* poObj )
}
//CPLAssert( bAdded );
}
//CPLAssert( nFeatures == poLayer_->GetFeatureCount64() );
//CPLAssert( nFeatures == poLayer_->GetFeatureCount() );
}

// We're returning class member to follow the same pattern of
Expand Down
10 changes: 5 additions & 5 deletions gdal/ogr/ogrsf_frmts/geojson/ogrgeojsonlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -89,15 +89,15 @@ OGRFeatureDefn* OGRGeoJSONLayer::GetLayerDefn()
}

/************************************************************************/
/* GetFeatureCount64 */
/* GetFeatureCount */
/************************************************************************/

GIntBig OGRGeoJSONLayer::GetFeatureCount64( int bForce )
GIntBig OGRGeoJSONLayer::GetFeatureCount( int bForce )
{
if (m_poFilterGeom == NULL && m_poAttrQuery == NULL)
return static_cast<int>( seqFeatures_.size() );
else
return OGRLayer::GetFeatureCount64(bForce);
return OGRLayer::GetFeatureCount(bForce);
}

/************************************************************************/
Expand Down Expand Up @@ -188,7 +188,7 @@ void OGRGeoJSONLayer::AddFeature( OGRFeature* poFeature )
poNewFeature = poFeature->Clone();


if( -1 == poNewFeature->GetFID64() )
if( -1 == poNewFeature->GetFID() )
{
int nFID = static_cast<int>(seqFeatures_.size());
poNewFeature->SetFID( nFID );
Expand All @@ -202,7 +202,7 @@ void OGRGeoJSONLayer::AddFeature( OGRFeature* poFeature )
}


if( (GIntBig)(int)poNewFeature->GetFID64() != poNewFeature->GetFID64() )
if( (GIntBig)(int)poNewFeature->GetFID() != poNewFeature->GetFID() )
SetMetadataItem(OLMD_FID64, "YES");

seqFeatures_.push_back( poNewFeature );
Expand Down
8 changes: 4 additions & 4 deletions gdal/ogr/ogrsf_frmts/geojson/ogrgeojsonreader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -879,7 +879,7 @@ OGRFeature* OGRGeoJSONReader::ReadFeature( OGRGeoJSONLayer* poLayer, json_object
/* and of integral type. Otherwise, leave unset (-1) then index */
/* in features sequence will be used as FID. */
/* -------------------------------------------------------------------- */
if( -1 == poFeature->GetFID64() )
if( -1 == poFeature->GetFID() )
{
json_object* poObjId = NULL;
OGRFieldSubType eSubType;
Expand All @@ -892,11 +892,11 @@ OGRFeature* OGRGeoJSONReader::ReadFeature( OGRGeoJSONLayer* poLayer, json_object
poFeature->SetFID( (GIntBig)json_object_get_int64( poObjId ) );
int nField = poFeature->GetFieldIndex( poLayer->GetFIDColumn() );
if( -1 != nField )
poFeature->SetField( nField, poFeature->GetFID64() );
poFeature->SetField( nField, poFeature->GetFID() );
}
}

if( -1 == poFeature->GetFID64() )
if( -1 == poFeature->GetFID() )
{
json_object* poObjId = OGRGeoJSONFindMemberByName( poObj, "id" );
if (poObjId != NULL && json_object_get_type(poObjId) == json_type_int)
Expand Down Expand Up @@ -979,7 +979,7 @@ OGRGeoJSONReader::ReadFeatureCollection( OGRGeoJSONLayer* poLayer, json_object*
/* bAdded = */ AddFeature( poLayer, poFeature );
//CPLAssert( bAdded );
}
//CPLAssert( nFeatures == poLayer_->GetFeatureCount64() );
//CPLAssert( nFeatures == poLayer_->GetFeatureCount() );
}
}

Expand Down
4 changes: 2 additions & 2 deletions gdal/ogr/ogrsf_frmts/geojson/ogrgeojsonwriter.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,10 +53,10 @@ json_object* OGRGeoJSONWriteFeature( OGRFeature* poFeature, int bWriteBBOX, int
/* -------------------------------------------------------------------- */
/* Write FID if available */
/* -------------------------------------------------------------------- */
if ( poFeature->GetFID64() != OGRNullFID )
if ( poFeature->GetFID() != OGRNullFID )
{
json_object_object_add( poObj, "id",
json_object_new_int64(poFeature->GetFID64()) );
json_object_new_int64(poFeature->GetFID()) );
}

/* -------------------------------------------------------------------- */
Expand Down
4 changes: 2 additions & 2 deletions gdal/ogr/ogrsf_frmts/geomedia/ogr_geomedia.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ class OGRGeomediaTableLayer : public OGRGeomediaLayer
OGRSpatialReference* poSRS );

virtual void ResetReading();
virtual GIntBig GetFeatureCount64( int );
virtual GIntBig GetFeatureCount( int );

virtual OGRErr SetAttributeFilter( const char * );
virtual OGRFeature *GetFeature( GIntBig nFeatureId );
Expand All @@ -138,7 +138,7 @@ class OGRGeomediaSelectLayer : public OGRGeomediaLayer
~OGRGeomediaSelectLayer();

virtual void ResetReading();
virtual GIntBig GetFeatureCount64( int );
virtual GIntBig GetFeatureCount( int );

virtual OGRFeature *GetFeature( GIntBig nFeatureId );

Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/geomedia/ogrgeomedialayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ OGRFeature *OGRGeomediaLayer::GetNextRawFeature()
{
CPLDebug( "Geomedia",
"Translation geomedia binary to OGR geometry failed (FID=%ld)",
(long)poFeature->GetFID64() );
(long)poFeature->GetFID() );
}
}

Expand Down
6 changes: 3 additions & 3 deletions gdal/ogr/ogrsf_frmts/geomedia/ogrgeomediaselectlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,16 @@ int OGRGeomediaSelectLayer::TestCapability( const char * pszCap )
}

/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/* */
/* If a spatial filter is in effect, we turn control over to */
/* the generic counter. Otherwise we return the total count. */
/* Eventually we should consider implementing a more efficient */
/* way of counting features matching a spatial query. */
/************************************************************************/

GIntBig OGRGeomediaSelectLayer::GetFeatureCount64( int bForce )
GIntBig OGRGeomediaSelectLayer::GetFeatureCount( int bForce )

{
return OGRGeomediaLayer::GetFeatureCount64( bForce );
return OGRGeomediaLayer::GetFeatureCount( bForce );
}
10 changes: 5 additions & 5 deletions gdal/ogr/ogrsf_frmts/geomedia/ogrgeomediatablelayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,19 +272,19 @@ int OGRGeomediaTableLayer::TestCapability( const char * pszCap )
}

/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/* */
/* If a spatial filter is in effect, we turn control over to */
/* the generic counter. Otherwise we return the total count. */
/* Eventually we should consider implementing a more efficient */
/* way of counting features matching a spatial query. */
/************************************************************************/

GIntBig OGRGeomediaTableLayer::GetFeatureCount64( int bForce )
GIntBig OGRGeomediaTableLayer::GetFeatureCount( int bForce )

{
if( m_poFilterGeom != NULL )
return OGRGeomediaLayer::GetFeatureCount64( bForce );
return OGRGeomediaLayer::GetFeatureCount( bForce );

CPLODBCStatement oStmt( poDS->GetSession() );
oStmt.Append( "SELECT COUNT(*) FROM " );
Expand All @@ -296,9 +296,9 @@ GIntBig OGRGeomediaTableLayer::GetFeatureCount64( int bForce )
if( !oStmt.ExecuteSQL() || !oStmt.Fetch() )
{
CPLError( CE_Failure, CPLE_AppDefined,
"GetFeatureCount64() failed on query %s.\n%s",
"GetFeatureCount() failed on query %s.\n%s",
oStmt.GetCommand(), poDS->GetSession()->GetLastError() );
return OGRGeomediaLayer::GetFeatureCount64(bForce);
return OGRGeomediaLayer::GetFeatureCount(bForce);
}

return atoi(oStmt.GetColData(0));
Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/georss/ogr_georss.h
Original file line number Diff line number Diff line change
Expand Up @@ -142,7 +142,7 @@ class OGRGeoRSSLayer : public OGRLayer

int TestCapability( const char * );

GIntBig GetFeatureCount64( int bForce );
GIntBig GetFeatureCount( int bForce );

void LoadSchema();

Expand Down
6 changes: 3 additions & 3 deletions gdal/ogr/ogrsf_frmts/georss/ogrgeorsslayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2200,10 +2200,10 @@ int OGRGeoRSSLayer::TestCapability( const char * pszCap )
}

/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/************************************************************************/

GIntBig OGRGeoRSSLayer::GetFeatureCount64( int bForce )
GIntBig OGRGeoRSSLayer::GetFeatureCount( int bForce )

{
if (bWriteMode)
Expand All @@ -2217,7 +2217,7 @@ GIntBig OGRGeoRSSLayer::GetFeatureCount64( int bForce )
LoadSchema();

if( m_poFilterGeom != NULL || m_poAttrQuery != NULL )
return OGRLayer::GetFeatureCount64( bForce );
return OGRLayer::GetFeatureCount( bForce );
else
return nTotalFeatureCount;
}
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/gft/ogr_gft.h
Original file line number Diff line number Diff line change
Expand Up @@ -137,7 +137,7 @@ class OGRGFTTableLayer : public OGRGFTLayer
virtual OGRFeatureDefn * GetLayerDefn();

virtual const char * GetName() { return osTableName.c_str(); }
virtual GIntBig GetFeatureCount64( int bForce = TRUE );
virtual GIntBig GetFeatureCount( int bForce = TRUE );

virtual OGRFeature * GetFeature( GIntBig nFID );

Expand Down
12 changes: 6 additions & 6 deletions gdal/ogr/ogrsf_frmts/gft/ogrgfttablelayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -478,10 +478,10 @@ OGRFeatureDefn * OGRGFTTableLayer::GetLayerDefn()
}

/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/************************************************************************/

GIntBig OGRGFTTableLayer::GetFeatureCount64(CPL_UNUSED int bForce)
GIntBig OGRGFTTableLayer::GetFeatureCount(CPL_UNUSED int bForce)
{
GetLayerDefn();

Expand All @@ -503,15 +503,15 @@ GIntBig OGRGFTTableLayer::GetFeatureCount64(CPL_UNUSED int bForce)
strncmp(pszLine, "count()", 7) != 0 ||
psResult->pszErrBuf != NULL)
{
CPLError(CE_Failure, CPLE_AppDefined, "GetFeatureCount64() failed");
CPLError(CE_Failure, CPLE_AppDefined, "GetFeatureCount() failed");
CPLHTTPDestroyResult(psResult);
return 0;
}

pszLine = OGRGFTGotoNextLine(pszLine);
if (pszLine == NULL)
{
CPLError(CE_Failure, CPLE_AppDefined, "GetFeatureCount64() failed");
CPLError(CE_Failure, CPLE_AppDefined, "GetFeatureCount() failed");
CPLHTTPDestroyResult(psResult);
return 0;
}
Expand Down Expand Up @@ -904,7 +904,7 @@ OGRErr OGRGFTTableLayer::ISetFeature( OGRFeature *poFeature )
return OGRERR_FAILURE;
}

if (poFeature->GetFID64() == OGRNullFID)
if (poFeature->GetFID() == OGRNullFID)
{
CPLError( CE_Failure, CPLE_AppDefined,
"FID required on features given to SetFeature()." );
Expand Down Expand Up @@ -1007,7 +1007,7 @@ OGRErr OGRGFTTableLayer::ISetFeature( OGRFeature *poFeature )
}

osCommand += " WHERE ROWID = '";
osCommand += CPLSPrintf(CPL_FRMT_GIB, poFeature->GetFID64());
osCommand += CPLSPrintf(CPL_FRMT_GIB, poFeature->GetFID());
osCommand += "'";

CPLHTTPResult * psResult = poDS->RunSQL(osCommand);
Expand Down
4 changes: 2 additions & 2 deletions gdal/ogr/ogrsf_frmts/gme/ogrgmejson.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ json_object* OGRGMEFeatureToGeoJSON(OGRFeature* poFeature)
if ( NULL == pjoGeometry ) {
CPLError( CE_Failure, CPLE_AppDefined,
"GME: NULL Geometry detected in feature " CPL_FRMT_GIB ". Ignoring feature.",
poFeature->GetFID64() );
poFeature->GetFID() );
json_object_put( pjoFeature );
return NULL;
}
Expand Down Expand Up @@ -437,7 +437,7 @@ json_object* OGRGMEAttributesToGeoJSON( OGRFeature* poFeature )
int nGxId = poFeature->GetFieldIndex("gx_id");
if (nGxId < 0) {
json_object* pjoProperty = NULL;
GIntBig nFID = poFeature->GetFID64();
GIntBig nFID = poFeature->GetFID();

char acGxId[128];
snprintf(acGxId, 128, "GDAL-" CPL_FRMT_GIB, nFID);
Expand Down
8 changes: 4 additions & 4 deletions gdal/ogr/ogrsf_frmts/gme/ogrgmelayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -728,12 +728,12 @@ OGRErr OGRGMELayer::ICreateFeature( OGRFeature *poFeature )
int nGxId = poFeature->GetFieldIndex("gx_id");
CPLDebug("GME", "gx_id is field %d", iGxIdField);
CPLString osGxId;
CPLDebug("GME", "Inserting feature " CPL_FRMT_GIB " as %s", poFeature->GetFID64(), osGxId.c_str());
CPLDebug("GME", "Inserting feature " CPL_FRMT_GIB " as %s", poFeature->GetFID(), osGxId.c_str());
if (nGxId >= 0) {
iGxIdField = nGxId;
if(poFeature->IsFieldSet(iGxIdField)) {
osGxId = poFeature->GetFieldAsString(iGxIdField);
CPLDebug("GME", "Feature already has " CPL_FRMT_GIB " gx_id='%s'", poFeature->GetFID64(),
CPLDebug("GME", "Feature already has " CPL_FRMT_GIB " gx_id='%s'", poFeature->GetFID(),
osGxId.c_str());
}
else {
Expand All @@ -752,7 +752,7 @@ OGRErr OGRGMELayer::ICreateFeature( OGRFeature *poFeature )
return iBatchInsertResult;
}
}
omnosIdToGMEKey[poFeature->GetFID64()] = osGxId;
omnosIdToGMEKey[poFeature->GetFID()] = osGxId;
omnpoInsertedFeatures[nFID] = poFeature->Clone();
CPLDebug("GME", "In Transaction, added feature to memory only");
bDirty = true;
Expand All @@ -773,7 +773,7 @@ OGRErr OGRGMELayer::ISetFeature( OGRFeature *poFeature )
{
if (!poFeature)
return OGRERR_FAILURE;
GIntBig nFID = poFeature->GetFID64();
GIntBig nFID = poFeature->GetFID();
if(bInTransaction) {
std::map<int, OGRFeature *>::const_iterator fit;
fit = omnpoInsertedFeatures.find(nFID);
Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/gml/gfstemplate.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ int GMLReader::ReArrangeTemplateClasses ( GFSTemplateList *pCC )
}
if (poClass != NULL)
{
if (poClass->GetFeatureCount64() > 0)
if (poClass->GetFeatureCount() > 0)
AddClass( poClass );
}
pItem = pItem->GetNext();
Expand Down
4 changes: 2 additions & 2 deletions gdal/ogr/ogrsf_frmts/gml/gmlfeatureclass.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -272,10 +272,10 @@ size_t GMLFeatureClass::GetElementNameLen() const
}

/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/************************************************************************/

GIntBig GMLFeatureClass::GetFeatureCount64()
GIntBig GMLFeatureClass::GetFeatureCount()

{
return m_nFeatureCount;
Expand Down
8 changes: 4 additions & 4 deletions gdal/ogr/ogrsf_frmts/gml/gmlreader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1340,14 +1340,14 @@ int GMLReader::PrescanForSchema( int bGetExtents, int bAnalyzeSRSPerFeature )
GMLFeatureClass *poClass = poFeature->GetClass();

if (poLastClass != NULL && poClass != poLastClass &&
poClass->GetFeatureCount64() != -1)
poClass->GetFeatureCount() != -1)
m_bSequentialLayers = FALSE;
poLastClass = poClass;

if( poClass->GetFeatureCount64() == -1 )
if( poClass->GetFeatureCount() == -1 )
poClass->SetFeatureCount( 1 );
else
poClass->SetFeatureCount( poClass->GetFeatureCount64() + 1 );
poClass->SetFeatureCount( poClass->GetFeatureCount() + 1 );

const CPLXMLNode* const * papsGeometry = poFeature->GetGeometryList();
if( papsGeometry != NULL && papsGeometry[0] != NULL )
Expand Down Expand Up @@ -1383,7 +1383,7 @@ int GMLReader::PrescanForSchema( int bGetExtents, int bAnalyzeSRSPerFeature )
}

// Merge geometry type into layer.
if( poClass->GetFeatureCount64() == 1 && eGType == wkbUnknown )
if( poClass->GetFeatureCount() == 1 && eGType == wkbUnknown )
eGType = wkbNone;

poClass->GetGeometryProperty(0)->SetType(
Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/gml/gmlreader.h
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ class CPL_DLL GMLFeatureClass
const char *GetExtraInfo();
void SetExtraInfo( const char * );

GIntBig GetFeatureCount64();
GIntBig GetFeatureCount();
void SetFeatureCount( GIntBig );

int HasExtents() const { return m_bHaveExtents; }
Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/gml/ogr_gml.h
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ class OGRGMLLayer : public OGRLayer
void ResetReading();
OGRFeature * GetNextFeature();

GIntBig GetFeatureCount64( int bForce = TRUE );
GIntBig GetFeatureCount( int bForce = TRUE );
OGRErr GetExtent(OGREnvelope *psExtent, int bForce = TRUE);

OGRErr ICreateFeature( OGRFeature *poFeature );
Expand Down
4 changes: 2 additions & 2 deletions gdal/ogr/ogrsf_frmts/gml/ogrgmldatasource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1077,7 +1077,7 @@ int OGRGMLDataSource::Open( const char * pszNameIn )
if (poReader->GetClassCount() == 1 && nNumberOfFeatures != 0)
{
GMLFeatureClass *poClass = poReader->GetClass(0);
int nFeatureCount = poClass->GetFeatureCount64();
int nFeatureCount = poClass->GetFeatureCount();
if (nFeatureCount < 0)
{
poClass->SetFeatureCount(nNumberOfFeatures);
Expand Down Expand Up @@ -1209,7 +1209,7 @@ OGRGMLLayer *OGRGMLDataSource::TranslateGMLSchema( GMLFeatureClass *poClass )
{
GMLGeometryPropertyDefn *poProperty = poClass->GetGeometryProperty( iField );
OGRGeomFieldDefn oField( poProperty->GetName(), (OGRwkbGeometryType)poProperty->GetType() );
if( poClass->GetGeometryPropertyCount() == 1 && poClass->GetFeatureCount64() == 0 )
if( poClass->GetGeometryPropertyCount() == 1 && poClass->GetFeatureCount() == 0 )
{
oField.SetType(wkbUnknown);
}
Expand Down
24 changes: 12 additions & 12 deletions gdal/ogr/ogrsf_frmts/gml/ogrgmllayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -532,25 +532,25 @@ OGRFeature *OGRGMLLayer::GetNextFeature()
}

/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/************************************************************************/

GIntBig OGRGMLLayer::GetFeatureCount64( int bForce )
GIntBig OGRGMLLayer::GetFeatureCount( int bForce )

{
if( poFClass == NULL )
return 0;

if( m_poFilterGeom != NULL || m_poAttrQuery != NULL )
return OGRLayer::GetFeatureCount64( bForce );
return OGRLayer::GetFeatureCount( bForce );
else
{
/* If the schema is read from a .xsd file, we haven't read */
/* the feature count, so compute it now */
GIntBig nFeatureCount = poFClass->GetFeatureCount64();
GIntBig nFeatureCount = poFClass->GetFeatureCount();
if (nFeatureCount < 0)
{
nFeatureCount = OGRLayer::GetFeatureCount64(bForce);
nFeatureCount = OGRLayer::GetFeatureCount(bForce);
poFClass->SetFeatureCount(nFeatureCount);
}
return nFeatureCount;
Expand Down Expand Up @@ -667,7 +667,7 @@ OGRErr OGRGMLLayer::ICreateFeature( OGRFeature *poFeature )
}
}

if( poFeature->GetFID64() == OGRNullFID )
if( poFeature->GetFID() == OGRNullFID )
poFeature->SetFID( iNextGMLId++ );

int nGMLIdIndex = -1;
Expand All @@ -687,7 +687,7 @@ OGRErr OGRGMLLayer::ICreateFeature( OGRFeature *poFeature )
poDS->PrintLine( fp, "%s gml:id=\"%s." CPL_FRMT_GIB "\">",
poFeatureDefn->GetName(),
poFeatureDefn->GetName(),
poFeature->GetFID64() );
poFeature->GetFID() );
}
else
{
Expand All @@ -696,7 +696,7 @@ OGRErr OGRGMLLayer::ICreateFeature( OGRFeature *poFeature )
{
poDS->PrintLine( fp, "%s fid=\"F" CPL_FRMT_GIB "\">",
poFeatureDefn->GetName(),
poFeature->GetFID64() );
poFeature->GetFID() );
}
else if (nGMLIdIndex >= 0 && poFeature->IsFieldSet( nGMLIdIndex ) )
{
Expand All @@ -709,7 +709,7 @@ OGRErr OGRGMLLayer::ICreateFeature( OGRFeature *poFeature )
poDS->PrintLine( fp, "%s fid=\"%s." CPL_FRMT_GIB "\">",
poFeatureDefn->GetName(),
poFeatureDefn->GetName(),
poFeature->GetFID64() );
poFeature->GetFID() );
}
}

Expand Down Expand Up @@ -771,11 +771,11 @@ OGRErr OGRGMLLayer::ICreateFeature( OGRFeature *poFeature )
CPLSPrintf("GMLID=%s.%s." CPL_FRMT_GIB,
poFeatureDefn->GetName(),
poFieldDefn->GetNameRef(),
poFeature->GetFID64()));
poFeature->GetFID()));
else
papszOptions = CSLAddString(papszOptions,
CPLSPrintf("GMLID=%s.geom." CPL_FRMT_GIB,
poFeatureDefn->GetName(), poFeature->GetFID64()));
poFeatureDefn->GetName(), poFeature->GetFID()));
}
if( !bIsGML3Output && OGR_GT_IsNonLinear(poGeom->getGeometryType()) )
{
Expand Down Expand Up @@ -984,7 +984,7 @@ int OGRGMLLayer::TestCapability( const char * pszCap )
|| m_poAttrQuery != NULL )
return FALSE;

return poFClass->GetFeatureCount64() != -1;
return poFClass->GetFeatureCount() != -1;
}

else if( EQUAL(pszCap,OLCStringsAsUTF8) )
Expand Down
6 changes: 3 additions & 3 deletions gdal/ogr/ogrsf_frmts/gpkg/ogr_geopackage.h
Original file line number Diff line number Diff line change
Expand Up @@ -393,7 +393,7 @@ class OGRGeoPackageTableLayer : public OGRGeoPackageLayer
OGRErr StartTransaction();
OGRErr CommitTransaction();
OGRErr RollbackTransaction();
GIntBig GetFeatureCount64( int );
GIntBig GetFeatureCount( int );
OGRErr GetExtent(OGREnvelope *psExtent, int bForce = TRUE);

// void SetSpatialFilter( int iGeomField, OGRGeometry * poGeomIn );
Expand Down Expand Up @@ -458,7 +458,7 @@ class OGRGeoPackageSelectLayer : public OGRGeoPackageLayer, public IOGRSQLiteSel
virtual void ResetReading();

virtual OGRFeature *GetNextFeature();
virtual GIntBig GetFeatureCount64( int );
virtual GIntBig GetFeatureCount( int );

virtual void SetSpatialFilter( OGRGeometry * poGeom ) { SetSpatialFilter(0, poGeom); }
virtual void SetSpatialFilter( int iGeomField, OGRGeometry * );
Expand All @@ -480,7 +480,7 @@ class OGRGeoPackageSelectLayer : public OGRGeoPackageLayer, public IOGRSQLiteSel
virtual void BaseResetReading() { OGRGeoPackageLayer::ResetReading(); }
virtual OGRFeature *BaseGetNextFeature() { return OGRGeoPackageLayer::GetNextFeature(); }
virtual OGRErr BaseSetAttributeFilter(const char* pszQuery) { return OGRGeoPackageLayer::SetAttributeFilter(pszQuery); }
virtual int BaseGetFeatureCount64(int bForce) { return OGRGeoPackageLayer::GetFeatureCount64(bForce); }
virtual int BaseGetFeatureCount(int bForce) { return OGRGeoPackageLayer::GetFeatureCount(bForce); }
virtual int BaseTestCapability( const char *pszCap ) { return OGRGeoPackageLayer::TestCapability(pszCap); }
virtual OGRErr BaseGetExtent(OGREnvelope *psExtent, int bForce) { return OGRGeoPackageLayer::GetExtent(psExtent, bForce); }
virtual OGRErr BaseGetExtent(int iGeomField, OGREnvelope *psExtent, int bForce) { return OGRGeoPackageLayer::GetExtent(iGeomField, psExtent, bForce); }
Expand Down
4 changes: 2 additions & 2 deletions gdal/ogr/ogrsf_frmts/gpkg/ogrgeopackageselectlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ OGRFeature *OGRGeoPackageSelectLayer::GetNextFeature()
/* GetNextFeature() */
/************************************************************************/

GIntBig OGRGeoPackageSelectLayer::GetFeatureCount64( int bForce )
GIntBig OGRGeoPackageSelectLayer::GetFeatureCount( int bForce )
{
return poBehaviour->GetFeatureCount64(bForce);
return poBehaviour->GetFeatureCount(bForce);
}

/************************************************************************/
Expand Down
20 changes: 10 additions & 10 deletions gdal/ogr/ogrsf_frmts/gpkg/ogrgeopackagetablelayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ OGRErr OGRGeoPackageTableLayer::FeatureBindParameters( OGRFeature *poFeature,

if( bAddFID )
{
err = sqlite3_bind_int64(poStmt, nColCount++, poFeature->GetFID64());
err = sqlite3_bind_int64(poStmt, nColCount++, poFeature->GetFID());
}

/* Bind data values to the statement, here bind the blob for geometry */
Expand Down Expand Up @@ -318,11 +318,11 @@ OGRErr OGRGeoPackageTableLayer::FeatureBindUpdateParameters( OGRFeature *poFeatu
return err;

/* Bind the FID to the "WHERE" clause */
err = sqlite3_bind_int64(poStmt, nColCount, poFeature->GetFID64());
err = sqlite3_bind_int64(poStmt, nColCount, poFeature->GetFID());
if ( err != SQLITE_OK )
{
CPLError( CE_Failure, CPLE_AppDefined,
"failed to bind FID '" CPL_FRMT_GIB "' to statement", poFeature->GetFID64());
"failed to bind FID '" CPL_FRMT_GIB "' to statement", poFeature->GetFID());
return OGRERR_FAILURE;
}

Expand Down Expand Up @@ -854,7 +854,7 @@ OGRErr OGRGeoPackageTableLayer::ICreateFeature( OGRFeature *poFeature )
return OGRERR_FAILURE;
}

if( m_poInsertStatement && (m_bInsertStatementWithFID != (poFeature->GetFID64() != OGRNullFID)) )
if( m_poInsertStatement && (m_bInsertStatementWithFID != (poFeature->GetFID() != OGRNullFID)) )
{
sqlite3_finalize(m_poInsertStatement);
m_poInsertStatement = NULL;
Expand All @@ -865,7 +865,7 @@ OGRErr OGRGeoPackageTableLayer::ICreateFeature( OGRFeature *poFeature )
/* Construct a SQL INSERT statement from the OGRFeature */
/* Only work with fields that are set */
/* Do not stick values into SQL, use placeholder and bind values later */
m_bInsertStatementWithFID = poFeature->GetFID64() != OGRNullFID;
m_bInsertStatementWithFID = poFeature->GetFID() != OGRNullFID;
CPLString osCommand = FeatureGenerateInsertSQL(poFeature, m_bInsertStatementWithFID);

/* Prepare the SQL into a statement */
Expand Down Expand Up @@ -935,7 +935,7 @@ OGRErr OGRGeoPackageTableLayer::ISetFeature( OGRFeature *poFeature )
}

/* No FID? We can't set, we have to create */
if ( poFeature->GetFID64() == OGRNullFID )
if ( poFeature->GetFID() == OGRNullFID )
{
CPLError( CE_Failure, CPLE_AppDefined,
"FID required on features given to SetFeature()." );
Expand Down Expand Up @@ -966,7 +966,7 @@ OGRErr OGRGeoPackageTableLayer::ISetFeature( OGRFeature *poFeature )
sqlite3_stmt* hBackupStmt = m_poUpdateStatement;
m_poUpdateStatement = NULL;

DeleteFeature( poFeature->GetFID64() );
DeleteFeature( poFeature->GetFID() );

m_poUpdateStatement = hBackupStmt;

Expand Down Expand Up @@ -1236,13 +1236,13 @@ OGRErr OGRGeoPackageTableLayer::RollbackTransaction()


/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/************************************************************************/

GIntBig OGRGeoPackageTableLayer::GetFeatureCount64( CPL_UNUSED int bForce )
GIntBig OGRGeoPackageTableLayer::GetFeatureCount( CPL_UNUSED int bForce )
{
if( m_poFilterGeom != NULL && !m_bFilterIsEnvelope )
return OGRGeoPackageLayer::GetFeatureCount64();
return OGRGeoPackageLayer::GetFeatureCount();

/* Ignore bForce, because we always do a full count on the database */
OGRErr err;
Expand Down
10 changes: 5 additions & 5 deletions gdal/ogr/ogrsf_frmts/gpsbabel/ogrgpsbabeldatasource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -319,27 +319,27 @@ int OGRGPSBabelDataSource::Open( const char * pszDatasourceName,
if (bWaypoints)
{
poLayer = poGPXDS->GetLayerByName("waypoints");
if (poLayer != NULL && poLayer->GetFeatureCount64() != 0)
if (poLayer != NULL && poLayer->GetFeatureCount() != 0)
apoLayers[nLayers++] = poLayer;
}

if (bRoutes)
{
poLayer = poGPXDS->GetLayerByName("routes");
if (poLayer != NULL && poLayer->GetFeatureCount64() != 0)
if (poLayer != NULL && poLayer->GetFeatureCount() != 0)
apoLayers[nLayers++] = poLayer;
poLayer = poGPXDS->GetLayerByName("route_points");
if (poLayer != NULL && poLayer->GetFeatureCount64() != 0)
if (poLayer != NULL && poLayer->GetFeatureCount() != 0)
apoLayers[nLayers++] = poLayer;
}

if (bTracks)
{
poLayer = poGPXDS->GetLayerByName("tracks");
if (poLayer != NULL && poLayer->GetFeatureCount64() != 0)
if (poLayer != NULL && poLayer->GetFeatureCount() != 0)
apoLayers[nLayers++] = poLayer;
poLayer = poGPXDS->GetLayerByName("track_points");
if (poLayer != NULL && poLayer->GetFeatureCount64() != 0)
if (poLayer != NULL && poLayer->GetFeatureCount() != 0)
apoLayers[nLayers++] = poLayer;
}
}
Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/grass/ogrgrass.h
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ class OGRGRASSLayer : public OGRLayer

// Layer info
OGRFeatureDefn * GetLayerDefn() { return poFeatureDefn; }
GIntBig GetFeatureCount64( int );
GIntBig GetFeatureCount( int );
OGRErr GetExtent(OGREnvelope *psExtent, int bForce);
virtual OGRSpatialReference *GetSpatialRef();
int TestCapability( const char * );
Expand Down
6 changes: 3 additions & 3 deletions gdal/ogr/ogrsf_frmts/grass/ogrgrasslayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1007,17 +1007,17 @@ OGRErr OGRGRASSLayer::ICreateFeature( OGRFeature *poFeature )
}

/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/* */
/* If a spatial filter is in effect, we turn control over to */
/* the generic counter. Otherwise we return the total count. */
/* Eventually we should consider implementing a more efficient */
/* way of counting features matching a spatial query. */
/************************************************************************/
GIntBig OGRGRASSLayer::GetFeatureCount64( int bForce )
GIntBig OGRGRASSLayer::GetFeatureCount( int bForce )
{
if( m_poFilterGeom != NULL || m_poAttrQuery != NULL )
return OGRLayer::GetFeatureCount64( bForce );
return OGRLayer::GetFeatureCount( bForce );

return nTotalCount;
}
Expand Down
4 changes: 2 additions & 2 deletions gdal/ogr/ogrsf_frmts/gtm/gtmtracklayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -349,12 +349,12 @@ OGRFeature* GTMTrackLayer::GetNextFeature()
return NULL;
}

GIntBig GTMTrackLayer::GetFeatureCount64(int bForce)
GIntBig GTMTrackLayer::GetFeatureCount(int bForce)
{
if (m_poFilterGeom == NULL && m_poAttrQuery == NULL)
return poDS->getNTracks();

return OGRLayer::GetFeatureCount64(bForce);
return OGRLayer::GetFeatureCount(bForce);
}


Expand Down
4 changes: 2 additions & 2 deletions gdal/ogr/ogrsf_frmts/gtm/gtmwaypointlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,12 +348,12 @@ OGRFeature* GTMWaypointLayer::GetNextFeature()
return NULL;
}

GIntBig GTMWaypointLayer::GetFeatureCount64(int bForce)
GIntBig GTMWaypointLayer::GetFeatureCount(int bForce)
{
if (m_poFilterGeom == NULL && m_poAttrQuery == NULL)
return poDS->getNWpts();

return OGRLayer::GetFeatureCount64(bForce);
return OGRLayer::GetFeatureCount(bForce);
}

void GTMWaypointLayer::ResetReading()
Expand Down
6 changes: 3 additions & 3 deletions gdal/ogr/ogrsf_frmts/gtm/ogr_gtm.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,7 @@ class OGRGTMLayer : public OGRLayer
OGRFeatureDefn* GetLayerDefn();
virtual void ResetReading() = 0;
virtual OGRFeature* GetNextFeature() = 0;
virtual GIntBig GetFeatureCount64(int bForce = TRUE) = 0;
virtual GIntBig GetFeatureCount(int bForce = TRUE) = 0;
virtual OGRErr ICreateFeature(OGRFeature *poFeature) = 0;

int TestCapability( const char* pszCap );
Expand Down Expand Up @@ -131,7 +131,7 @@ class GTMWaypointLayer : public OGRGTMLayer
OGRErr ICreateFeature(OGRFeature *poFeature);
void ResetReading();
OGRFeature* GetNextFeature();
GIntBig GetFeatureCount64(int bForce = TRUE);
GIntBig GetFeatureCount(int bForce = TRUE);

enum WaypointFields{NAME, COMMENT, ICON, DATE};
private:
Expand All @@ -152,7 +152,7 @@ class GTMTrackLayer : public OGRGTMLayer
OGRErr ICreateFeature(OGRFeature *poFeature);
void ResetReading();
OGRFeature* GetNextFeature();
GIntBig GetFeatureCount64(int bForce = TRUE);
GIntBig GetFeatureCount(int bForce = TRUE);
enum TrackFields{NAME, TYPE, COLOR};

private:
Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/htf/ogr_htf.h
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,7 @@ class OGRHTFSoundingLayer : public OGRHTFLayer

virtual int TestCapability( const char * );

virtual GIntBig GetFeatureCount64(int bForce = TRUE);
virtual GIntBig GetFeatureCount(int bForce = TRUE);
};

/************************************************************************/
Expand Down
6 changes: 3 additions & 3 deletions gdal/ogr/ogrsf_frmts/htf/ogrhtflayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -525,13 +525,13 @@ OGRFeature *OGRHTFSoundingLayer::GetNextRawFeature()
}

/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/************************************************************************/

GIntBig OGRHTFSoundingLayer::GetFeatureCount64(int bForce)
GIntBig OGRHTFSoundingLayer::GetFeatureCount(int bForce)
{
if (m_poFilterGeom != NULL || m_poAttrQuery != NULL)
return OGRHTFLayer::GetFeatureCount64(bForce);
return OGRHTFLayer::GetFeatureCount(bForce);

if (nTotalSoundings != 0)
return nTotalSoundings;
Expand Down
4 changes: 2 additions & 2 deletions gdal/ogr/ogrsf_frmts/idb/ogr_idb.h
Original file line number Diff line number Diff line change
Expand Up @@ -112,7 +112,7 @@ class OGRIDBTableLayer : public OGRIDBLayer
);

virtual void ResetReading();
virtual GIntBig GetFeatureCount64( int );
virtual GIntBig GetFeatureCount( int );

virtual OGRErr SetAttributeFilter( const char * );
virtual OGRErr ISetFeature( OGRFeature *poFeature );
Expand Down Expand Up @@ -148,7 +148,7 @@ class OGRIDBSelectLayer : public OGRIDBLayer
~OGRIDBSelectLayer();

virtual void ResetReading();
virtual GIntBig GetFeatureCount64( int );
virtual GIntBig GetFeatureCount( int );

virtual OGRFeature *GetFeature( GIntBig nFeatureId );

Expand Down
6 changes: 3 additions & 3 deletions gdal/ogr/ogrsf_frmts/idb/ogridbselectlayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -163,16 +163,16 @@ OGRErr OGRIDBSelectLayer::GetExtent(OGREnvelope *, int )
}

/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/* */
/* If a spatial filter is in effect, we turn control over to */
/* the generic counter. Otherwise we return the total count. */
/* Eventually we should consider implementing a more efficient */
/* way of counting features matching a spatial query. */
/************************************************************************/

GIntBig OGRIDBSelectLayer::GetFeatureCount64( int bForce )
GIntBig OGRIDBSelectLayer::GetFeatureCount( int bForce )

{
return OGRIDBLayer::GetFeatureCount64( bForce );
return OGRIDBLayer::GetFeatureCount( bForce );
}
16 changes: 8 additions & 8 deletions gdal/ogr/ogrsf_frmts/idb/ogridbtablelayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -413,18 +413,18 @@ int OGRIDBTableLayer::TestCapability( const char * pszCap )
}

/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/* */
/* If a spatial filter is in effect, we turn control over to */
/* the generic counter. Otherwise we return the total count. */
/* Eventually we should consider implementing a more efficient */
/* way of counting features matching a spatial query. */
/************************************************************************/

GIntBig OGRIDBTableLayer::GetFeatureCount64( int bForce )
GIntBig OGRIDBTableLayer::GetFeatureCount( int bForce )

{
return OGRIDBLayer::GetFeatureCount64( bForce );
return OGRIDBLayer::GetFeatureCount( bForce );
}

/************************************************************************/
Expand Down Expand Up @@ -501,7 +501,7 @@ OGRErr OGRIDBTableLayer::ISetFeature( OGRFeature *poFeature )
return eErr;
}

if( poFeature->GetFID64() == OGRNullFID )
if( poFeature->GetFID() == OGRNullFID )
{
CPLError( CE_Failure, CPLE_AppDefined,
"FID required on features given to SetFeature()." );
Expand Down Expand Up @@ -571,7 +571,7 @@ OGRErr OGRIDBTableLayer::ISetFeature( OGRFeature *poFeature )
poFeatureDefn->GetName(),
osFields.c_str(),
pszFIDColumn,
poFeature->GetFID64() );
poFeature->GetFID() );

if ( ! oQuery.Prepare( osSql.c_str() ) )
{
Expand Down Expand Up @@ -715,7 +715,7 @@ OGRErr OGRIDBTableLayer::ISetFeature( OGRFeature *poFeature )
return eErr;
}

if( poFeature->GetFID64() == OGRNullFID )
if( poFeature->GetFID() == OGRNullFID )
{
CPLError( CE_Failure, CPLE_AppDefined,
"FID required on features given to SetFeature()." );
Expand Down Expand Up @@ -844,7 +844,7 @@ OGRErr OGRIDBTableLayer::ISetFeature( OGRFeature *poFeature )
poFeatureDefn->GetName(),
osFields.c_str(),
pszFIDColumn,
poFeature->GetFID64() );
poFeature->GetFID() );

if ( ! oQuery.Prepare( osSql.c_str() ) )
{
Expand Down Expand Up @@ -881,7 +881,7 @@ OGRErr OGRIDBTableLayer::ICreateFeature( OGRFeature *poFeature )
return eErr;
}

if( poFeature->GetFID64() != OGRNullFID && pszFIDColumn == NULL )
if( poFeature->GetFID() != OGRNullFID && pszFIDColumn == NULL )
{
CPLError( CE_Failure, CPLE_AppDefined,
"FID ignored on feature given to CreateFeature(). Unknown FID column." );
Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/idrisi/ogr_idrisi.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ class OGRIdrisiLayer : public OGRLayer
void SetExtent(double dfMinX, double dfMinY, double dfMaxX, double dfMaxY);
virtual OGRErr GetExtent(OGREnvelope *psExtent, int bForce = TRUE);

virtual GIntBig GetFeatureCount64( int bForce = TRUE );
virtual GIntBig GetFeatureCount( int bForce = TRUE );
};

/************************************************************************/
Expand Down
8 changes: 4 additions & 4 deletions gdal/ogr/ogrsf_frmts/idrisi/ogridrisilayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -564,7 +564,7 @@ void OGRIdrisiLayer::ReadAVLLine(OGRFeature* poFeature)
if (CSLCount(papszTokens) == poFeatureDefn->GetFieldCount())
{
int nID = atoi(papszTokens[0]);
if (nID == poFeature->GetFID64())
if (nID == poFeature->GetFID())
{
int i;
for(i=1;i<poFeatureDefn->GetFieldCount();i++)
Expand Down Expand Up @@ -606,13 +606,13 @@ OGRErr OGRIdrisiLayer::GetExtent(OGREnvelope *psExtent, int bForce)
}

/************************************************************************/
/* GetFeatureCount64() */
/* GetFeatureCount() */
/************************************************************************/

GIntBig OGRIdrisiLayer::GetFeatureCount64( int bForce )
GIntBig OGRIdrisiLayer::GetFeatureCount( int bForce )
{
if (nTotalFeatures > 0 && m_poFilterGeom == NULL && m_poAttrQuery == NULL)
return nTotalFeatures;

return OGRLayer::GetFeatureCount64(bForce);
return OGRLayer::GetFeatureCount(bForce);
}
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/ili/ogr_ili1.h
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ class OGRILI1Layer : public OGRLayer
OGRFeature * GetNextFeatureRef();
OGRFeature * GetFeatureRef( long nFID );

GIntBig GetFeatureCount64( int bForce = TRUE );
GIntBig GetFeatureCount( int bForce = TRUE );

OGRErr ICreateFeature( OGRFeature *poFeature );
int GeometryAppend( OGRGeometry *poGeometry );
Expand Down
2 changes: 1 addition & 1 deletion gdal/ogr/ogrsf_frmts/ili/ogr_ili2.h
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ class OGRILI2Layer : public OGRLayer
void ResetReading();
OGRFeature * GetNextFeature();

GIntBig GetFeatureCount64( int bForce = TRUE );
GIntBig GetFeatureCount( int bForce = TRUE );

OGRErr ICreateFeature( OGRFeature *poFeature );

Expand Down
Loading