Skip to content

Commit 257109a

Browse files
committed
Uncomment tests. Update from review.
1 parent a42b73b commit 257109a

File tree

2 files changed

+7
-9
lines changed

2 files changed

+7
-9
lines changed

apps/gdalalg_raster_viewshed.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ bool GDALRasterViewshedAlgorithm::RunStep(GDALPipelineStepRunContext &ctxt)
164164
GDALRasterBandH sdBand = nullptr;
165165
if (GetArg("sd-filename")->IsExplicitlySet())
166166
{
167-
GDALDatasetH ds = GDALOpen(m_sdFilename.c_str(), GA_ReadOnly);
167+
GDALDatasetH ds = GDALOpen(m_sdFilename.GetName().c_str(), GA_ReadOnly);
168168
sdDataset.reset(GDALDataset::FromHandle(ds));
169169
sdBand = sdDataset->GetRasterBand(1);
170170
}

autotest/cpp/test_viewshed.cpp

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1010,19 +1010,18 @@ TEST(Viewshed, sd_2)
10101010
}
10111011
}
10121012
}
1013-
/**
10141013
// Right, up
10151014
{
10161015
// clang-format off
10171016
const int xlen = 8;
10181017
const int ylen = 2;
1019-
std::array<float, xlen * ylen> in
1018+
std::array<double, xlen * ylen> in
10201019
{
10211020
0, 1.1, 1.4, 3.1, 1.5, 2.7, 3.7, 7.5, // Row 0
10221021
0, 1, 1, 3.1, 1.5, 2.7, 3.7, 7.5 // Row 1
10231022
};
10241023

1025-
std::array<float, xlen * ylen> sd
1024+
std::array<double, xlen * ylen> sd
10261025
{
10271026
1, 100, .1, 100, .1, .1, 100, .1, // Row 0
10281027
1, 100, .1, 100, .1, .1, 100, .1 // Row 1
@@ -1064,13 +1063,13 @@ TEST(Viewshed, sd_2)
10641063
// clang-format off
10651064
const int xlen = 8;
10661065
const int ylen = 2;
1067-
std::array<float, xlen * ylen> in
1066+
std::array<double, xlen * ylen> in
10681067
{
10691068
7.5, 3.7, 2.7, 1.5, 3.1, 1, 1, 0, // Row 0
10701069
7.5, 3.7, 2.7, 1.5, 3.1, 1.4, 1.1, 0 // Row 1
10711070
};
10721071

1073-
std::array<float, xlen * ylen> sd
1072+
std::array<double, xlen * ylen> sd
10741073
{
10751074
.1, 100, .1, .1, 100, .1, 100, 1, // Row 0
10761075
.1, 100, .1, .1, 100, .1, 100, 1 // Row 1
@@ -1112,13 +1111,13 @@ TEST(Viewshed, sd_2)
11121111
// clang-format off
11131112
const int xlen = 8;
11141113
const int ylen = 2;
1115-
std::array<float, xlen * ylen> in
1114+
std::array<double, xlen * ylen> in
11161115
{
11171116
7.5, 3.7, 2.7, 1.5, 3.1, 1.4, 1.1, 0, // Row 0
11181117
7.5, 3.7, 2.7, 1.5, 3.1, 1, 1, 0 // Row 1
11191118
};
11201119

1121-
std::array<float, xlen * ylen> sd
1120+
std::array<double, xlen * ylen> sd
11221121
{
11231122
.1, 100, .1, .1, 100, .1, 100, 1, // Row 0
11241123
.1, 100, .1, .1, 100, .1, 100, 1 // Row 1
@@ -1154,7 +1153,6 @@ TEST(Viewshed, sd_2)
11541153
}
11551154
}
11561155
}
1157-
**/
11581156
}
11591157

11601158
} // namespace viewshed

0 commit comments

Comments
 (0)