Skip to content

prepInputs tests failing due to different extents #93

Closed

Description

@achubaty

Some prepInputs tests not run on appveyor/travis/CRAN are failing:

4. Failure: prepInputs doesn't work (@test-prepInputs.R#148) 
5. Failure: prepInputs doesn't work (@test-prepInputs.R#264) 

Both fail because of non-matching extents:

> extent(LCC2005)[1:4]
[1] -1473500  -202250  7283000  8563250
> round(extent(StudyAreaCRSLCC2005)[1:4] / 250, 0) * 250
[1] -1473750  -202000  7282750  8563250

Activity

  1. added a commit that references this issue on Jan 8, 2019
  2. achubaty commented on Mar 1, 2019

    @achubaty
    CollaboratorAuthor

    this is still failing, but now with different values:

    > extent(LCC2005)[1:4]
    [1] -1710250  -186750  7231750  8678500
    > round(extent(StudyAreaCRSLCC2005)[1:4] / 250, 0) * 250
    [1] -1473750  -202000  7282750  8563250
  3. added a commit that references this issue on Mar 1, 2019
  4. eliotmcintire commented on Mar 15, 2019

    @eliotmcintire
    Contributor

    Fixed with cc75c4d

    It was a case of intransitivity of operations...
    Needed to spTransform the studyArea directly in cropInputs, instead of the much faster/simpler spTransform of the extent of studyArea. These are the same if the studyArea fills the extent (like a Raster does), but it is not correct otherwise.

  5. added a commit that references this issue on Mar 15, 2019
  6. achubaty commented on Oct 4, 2019

    @achubaty
    CollaboratorAuthor

    seems this is back (on macOS at least). need to confirm we didn't lose the prev fix somehow in merge problems. otherwise need to revisit.

  7. achubaty commented on Oct 4, 2019

    @achubaty
    CollaboratorAuthor

    this change exists in development branch...so something else is going on, producing same error.

    1. Failure: prepInputs doesn't work (part 1) (@test-prepInputs.R#152) 
    extent(LCC2005)[1:4] not identical to round(extent(StudyAreaCRSLCC2005)[1:4]/250, 0) * 250.
    4/4 mismatches (average diff: 12.6)
    [1] -1473725 - -1473750 == 25.067
    [2]  -201975 -  -202000 == 25.067
    [3]  7282750 -  7282750 ==  0.127
    [4]  8563250 -  8563250 ==  0.127
    2. Failure: prepInputs doesn't work (part 1) (@test-prepInputs.R#274) 
    extent(LCC2005)[1:4] not identical to round(extent(StudyAreaCRSLCC2005)[1:4]/250, 0) * 250.
    4/4 mismatches (average diff: 12.6)
    [1] -1473725 - -1473750 == 25.067
    [2]  -201975 -  -202000 == 25.067
    [3]  7282750 -  7282750 ==  0.127
    [4]  8563250 -  8563250 ==  0.127
    
  8. changed the title [-]prepInputs tests failing[/-] [+]prepInputs tests failing due to different extents[/+] on Oct 4, 2019
  9. added a commit that references this issue on Feb 17, 2020
    a567b68
  10. achubaty commented on Feb 17, 2020

    @achubaty
    CollaboratorAuthor

    resolved in a567b68

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions