Commit 8731ccab authored by Paul Nicot's avatar Paul Nicot
Browse files

cree une png de la resolution et de la position de la georectification

parent 7d111340
......@@ -63,6 +63,10 @@ tifdir = [zonedir,'/tif'];
%% Load the calibration file
load(calfile);
% files for context image
S = shaperead('/home/nicp0003/LND_LSLE_line_UTM.shp');
[res,Rr] = geotiffread([rootdir '/' estr(1:4) '/calib/resolution_' estr(1:4) '_UTM.tif']);
res = double(res);
%% Creation of the grid
......@@ -75,7 +79,7 @@ elseif zone == 2 % entree BHH + au large
llat = 5353902; ulat = 5358298;
elseif zone == 3 % entree BHH
llon = 51028; rlon = 512939;
llon = 510208; rlon = 512939;
llat = 5353902; ulat = 5355976;
% elseif zone == 4 % mouillage AWAC
......@@ -97,8 +101,8 @@ end
% update grid with resolution
str_resol = num2str(resol*100);
lon1 = llon ; lon2 = rlon;
%str_resol = num2str(resol*100);
%lon1 = llon ; lon2 = rlon;
x1vec = llon:resol:rlon;
y1vec = llat:resol:ulat;
y1vec = y1vec';
......@@ -137,7 +141,35 @@ if iEnd == 0
iEnd = nFiles;
end
% georect loop
%% plot context image
h = figure; set(h,'visible','off');
lev1 = [2:2:10];
mapshow(res, Rr,'DisplayType', 'contour','LineStyle','--', ...
'LevelList',lev1,'edgecolor', 'none','LineColor', 'black',...
'ShowText', 'on');
hold on;
lev2 = [15,25,50,75,100];
mapshow(res, Rr,'DisplayType', 'contour','LineStyle','--', ...
'LevelList',lev2,'edgecolor', 'none','LineColor', 'black', ...
'ShowText', 'on');
mapshow(S,'color',[0.3 0.3 0.3],'LineWidth',1);
ylim([5353000, 5363000]);
xlim([506000, 515000]);
line([rlon llon],[llat llat],'Color',[1 0 0]);
line([llon rlon],[ulat ulat],'Color',[1 0 0]);
line([rlon rlon],[llat ulat],'Color',[1 0 0]);
line([llon llon],[llat ulat],'Color',[1 0 0]);
iname = [zonedir,'/georect_context_',estr,'.png'];
saveas(h,iname);
%% georect loop
for n = iFirst:nSkip:iEnd
imfilename = imfiles(n).name;
......@@ -218,7 +250,7 @@ for n = iFirst:nSkip:iEnd
end
%% write a README.txt with the georectification informations
fidname = [zonedir,'/README.txt']
fidname = [zonedir,'/README.txt'];
fid = fopen(fidname,'w');
fprintf(fid,'%s\n','README.txt');
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment