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

Run JuliaFormatter #213

Merged
merged 1 commit into from
Jan 12, 2025
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
2 changes: 1 addition & 1 deletion src/geo_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ function GI.convert(
# We call the full invocation for LibGEOS directly,
# so the context can be passed through, since
# `GI.convert(Mod, x)` does not allow kwargs.
GI.convert(lg, t, g; context)
GI.convert(lg, t, g; context)
end
return GeometryCollection(geometries)
end
Expand Down
10 changes: 5 additions & 5 deletions src/geos_types.jl
Original file line number Diff line number Diff line change
Expand Up @@ -501,7 +501,7 @@ function compare(
ng1 = ngeom(geo1)
ng2 = ngeom(geo2)
ng1 == ng2 || return false
for i in 1:ng1
for i = 1:ng1
compare(cmp, getgeom(geo1, i), getgeom(geo2, i), ctx) || return false
end
end
Expand All @@ -521,7 +521,7 @@ function compare_coord_seqs(cmp, geo1, geo2, ctx)
np1 == np2 || return false
coords1 = Vector{Float64}(undef, ncoords1)
coords2 = Vector{Float64}(undef, ncoords1)
for i in 1:np1
for i = 1:np1
coordinates!(coords1, geo1, i, ctx)
coordinates!(coords2, geo2, i, ctx)
cmp(coords1, coords2) || return false
Expand All @@ -546,7 +546,7 @@ function compare_coord_seqs(cmp::IsApprox, geo1, geo2, ctx)
s1 = 0.0
s2 = 0.0
s12 = 0.0
for i in 1:np1
for i = 1:np1
coordinates!(coords1, geo1, i, ctx)
coordinates!(coords2, geo2, i, ctx)
if ncoords1 == 2
Expand Down Expand Up @@ -579,7 +579,7 @@ function Base.hash(geo::AbstractGeometry, h::UInt)::UInt
if has_coord_seq(geo)
return hash_coord_seq(geo, h)
else
for i in 1:ngeom(geo)
for i = 1:ngeom(geo)
h = hash(getgeom(geo, i), h)
end
end
Expand All @@ -592,7 +592,7 @@ function hash_coord_seq(geo::HasCoordSeq, h::UInt)::UInt
end
buf = Vector{Float64}(undef, nc)
ctx = get_context(geo)
for i in 1:npoints(geo)
for i = 1:npoints(geo)
coordinates!(buf, geo, i, ctx)
h = hash(buf, h)
end
Expand Down
4 changes: 2 additions & 2 deletions test/runtests.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,8 @@ end
@testset "Aqua.jl" begin
Aqua.test_all(
LibGEOS;
ambiguities=(exclude=[GeoInterfaceRecipes.RecipesBase.apply_recipe],),
stale_deps=(ignore=[:GeoInterfaceMakie],),
ambiguities = (exclude = [GeoInterfaceRecipes.RecipesBase.apply_recipe],),
stale_deps = (ignore = [:GeoInterfaceMakie],),
)
end

Expand Down
16 changes: 8 additions & 8 deletions test/test_geo_interface.jl
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ const LG = LibGEOS
@test GeoInterface.getcoord(pt, 1) ≈ 1.0
@test GeoInterface.testgeometry(pt)
@test GeoInterface.is3d(pt) == false
@test GeoInterface.extent(pt) == Extent(X=(1.0, 1.0), Y=(2.0, 2.0))
@test GeoInterface.extent(pt) == Extent(X = (1.0, 1.0), Y = (2.0, 2.0))
Plots.plot(pt)
Makie.plot(pt)

Expand Down Expand Up @@ -84,12 +84,12 @@ const LG = LibGEOS
p = GeoInterface.getgeom(ls, 3)
@test p isa LibGEOS.Point
@test GeoInterface.coordinates(p) == [9, 2]
@test GeoInterface.testgeometry(ls)
@test GeoInterface.testgeometry(ls)
@test GeoInterface.is3d(ls) == false
Plots.plot(ls)
Makie.plot(ls)


@inferred GeoInterface.ncoord(ls)
@inferred GeoInterface.ngeom(ls)
@inferred GeoInterface.getgeom(ls)
Expand All @@ -108,7 +108,7 @@ const LG = LibGEOS
@test GeoInterface.is3d(mls) == false
Plots.plot(mls)
Makie.plot(mls)


@inferred GeoInterface.ncoord(mls)
@inferred GeoInterface.ngeom(mls)
Expand Down Expand Up @@ -153,7 +153,7 @@ const LG = LibGEOS
@test GeoInterface.is3d(polygon) == false
Plots.plot(polygon)
Makie.plot(polygon)


@inferred GeoInterface.ncoord(polygon)
@inferred GeoInterface.ngeom(polygon)
Expand All @@ -177,7 +177,7 @@ const LG = LibGEOS
@test GeoInterface.geomtrait(multipolygon) == MultiPolygonTrait()
@test GeoInterface.testgeometry(multipolygon)
@test GeoInterface.is3d(multipolygon) == false
@test GeoInterface.extent(multipolygon) == Extent(X=(0.0, 10.0), Y=(0.0, 10.0))
@test GeoInterface.extent(multipolygon) == Extent(X = (0.0, 10.0), Y = (0.0, 10.0))
Plots.plot(multipolygon)
Makie.plot(multipolygon)

Expand All @@ -190,7 +190,7 @@ const LG = LibGEOS
@test GeoInterface.geomtrait(pmultipolygon) == MultiPolygonTrait()
@test GeoInterface.testgeometry(pmultipolygon)
@test GeoInterface.is3d(pmultipolygon) == false
@test GeoInterface.extent(pmultipolygon) == Extent(X=(0.0, 10.0), Y=(0.0, 10.0))
@test GeoInterface.extent(pmultipolygon) == Extent(X = (0.0, 10.0), Y = (0.0, 10.0))
LibGEOS.destroyGeom(pmultipolygon)

geomcollection = LibGEOS.readgeom(
Expand Down Expand Up @@ -267,7 +267,7 @@ const LG = LibGEOS
Plots.plot(geomcollection)
# Can't plot geometry collection yet with Makie
@test_broken Makie.plot(geomcollection)


@inferred GeoInterface.ncoord(geomcollection)
@inferred GeoInterface.ngeom(geomcollection)
Expand Down
Loading