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

fix tests with GDAL 3.7.2 #395

Merged
merged 3 commits into from
Oct 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions test/test_feature.jl
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ using Test
import ArchGDAL as AG
import GeoInterface as GI

@enum TestEnum::Bool begin
EnumValue = false
@enum MyEnum::Bool begin
MyEnumValue = false
end

@testset "test_feature.jl" begin
Expand Down Expand Up @@ -282,7 +282,7 @@ end
AG.setfield!(feature, 15, geojsonstring)
AG.setfield!(feature, 16, UInt16(1.0))
AG.setfield!(feature, 17, UInt32(1.0))
AG.setfield!(feature, 18, EnumValue)
AG.setfield!(feature, 18, MyEnumValue)
for i in 1:AG.nfield(feature)
@test !AG.isfieldnull(feature, i - 1)
@test AG.isfieldsetandnotnull(feature, i - 1)
Expand Down
24 changes: 12 additions & 12 deletions test/test_tables.jl
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ using Tables
- `"GeoJSON"` driver → 1 layer with 2 geometry columns
- `"ESRI Shapefile"` driver → 2 layers with 1 geometry column
1) with `wkbLineString` and `wkbMultiLineString` types
2) with `wkbPolygon`, `wkbMultiPolygon` types
2) with `wkbPolygon`, `wkbMultiPolygon` types
- Layers' geometry type set to `wkbUnknown` but modified by the OGR driver according to its specifications,
- Each geometry has two additionnal fields `id::Int64` and `name::String`

Expand Down Expand Up @@ -354,11 +354,11 @@ using Tables
"""
map_on_test_dataset(
f::Function,
drvshortname::AbstractString="ESRI shapefile",
geomfamily::String="line";
drvshortname::AbstractString="ESRI shapefile",
geomfamily::String="line";
withmissinggeom::Bool=true,
withmissingfield::Bool=true,
withmixedgeomtypes::Bool=true,
withmixedgeomtypes::Bool=true,
)::AG.IDataset

# Build a test dataset from scratch
Expand All @@ -367,7 +367,7 @@ using Tables
- `"GeoJSON"` driver → 1 layer with 2 geometry columns
- `"ESRI Shapefile"` driver → 2 layers with 1 geometry column
1) with `wkbLineString` and `wkbMultiLineString` types
2) with `wkbPolygon`, `wkbMultiPolygon` types
2) with `wkbPolygon`, `wkbMultiPolygon` types
- Layers' geometry type set to `wkbUnknown` but modified by the OGR driver according to its specifications,
- Each geometry has two additionnal fields `id::Int64` and `name::String`

Expand Down Expand Up @@ -422,15 +422,15 @@ using Tables

"""
layer_to_columntable_with_WKT(
drvshortname::String,
drvshortname::String,
geomfamilly::String,
withmissinggeom::Bool,
withmissingfield::Bool,
withmixedgeomtypes::Bool,
)::NamedTuple

Convenience function to build new test results for `test_layer_to_table`
Creates a dataset from scratch with `get_test_dataset` and converts it to a columntable
Convenience function to build new test results for `test_layer_to_table`
Creates a dataset from scratch with `get_test_dataset` and converts it to a columntable
Returns a `NamedTuple` with:
- names: layer geom and field names
- types: expected types given by `Tables.buildcolumns`
Expand Down Expand Up @@ -464,14 +464,14 @@ using Tables

"""
test_layer_to_table(
drvshortname::String,
drvshortname::String,
geomfamilly::String,
withmissinggeom::Bool,
withmissingfield::Bool,
withmixedgeomtypes::Bool,
reference_geotable::Tuple)

Creates a dataset from scratch with `get_test_dataset` and converts it to a columntable
Creates a dataset from scratch with `get_test_dataset` and converts it to a columntable
And test Tables.columntable(::AG.IFeatureLayer) result against `reference_geotable`

"""
Expand Down Expand Up @@ -536,7 +536,7 @@ using Tables
values = (
Union{Missing,String}[
"POLYGON ((0 0,0 1,1 1))",
"MULTIPOLYGON (((0 0,0 1,1 1)),((0.9 0.9,0.0 0.9,0 0)))",
"MULTIPOLYGON (((0 0,0 1,1 1)),((0 0,0.0 0.9,0.9 0.9)))",
missing,
"POLYGON ((0 0,-1 0,-1 1))",
],
Expand Down Expand Up @@ -743,7 +743,7 @@ using Tables
test_layer_to_table(
"FlatGeobuf",
"line",
true,
false,
true,
true,
FlatGeobuf_test_reference_geotable,
Expand Down
Loading