Skip to content

Commit 1f4a9b1

Browse files
committed
Eliminate CI issues?
1 parent 93d25e2 commit 1f4a9b1

File tree

3 files changed

+15
-14
lines changed

3 files changed

+15
-14
lines changed

apps/gdalalg_raster_viewshed.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ class GDALRasterViewshedAlgorithm /* non final */
4343
std::string m_outputMode = "normal";
4444
int m_band = 1;
4545
int m_numThreads = 3;
46-
std::string m_sdFilename;
46+
std::string m_sdFilename{};
4747

4848
// Work variables
4949
std::string m_numThreadsStr{};

autotest/cpp/test_viewshed.cpp

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ DatasetPtr runViewshed(const int8_t *in, int xlen, int ylen,
6969
return v.output();
7070
}
7171

72-
DatasetPtr runViewshed(const float *in, const float *sd, int xlen, int ylen,
72+
DatasetPtr runViewshed(const double *in, const double *sd, int xlen, int ylen,
7373
const Options &opts)
7474
{
7575
Viewshed v(opts);
@@ -82,12 +82,12 @@ DatasetPtr runViewshed(const float *in, const float *sd, int xlen, int ylen,
8282
GDALRasterBand *band = dataset->GetRasterBand(1);
8383
EXPECT_TRUE(band);
8484
CPLErr err = band->RasterIO(GF_Write, 0, 0, xlen, ylen, (void *)in, xlen,
85-
ylen, GDT_Float32, 0, 0, nullptr);
85+
ylen, GDT_Float64, 0, 0, nullptr);
8686
EXPECT_EQ(err, CE_None);
8787
GDALRasterBand *sdBand = dataset->GetRasterBand(2);
8888
EXPECT_TRUE(sdBand);
8989
err = sdBand->RasterIO(GF_Write, 0, 0, xlen, ylen, (void *)sd, xlen, ylen,
90-
GDT_Float32, 0, 0, nullptr);
90+
GDT_Float64, 0, 0, nullptr);
9191
EXPECT_EQ(err, CE_None);
9292

9393
EXPECT_TRUE(v.run(band, sdBand));
@@ -791,12 +791,12 @@ TEST(Viewshed, sd)
791791
// clang-format off
792792
const int xlen = 8;
793793
const int ylen = 1;
794-
std::array<float, xlen * ylen> in
794+
std::array<double, xlen * ylen> in
795795
{
796796
0, 1, 1, 3.1, 1.5, 2.7, 3.7, 7.5
797797
};
798798

799-
std::array<float, xlen * ylen> sd
799+
std::array<double, xlen * ylen> sd
800800
{
801801
1, 100, .1, 100, .1, .1, 100, .1
802802
};
@@ -829,12 +829,12 @@ TEST(Viewshed, sd)
829829
// clang-format off
830830
const int xlen = 8;
831831
const int ylen = 1;
832-
std::array<float, xlen * ylen> in
832+
std::array<double, xlen * ylen> in
833833
{
834834
7.5, 3.7, 2.7, 1.5, 3.1, 1, 1, 0
835835
};
836836

837-
std::array<float, xlen * ylen> sd
837+
std::array<double, xlen * ylen> sd
838838
{
839839
.1, 100, .1, .1, 100, .1, 100, 1
840840
};
@@ -873,12 +873,12 @@ TEST(Viewshed, sd_up_down)
873873
// clang-format off
874874
const int xlen = 1;
875875
const int ylen = 8;
876-
std::array<float, xlen * ylen> in
876+
std::array<double, xlen * ylen> in
877877
{
878878
0, 1, 1, 3.1, 1.5, 2.7, 3.7, 7.5
879879
};
880880

881-
std::array<float, xlen * ylen> sd
881+
std::array<double, xlen * ylen> sd
882882
{
883883
1, 100, .1, 100, .1, .1, 100, .1
884884
};
@@ -912,12 +912,12 @@ TEST(Viewshed, sd_up_down)
912912
// clang-format off
913913
const int xlen = 1;
914914
const int ylen = 8;
915-
std::array<float, xlen * ylen> in
915+
std::array<double, xlen * ylen> in
916916
{
917917
7.5, 3.7, 2.7, 1.5, 3.1, 1, 1, 0
918918
};
919919

920-
std::array<float, xlen * ylen> sd
920+
std::array<double, xlen * ylen> sd
921921
{
922922
.1, 100, .1, .1, 100, .1, 100, 1
923923
};
@@ -955,13 +955,13 @@ TEST(Viewshed, sd_2)
955955
// clang-format off
956956
const int xlen = 8;
957957
const int ylen = 2;
958-
std::array<float, xlen * ylen> in
958+
std::array<double, xlen * ylen> in
959959
{
960960
0, 1, 1, 3.1, 1.5, 2.7, 3.7, 7.5, // Row 0
961961
0, 1.1, 1.4, 3.1, 1.5, 2.7, 3.7, 7.5 // Row 1
962962
};
963963

964-
std::array<float, xlen * ylen> sd
964+
std::array<double, xlen * ylen> sd
965965
{
966966
1, 100, .1, 100, .1, .1, 100, .1, // Row 0
967967
1, 100, .1, 100, .1, .1, 100, .1 // Row 1

doc/source/spelling_wordlist.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -747,6 +747,7 @@ dstType
747747
dt
748748
dT
749749
dtype
750+
DummyBand
750751
DUnits
751752
dValue
752753
dve

0 commit comments

Comments
 (0)