Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make tests more robust to new GDAL / GEOS / PROJ #158

Open
visr opened this issue Dec 27, 2020 · 0 comments
Open

make tests more robust to new GDAL / GEOS / PROJ #158

visr opened this issue Dec 27, 2020 · 0 comments

Comments

@visr
Copy link
Collaborator

visr commented Dec 27, 2020

Right now when updating the minor version of the binaries, the ArchGDAL tests usually fail due to minor differences. See for instance #157.

It would be better to modify the tests to be less sensitive to these changes.

For PROJ, we already test with isapprox but probably need to introduce a larger absolute difference (@test π ≈ 3.14 atol=0.01). One millimeter differences are probably not interesting to us anyway, we just want to make sure PROJ is doing the projection.

For GEOS, the tests often rely on WKT string comparison. However the node ordering is subject to changes, as well as the geometry ordering in a GeometryCollection. Hence it is probably better to move away from WKT string comparison, and just test if the geometries are ArchGDAL.equals, like was done in JuliaGeo/LibGEOS.jl#81.

@yeesian yeesian added this to the v1.0 milestone May 15, 2021
visr added a commit that referenced this issue Sep 22, 2023
Ref #158, this is probably due to GEOS 3.12
yeesian pushed a commit that referenced this issue Oct 1, 2023
* avoid overwriting TestEnum from other test file

Fixes these test warnings:
```
WARNING: Method definition (::Type{Main.TestEnum})(Integer) in module Main at Enums.jl:210 overwritten on the same line (check for duplicate calls to `include`).
WARNING: Method definition namemap(Type{Main.TestEnum}) in module Main at Enums.jl:214 overwritten on the same line (check for duplicate calls to `include`).
WARNING: Method definition typemin(Type{Main.TestEnum}) in module Main at Enums.jl:215 overwritten on the same line (check for duplicate calls to `include`).
WARNING: Method definition typemax(Type{Main.TestEnum}) in module Main at Enums.jl:216 overwritten on the same line (check for duplicate calls to `include`).
WARNING: Method definition _enum_hash(Main.TestEnum, UInt64) in module Main at Enums.jl:222 overwritten on the same line (check for duplicate calls to `include`).
WARNING: Method definition instances(Type{Main.TestEnum}) in module Main at Enums.jl:225 overwritten on the same line (check for duplicate calls to `include`).
```

* don't test FlatGeoBuf with NULL geometry

GDAL 3.7.2 says it's not supported with a spatial index:

```
GDALError (CE_Failure, code 1):
        ICreateFeature: NULL geometry not supported with spatial index

  Stacktrace:
    [1] maybe_throw
      @ ArchGDAL C:\Users\visser_mn\.julia\dev\GDAL\src\error.jl:42 [inlined]
    [2] aftercare
      @ ArchGDAL C:\Users\visser_mn\.julia\dev\GDAL\src\error.jl:59 [inlined]
    [3] ogr_l_createfeature
      @ ArchGDAL C:\Users\visser_mn\.julia\dev\GDAL\src\libgdal.jl:28286 [inlined]
```

* update coordinate order in test

Ref #158, this is probably due to GEOS 3.12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants