Skip to content

Infected compartment spatRaster layer is severely bugged #25

@bryce-carson

Description

@bryce-carson

Background

During testing of recent documentation changes, and a small readability refactor, a fatal error condition I had written surfaced. During inspection I found that the Infected layer is wildly incorrect, with cells exhibiting a strange latitudinal pattern.

I need to resolve this, and I imagine that once I do it will also resolve issue #24.

Susceptible

susceptibleClassifiedNA1E6

Infected

infectedClassifiedNA1E6

Population

This plot shows that a newly acquired raster of class SpatRaster with no aggregation does not actually contain NAs where I thought it did. The values in the raster outside of what is the Democratic Republic of the Congo (the spatial domain of the DRC), are also zero, like zero values within its spatial domain, not NA.

cod <- getCountryPopulation.SpatRaster("COD")
terra::plot(terra::classify(cod, cuts, right = FALSE), colNA = "black")
any(is.na(values(cod))) # FALSE

populationNA01E6

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions