Skip to content

Commit

Permalink
Remove ErrLogger from ViewShed() call where it's not used
Browse files Browse the repository at this point in the history
  • Loading branch information
pericles-tpt committed Jan 28, 2025
1 parent 9f67065 commit f67b649
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions godal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4442,19 +4442,19 @@ func TestGridInvalidSwitch(t *testing.T) {

// Test Ported from: https://github.com/OSGeo/gdal/blob/6cdae8b8f7d09ecf67e24959e984d2e7bbe3ee62/autotest/cpp/test_viewshed.cpp#L98
func TestViewshedSimpleHeight(t *testing.T) {
ehc := eh()
if !CheckMinVersion(3, 1, 0) {
_, err := Viewshed(Band{}, nil, "none", 1, 1, 0, 0, 255, 0, 0, -1, 0, MEdge, 0, Normal, ErrLogger(ehc.ErrorHandler))
_, err := Viewshed(Band{}, nil, "none", 1, 1, 0, 0, 255, 0, 0, -1, 0, MEdge, 0, Normal)
assert.EqualError(t, err, "failed to run, 'viewshed' not supported on GDAL versions < 3.1.0")
return
} else if !CheckMinVersion(3, 4, 2) {
_, err := Viewshed(Band{}, nil, "none", 1, 1, 0, 0, 255, 0, 0, -1, 0, MEdge, 0, Normal, ErrLogger(ehc.ErrorHandler))
_, err := Viewshed(Band{}, nil, "none", 1, 1, 0, 0, 255, 0, 0, -1, 0, MEdge, 0, Normal)
assert.EqualError(t, err, "cannot run 'viewshed' with GDAL version <= 3.4.1, as some tests produce invalid results under these conditions")
return
}

// setup common to all scopes
var (
ehc = eh()
driver = DriverName("MEM")

identity = [6]float64{0, 1, 0, 0, 0, 1}
Expand Down

0 comments on commit f67b649

Please sign in to comment.