@@ -103,7 +103,7 @@ static void PrintAlgorithmAndOptions( GDALGridAlgorithm eAlgorithm,
103
103
{
104
104
case GGA_InverseDistanceToAPower:
105
105
printf ( " Algorithm name: \" %s\" .\n " , szAlgNameInvDist );
106
- printf ( " Options are "
106
+ CPLprintf ( " Options are "
107
107
" \" power=%f:smoothing=%f:radius1=%f:radius2=%f:angle=%f"
108
108
" :max_points=%lu:min_points=%lu:nodata=%f\"\n " ,
109
109
((GDALGridInverseDistanceToAPowerOptions *)pOptions)->dfPower ,
@@ -117,7 +117,7 @@ static void PrintAlgorithmAndOptions( GDALGridAlgorithm eAlgorithm,
117
117
break ;
118
118
case GGA_MovingAverage:
119
119
printf ( " Algorithm name: \" %s\" .\n " , szAlgNameAverage );
120
- printf ( " Options are "
120
+ CPLprintf ( " Options are "
121
121
" \" radius1=%f:radius2=%f:angle=%f:min_points=%lu"
122
122
" :nodata=%f\"\n " ,
123
123
((GDALGridMovingAverageOptions *)pOptions)->dfRadius1 ,
@@ -128,7 +128,7 @@ static void PrintAlgorithmAndOptions( GDALGridAlgorithm eAlgorithm,
128
128
break ;
129
129
case GGA_NearestNeighbor:
130
130
printf ( " Algorithm name: \" %s\" .\n " , szAlgNameNearest );
131
- printf ( " Options are "
131
+ CPLprintf ( " Options are "
132
132
" \" radius1=%f:radius2=%f:angle=%f:nodata=%f\"\n " ,
133
133
((GDALGridNearestNeighborOptions *)pOptions)->dfRadius1 ,
134
134
((GDALGridNearestNeighborOptions *)pOptions)->dfRadius2 ,
@@ -137,7 +137,7 @@ static void PrintAlgorithmAndOptions( GDALGridAlgorithm eAlgorithm,
137
137
break ;
138
138
case GGA_MetricMinimum:
139
139
printf ( " Algorithm name: \" %s\" .\n " , szAlgNameMinimum );
140
- printf ( " Options are "
140
+ CPLprintf ( " Options are "
141
141
" \" radius1=%f:radius2=%f:angle=%f:min_points=%lu"
142
142
" :nodata=%f\"\n " ,
143
143
((GDALGridDataMetricsOptions *)pOptions)->dfRadius1 ,
@@ -148,7 +148,7 @@ static void PrintAlgorithmAndOptions( GDALGridAlgorithm eAlgorithm,
148
148
break ;
149
149
case GGA_MetricMaximum:
150
150
printf ( " Algorithm name: \" %s\" .\n " , szAlgNameMaximum );
151
- printf ( " Options are "
151
+ CPLprintf ( " Options are "
152
152
" \" radius1=%f:radius2=%f:angle=%f:min_points=%lu"
153
153
" :nodata=%f\"\n " ,
154
154
((GDALGridDataMetricsOptions *)pOptions)->dfRadius1 ,
@@ -159,7 +159,7 @@ static void PrintAlgorithmAndOptions( GDALGridAlgorithm eAlgorithm,
159
159
break ;
160
160
case GGA_MetricRange:
161
161
printf ( " Algorithm name: \" %s\" .\n " , szAlgNameRange );
162
- printf ( " Options are "
162
+ CPLprintf ( " Options are "
163
163
" \" radius1=%f:radius2=%f:angle=%f:min_points=%lu"
164
164
" :nodata=%f\"\n " ,
165
165
((GDALGridDataMetricsOptions *)pOptions)->dfRadius1 ,
@@ -170,7 +170,7 @@ static void PrintAlgorithmAndOptions( GDALGridAlgorithm eAlgorithm,
170
170
break ;
171
171
case GGA_MetricCount:
172
172
printf ( " Algorithm name: \" %s\" .\n " , szAlgNameCount );
173
- printf ( " Options are "
173
+ CPLprintf ( " Options are "
174
174
" \" radius1=%f:radius2=%f:angle=%f:min_points=%lu"
175
175
" :nodata=%f\"\n " ,
176
176
((GDALGridDataMetricsOptions *)pOptions)->dfRadius1 ,
@@ -181,7 +181,7 @@ static void PrintAlgorithmAndOptions( GDALGridAlgorithm eAlgorithm,
181
181
break ;
182
182
case GGA_MetricAverageDistance:
183
183
printf ( " Algorithm name: \" %s\" .\n " , szAlgNameAverageDistance );
184
- printf ( " Options are "
184
+ CPLprintf ( " Options are "
185
185
" \" radius1=%f:radius2=%f:angle=%f:min_points=%lu"
186
186
" :nodata=%f\"\n " ,
187
187
((GDALGridDataMetricsOptions *)pOptions)->dfRadius1 ,
@@ -192,7 +192,7 @@ static void PrintAlgorithmAndOptions( GDALGridAlgorithm eAlgorithm,
192
192
break ;
193
193
case GGA_MetricAverageDistancePts:
194
194
printf ( " Algorithm name: \" %s\" .\n " , szAlgNameAverageDistancePts );
195
- printf ( " Options are "
195
+ CPLprintf ( " Options are "
196
196
" \" radius1=%f:radius2=%f:angle=%f:min_points=%lu"
197
197
" :nodata=%f\"\n " ,
198
198
((GDALGridDataMetricsOptions *)pOptions)->dfRadius1 ,
@@ -415,10 +415,10 @@ static CPLErr ProcessLayer( OGRLayerH hSrcLayer, GDALDatasetH hDstDS,
415
415
printf ( " Grid data type is \" %s\"\n " , GDALGetDataTypeName (eType) );
416
416
printf ( " Grid size = (%lu %lu).\n " ,
417
417
(unsigned long )nXSize, (unsigned long )nYSize );
418
- printf ( " Corner coordinates = (%f %f)-(%f %f).\n " ,
418
+ CPLprintf ( " Corner coordinates = (%f %f)-(%f %f).\n " ,
419
419
dfXMin - dfDeltaX / 2 , dfYMax + dfDeltaY / 2 ,
420
420
dfXMax + dfDeltaX / 2 , dfYMin - dfDeltaY / 2 );
421
- printf ( " Grid cell size = (%f %f).\n " , dfDeltaX, dfDeltaY );
421
+ CPLprintf ( " Grid cell size = (%f %f).\n " , dfDeltaX, dfDeltaY );
422
422
printf ( " Source point count = %lu.\n " , (unsigned long )adfX.size () );
423
423
PrintAlgorithmAndOptions ( eAlgorithm, pOptions );
424
424
printf (" \n " );
@@ -700,16 +700,16 @@ int main( int argc, char ** argv )
700
700
else if ( EQUAL (argv[i]," -txe" ) )
701
701
{
702
702
CHECK_HAS_ENOUGH_ADDITIONAL_ARGS (2 );
703
- dfXMin = atof (argv[++i]);
704
- dfXMax = atof (argv[++i]);
703
+ dfXMin = CPLAtof (argv[++i]);
704
+ dfXMax = CPLAtof (argv[++i]);
705
705
bIsXExtentSet = TRUE ;
706
706
}
707
707
708
708
else if ( EQUAL (argv[i]," -tye" ) )
709
709
{
710
710
CHECK_HAS_ENOUGH_ADDITIONAL_ARGS (2 );
711
- dfYMin = atof (argv[++i]);
712
- dfYMax = atof (argv[++i]);
711
+ dfYMin = CPLAtof (argv[++i]);
712
+ dfYMax = CPLAtof (argv[++i]);
713
713
bIsYExtentSet = TRUE ;
714
714
}
715
715
@@ -735,13 +735,13 @@ int main( int argc, char ** argv )
735
735
else if ( EQUAL (argv[i]," -z_increase" ) )
736
736
{
737
737
CHECK_HAS_ENOUGH_ADDITIONAL_ARGS (1 );
738
- dfIncreaseBurnValue = atof (argv[++i]);
738
+ dfIncreaseBurnValue = CPLAtof (argv[++i]);
739
739
}
740
740
741
741
else if ( EQUAL (argv[i]," -z_multiply" ) )
742
742
{
743
743
CHECK_HAS_ENOUGH_ADDITIONAL_ARGS (1 );
744
- dfMultiplyBurnValue = atof (argv[++i]);
744
+ dfMultiplyBurnValue = CPLAtof (argv[++i]);
745
745
}
746
746
747
747
else if ( EQUAL (argv[i]," -where" ) )
@@ -767,11 +767,11 @@ int main( int argc, char ** argv )
767
767
CHECK_HAS_ENOUGH_ADDITIONAL_ARGS (4 );
768
768
OGRLinearRing oRing;
769
769
770
- oRing.addPoint ( atof (argv[i+1 ]), atof (argv[i+2 ]) );
771
- oRing.addPoint ( atof (argv[i+1 ]), atof (argv[i+4 ]) );
772
- oRing.addPoint ( atof (argv[i+3 ]), atof (argv[i+4 ]) );
773
- oRing.addPoint ( atof (argv[i+3 ]), atof (argv[i+2 ]) );
774
- oRing.addPoint ( atof (argv[i+1 ]), atof (argv[i+2 ]) );
770
+ oRing.addPoint ( CPLAtof (argv[i+1 ]), CPLAtof (argv[i+2 ]) );
771
+ oRing.addPoint ( CPLAtof (argv[i+1 ]), CPLAtof (argv[i+4 ]) );
772
+ oRing.addPoint ( CPLAtof (argv[i+3 ]), CPLAtof (argv[i+4 ]) );
773
+ oRing.addPoint ( CPLAtof (argv[i+3 ]), CPLAtof (argv[i+2 ]) );
774
+ oRing.addPoint ( CPLAtof (argv[i+1 ]), CPLAtof (argv[i+2 ]) );
775
775
776
776
poSpatialFilter = new OGRPolygon ();
777
777
((OGRPolygon *) poSpatialFilter)->addRing ( &oRing );
@@ -793,11 +793,11 @@ int main( int argc, char ** argv )
793
793
{
794
794
OGRLinearRing oRing;
795
795
796
- oRing.addPoint ( atof (argv[i + 1 ]), atof (argv[i + 2 ]) );
797
- oRing.addPoint ( atof (argv[i + 1 ]), atof (argv[i + 4 ]) );
798
- oRing.addPoint ( atof (argv[i + 3 ]), atof (argv[i + 4 ]) );
799
- oRing.addPoint ( atof (argv[i + 3 ]), atof (argv[i + 2 ]) );
800
- oRing.addPoint ( atof (argv[i + 1 ]), atof (argv[i + 2 ]) );
796
+ oRing.addPoint ( CPLAtof (argv[i + 1 ]), CPLAtof (argv[i + 2 ]) );
797
+ oRing.addPoint ( CPLAtof (argv[i + 1 ]), CPLAtof (argv[i + 4 ]) );
798
+ oRing.addPoint ( CPLAtof (argv[i + 3 ]), CPLAtof (argv[i + 4 ]) );
799
+ oRing.addPoint ( CPLAtof (argv[i + 3 ]), CPLAtof (argv[i + 2 ]) );
800
+ oRing.addPoint ( CPLAtof (argv[i + 1 ]), CPLAtof (argv[i + 2 ]) );
801
801
802
802
poClipSrc = new OGRPolygon ();
803
803
((OGRPolygon *) poClipSrc)->addRing ( &oRing );
0 commit comments