Transparency of Image overlay on Google Earth (kmz file)
17 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
Hello,
My purpose is to obtain a contour map using basic Latitude, Longitude, Height/depth data of a location and overlay the image on Google earth using kml toolbox. I was looking for something simlper and this is what I have so far. (Apologies for any mistakes in code, I'm not very comfortable with MATLAB yet)
% reading the bathy data
data = xlsread('./BathymetryData.xlsx');
lon = data(:,1);
lat = data(:,2);
alt = data(:,3);
[xq,yq] = meshgrid(min(lon):.001:max(lon), min(lat):.001:max(lat));
[x,y,z] = griddata(lon,lat,alt,xq,yq, 'cubic');
contour(z,'showtext', 'on','color','b');
saveas(gcf, 'contour.png');
F = getframe(gca);
imwrite(F.cdata, 'contour.png');
% Save it as KMZ.
k = kml('image.kml');
k.overlay(a, b, c, d, 'file','contour.png');
% a, b, c, d being the minimum and maximum Longitude and Latitude values.
k.run;
I'm getting the result I want but I want the overlaying image to be transparent. If it is possible to ONLY show the lines, it would be ideal. How can I approach this?
(I'm using MATLAB R2019b)
Thanks in advance!
0 Kommentare
Antworten (1)
Siehe auch
Kategorien
Mehr zu Map Display finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!