Skip to content

Commit

Permalink
Update kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
eliascarv committed Nov 7, 2024
1 parent 3e263d1 commit 56555e5
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/metadata.jl
Original file line number Diff line number Diff line change
Expand Up @@ -154,10 +154,10 @@ function Metadata(;
if (haspixelscale || hastiepoint) && !(haspixelscale && hastiepoint)
throw(ArgumentError("ModelPixelScale and ModelTiepoint must be defined together"))
end
if !hastiepoint && !hastransformation
if !haspixelscale && !hastransformation
throw(ArgumentError("GeoTIFF requires a ModelPixelScale with ModelTiepoint or a ModelTransformation"))
end
if hastiepoint && hastransformation
if haspixelscale && hastransformation
throw(ArgumentError("only one of ModelPixelScale with ModelTiepoint or ModelTransformation can be defined"))
end
Metadata(geokeydirectory, geodoubleparams, geoasciiparams, modelpixelscale, modeltiepoint, modeltransformation)
Expand All @@ -167,9 +167,9 @@ function metadata(;
version=1,
revision=1,
minor=1,
tiepoint=nothing,
pixelscale=nothing,
transformation=(_A, _b),
tiepoint=nothing,
transformation=isnothing(pixelscale) && isnothing(tiepoint) ? (_A, _b) : nothing,
rastertype=nothing,
modeltype=nothing,
projectedcrs=nothing,
Expand Down

0 comments on commit 56555e5

Please sign in to comment.