Skip to content

Commit

Permalink
typo fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
rouault committed May 6, 2022
1 parent f60021d commit 1c05a5c
Show file tree
Hide file tree
Showing 12 changed files with 26 additions and 26 deletions.
2 changes: 1 addition & 1 deletion alg/gdalgeoloc.h
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ static double ShiftGeoX(const GDALGeoLocTransformInfo *psTransform,
{
if( !psTransform->bGeographicSRSWithMinus180Plus180LongRange )
return dfX;
// The threshold at 170 deg is a bit arbitary. A smarter approach
// The threshold at 170 deg is a bit arbitrary. A smarter approach
// would try to guess the "average" longitude step between 2 grid values
// and use 180 - average_step * some_factor as the threshold.
if( dfXRef < -170 && dfX > 170 )
Expand Down
18 changes: 9 additions & 9 deletions alg/gdalgrid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2024,7 +2024,7 @@ GDALGridContextCreate( GDALGridAlgorithm eAlgorithm, const void *poOptions,
CPLAssert( padfZ );
bool bCreateQuadTree = false;

const unsigned int nPointCountTreshold = atoi(CPLGetConfigOption("GDAL_GRID_POINT_COUNT_THRESHOLD", "100"));
const unsigned int nPointCountThreshold = atoi(CPLGetConfigOption("GDAL_GRID_POINT_COUNT_THRESHOLD", "100"));

// Starting address aligned on 32-byte boundary for AVX.
float* pafXAligned = nullptr;
Expand Down Expand Up @@ -2165,7 +2165,7 @@ GDALGridContextCreate( GDALGridAlgorithm eAlgorithm, const void *poOptions,
sizeof(GDALGridMovingAverageOptions));

pfnGDALGridMethod = GDALGridMovingAverage;
bCreateQuadTree = (nPoints > nPointCountTreshold &&
bCreateQuadTree = (nPoints > nPointCountThreshold &&
static_cast<const GDALGridMovingAverageOptions *>(poOptions)->dfAngle == 0.0 &&
static_cast<const GDALGridMovingAverageOptions *>(poOptions)->dfRadius1 ==
static_cast<const GDALGridMovingAverageOptions *>(poOptions)->dfRadius2 &&
Expand All @@ -2179,7 +2179,7 @@ GDALGridContextCreate( GDALGridAlgorithm eAlgorithm, const void *poOptions,
sizeof(GDALGridNearestNeighborOptions));

pfnGDALGridMethod = GDALGridNearestNeighbor;
bCreateQuadTree = (nPoints > nPointCountTreshold &&
bCreateQuadTree = (nPoints > nPointCountThreshold &&
static_cast<const GDALGridNearestNeighborOptions *>(poOptions)->dfAngle == 0.0 &&
static_cast<const GDALGridNearestNeighborOptions *>(poOptions)->dfRadius1 ==
static_cast<const GDALGridNearestNeighborOptions *>(poOptions)->dfRadius2 &&
Expand All @@ -2192,7 +2192,7 @@ GDALGridContextCreate( GDALGridAlgorithm eAlgorithm, const void *poOptions,
memcpy(poOptionsNew, poOptions, sizeof(GDALGridDataMetricsOptions));

pfnGDALGridMethod = GDALGridDataMetricMinimum;
bCreateQuadTree = (nPoints > nPointCountTreshold &&
bCreateQuadTree = (nPoints > nPointCountThreshold &&
static_cast<const GDALGridDataMetricsOptions *>(poOptions)->dfAngle == 0.0 &&
static_cast<const GDALGridDataMetricsOptions *>(poOptions)->dfRadius1 ==
static_cast<const GDALGridDataMetricsOptions *>(poOptions)->dfRadius2 &&
Expand All @@ -2205,7 +2205,7 @@ GDALGridContextCreate( GDALGridAlgorithm eAlgorithm, const void *poOptions,
memcpy(poOptionsNew, poOptions, sizeof(GDALGridDataMetricsOptions));

pfnGDALGridMethod = GDALGridDataMetricMaximum;
bCreateQuadTree = (nPoints > nPointCountTreshold &&
bCreateQuadTree = (nPoints > nPointCountThreshold &&
static_cast<const GDALGridDataMetricsOptions *>(poOptions)->dfAngle == 0.0 &&
static_cast<const GDALGridDataMetricsOptions *>(poOptions)->dfRadius1 ==
static_cast<const GDALGridDataMetricsOptions *>(poOptions)->dfRadius2 &&
Expand All @@ -2218,7 +2218,7 @@ GDALGridContextCreate( GDALGridAlgorithm eAlgorithm, const void *poOptions,
memcpy(poOptionsNew, poOptions, sizeof(GDALGridDataMetricsOptions));

pfnGDALGridMethod = GDALGridDataMetricRange;
bCreateQuadTree = (nPoints > nPointCountTreshold &&
bCreateQuadTree = (nPoints > nPointCountThreshold &&
static_cast<const GDALGridDataMetricsOptions *>(poOptions)->dfAngle == 0.0 &&
static_cast<const GDALGridDataMetricsOptions *>(poOptions)->dfRadius1 ==
static_cast<const GDALGridDataMetricsOptions *>(poOptions)->dfRadius2 &&
Expand All @@ -2231,7 +2231,7 @@ GDALGridContextCreate( GDALGridAlgorithm eAlgorithm, const void *poOptions,
memcpy(poOptionsNew, poOptions, sizeof(GDALGridDataMetricsOptions));

pfnGDALGridMethod = GDALGridDataMetricCount;
bCreateQuadTree = (nPoints > nPointCountTreshold &&
bCreateQuadTree = (nPoints > nPointCountThreshold &&
static_cast<const GDALGridDataMetricsOptions *>(poOptions)->dfAngle == 0.0 &&
static_cast<const GDALGridDataMetricsOptions *>(poOptions)->dfRadius1 ==
static_cast<const GDALGridDataMetricsOptions *>(poOptions)->dfRadius2 &&
Expand All @@ -2244,7 +2244,7 @@ GDALGridContextCreate( GDALGridAlgorithm eAlgorithm, const void *poOptions,
memcpy(poOptionsNew, poOptions, sizeof(GDALGridDataMetricsOptions));

pfnGDALGridMethod = GDALGridDataMetricAverageDistance;
bCreateQuadTree = (nPoints > nPointCountTreshold &&
bCreateQuadTree = (nPoints > nPointCountThreshold &&
static_cast<const GDALGridDataMetricsOptions *>(poOptions)->dfAngle == 0.0 &&
static_cast<const GDALGridDataMetricsOptions *>(poOptions)->dfRadius1 ==
static_cast<const GDALGridDataMetricsOptions *>(poOptions)->dfRadius2 &&
Expand All @@ -2257,7 +2257,7 @@ GDALGridContextCreate( GDALGridAlgorithm eAlgorithm, const void *poOptions,
memcpy(poOptionsNew, poOptions, sizeof(GDALGridDataMetricsOptions));

pfnGDALGridMethod = GDALGridDataMetricAverageDistancePts;
bCreateQuadTree = (nPoints > nPointCountTreshold &&
bCreateQuadTree = (nPoints > nPointCountThreshold &&
static_cast<const GDALGridDataMetricsOptions *>(poOptions)->dfAngle == 0.0 &&
static_cast<const GDALGridDataMetricsOptions *>(poOptions)->dfRadius1 ==
static_cast<const GDALGridDataMetricsOptions *>(poOptions)->dfRadius2 &&
Expand Down
2 changes: 1 addition & 1 deletion apps/gdal_translate_lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1091,7 +1091,7 @@ GDALDatasetH GDALTranslate( const char *pszDest, GDALDatasetH hSrcDataset,
{
CPLPushErrorHandler(CPLQuietErrorHandler);
// We need to reopen in a temporary dataset for the particular
// case of overwriten a .tif.ovr file from a .tif
// case of overwritten a .tif.ovr file from a .tif
// If we probe the file list of the .tif, it will then open the
// .tif.ovr !
auto poSrcDS = GDALDataset::FromHandle(hSrcDataset);
Expand Down
2 changes: 1 addition & 1 deletion apps/gdalwarp_lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3228,7 +3228,7 @@ GDALWarpCreateOutput( int nSrcCount, GDALDatasetH *pahSrcDS, const char *pszFile
if( !oSetExistingDestFiles.empty() )
{
// We need to reopen in a temporary dataset for the particular
// case of overwriten a .tif.ovr file from a .tif
// case of overwritten a .tif.ovr file from a .tif
// If we probe the file list of the .tif, it will then open the
// .tif.ovr !
auto poSrcDS = GDALDataset::FromHandle(hSrcDS);
Expand Down
2 changes: 1 addition & 1 deletion gcore/gdalcachedpixelaccessor.h
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ Type GDALCachedPixelAccessor<Type, TILE_SIZE, CACHED_TILE_COUNT>::GetSlowPath(

/** Set the value of a pixel.
*
* The actual modification of the underlying raster is defered until the tile
* The actual modification of the underlying raster is deferred until the tile
* is implicit flushed while loading a new tile, or an explicit call to
* FlushCache().
*
Expand Down
2 changes: 1 addition & 1 deletion gcore/gdaldriver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1080,7 +1080,7 @@ GDALDataset *GDALDriver::CreateCopy( const char * pszFilename,
{
CPLPushErrorHandler(CPLQuietErrorHandler);
// We need to reopen in a temporary dataset for the particular
// case of overwriten a .tif.ovr file from a .tif
// case of overwritten a .tif.ovr file from a .tif
// If we probe the file list of the .tif, it will then open the
// .tif.ovr !
const char* const apszAllowedDrivers[] = {
Expand Down
2 changes: 1 addition & 1 deletion ogr/ogr_feature.h
Original file line number Diff line number Diff line change
Expand Up @@ -734,7 +734,7 @@ class CPL_DLL OGRFeature
pauFields[i].Integer = nValue; pauFields[i].Set.nMarker2 = 0; pauFields[i].Set.nMarker3 = 0; }
void SetFieldSameTypeUnsafe( int i, GIntBig nValue ) { pauFields[i].Integer64 = nValue; }
void SetFieldSameTypeUnsafe( int i, double dfValue ) { pauFields[i].Real = dfValue; }
void SetFieldSameTypeUnsafe( int i, char* pszValueTransfered ) { pauFields[i].String = pszValueTransfered; }
void SetFieldSameTypeUnsafe( int i, char* pszValueTransferred ) { pauFields[i].String = pszValueTransferred; }
//! @endcond

void SetField( const char *pszFName, int nValue )
Expand Down
2 changes: 1 addition & 1 deletion ogr/ogrsf_frmts/hana/ogr_hana.h
Original file line number Diff line number Diff line change
Expand Up @@ -314,7 +314,7 @@ class OGRHanaDataSource final : public GDALDataset
OGRErr GetQueryColumns(
const CPLString& schemaName,
const CPLString& query,
std::vector<OGRHANA::ColumnDescription>& columDescriptions);
std::vector<OGRHANA::ColumnDescription>& columnDescriptions);
std::vector<CPLString> GetTablePrimaryKeys(
const char* schemaName, const char* tableName);

Expand Down
10 changes: 5 additions & 5 deletions ogr/ogrsf_frmts/hana/ogrhanadatasource.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1066,9 +1066,9 @@ bool OGRHanaDataSource::HasSrsPlanarEquivalent(int srid)
OGRErr OGRHanaDataSource::GetQueryColumns(
const CPLString& schemaName,
const CPLString& query,
std::vector<ColumnDescription>& columDescriptions)
std::vector<ColumnDescription>& columnDescriptions)
{
columDescriptions.clear();
columnDescriptions.clear();

odbc::PreparedStatementRef stmtQuery;

Expand All @@ -1089,7 +1089,7 @@ OGRErr OGRHanaDataSource::GetQueryColumns(
if (numColumns == 0)
return OGRERR_NONE;

columDescriptions.reserve(numColumns);
columnDescriptions.reserve(numColumns);

CPLString tableName = rsmd->getTableName(1);
odbc::DatabaseMetaDataRef dmd = conn_->getDatabaseMetaData();
Expand Down Expand Up @@ -1186,7 +1186,7 @@ OGRErr OGRHanaDataSource::GetQueryColumns(
*conn_, schemaName, tableName, columnName, detectGeometryType_);
geometryColumnDesc.isNullable = rsmd->isNullable(clmIndex);

columDescriptions.push_back(
columnDescriptions.push_back(
{true, AttributeColumnDescription(), geometryColumnDesc});
}
else
Expand All @@ -1205,7 +1205,7 @@ OGRErr OGRHanaDataSource::GetQueryColumns(
attributeColumnDesc.scale = rsmd->getScale(clmIndex);
attributeColumnDesc.defaultValue = defaultValue;

columDescriptions.push_back(
columnDescriptions.push_back(
{false, attributeColumnDesc, GeometryColumnDescription()});
}
}
Expand Down
2 changes: 1 addition & 1 deletion ogr/ogrsf_frmts/hana/ogrhanatablelayer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1386,7 +1386,7 @@ OGRErr OGRHanaTableLayer::CreateField(OGRFieldDefn* srsField, int approxOK)
return OGRERR_FAILURE;
}

// columnTypeInfo might contain a different defintion due to custom column types
// columnTypeInfo might contain a different definition due to custom column types
SetFieldDefn(dstField, columnTypeInfo);

AttributeColumnDescription clmDesc;
Expand Down
6 changes: 3 additions & 3 deletions port/cpl_quad_tree.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -661,14 +661,14 @@ static void CPLQuadTreeNodeAddFeatureAlg1( CPLQuadTree* hQuadTree,
if( hQuadTree->bForceUseOfSubNodes )
{
bool overlaps[4];
bool overlapAlls = true;
bool overlapAll = true;
for( int i = 0; i < psNode->nNumSubNodes; i++ )
{
overlaps[i] = CPL_RectOverlap(pRect, &psNode->apSubNode[i]->rect);
if( !overlaps[i] )
overlapAlls = false;
overlapAll = false;
}
if( !overlapAlls )
if( !overlapAll )
{
for( int i = 0; i < psNode->nNumSubNodes; i++ )
{
Expand Down
2 changes: 1 addition & 1 deletion swig/python/gdal-utils/test-ubuntu-install.sh.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ export C_INCLUDE_PATH=/usr/include/gdal
# Install python GDAL bindings
pip install gdal
# note: this could be `sudo apt-get install python3-gdal` instead but
# pip method is prefered, better tested
# pip method is preferred, better tested

# install gdal-utilities from source
# (assumes git clone etc. are already done)
Expand Down

0 comments on commit 1c05a5c

Please sign in to comment.