Skip to content

Commit

Permalink
deal with 3D data
Browse files Browse the repository at this point in the history
  • Loading branch information
boriskaus committed Feb 22, 2024
1 parent 83504cb commit ef265ec
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions ext/GMT_utils.jl
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,11 @@ function ImportGeoTIFF(fname::String; fieldname=:layer1, negative=false, iskm=tr
data = Depth

elseif hasfield(typeof(G),:image)
data[:,:,1] = G.image'
if length(size(G.image)) == 3
data = permutedims(G.image,[2, 1, 3]);
elseif length(size(G.image)) == 2
data[:,:,1] = G.image'
end

end
data_field = NamedTuple{(fieldname,)}((data,));
Expand All @@ -159,8 +163,6 @@ function ImportGeoTIFF(fname::String; fieldname=:layer1, negative=false, iskm=tr
Open the GeoTIFF there and Export -> Save As , while selecting \"EPSG:4326 - WGS 84\" projection.")
end



return data_GMT
end

Expand Down

0 comments on commit ef265ec

Please sign in to comment.