Changeset 15206


Ignore:
Timestamp:
06/06/13 17:00:05 (12 years ago)
Author:
Mathieu Morlighem
Message:

CHG: translated from italian

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/plot/googlemaps.m

    r15178 r15206  
    8181
    8282%calculate pixel dimensions of each small image
    83 bottom = 120;
    84 largura = ceil(dx/cols);
    85 altura  = ceil(dy/rows);
    86 alturaplus = altura + bottom;
     83bottom = 100;
     84width  = ceil(dx/cols);
     85height  = ceil(dy/rows);
     86heightplus = height + bottom;
    8787
    8888%Initialize final image
     
    9090for x=0:cols-1,
    9191        for y=0:rows-1,
    92                 dxn = largura * (0.5 + x);
    93                 dyn = altura * (0.5 + y);
     92                dxn = width * (0.5 + x);
     93                dyn = height * (0.5 + y);
    9494                [latn, lonn] = pixelstolatlon(ulx + dxn, uly - dyn - bottom/2, zoom);
    9595                position = [num2str(latn) ',' num2str(lonn)];
     
    9999                        'center=' position ...
    100100                        '&zoom=' num2str(zoom)...
    101                         '&size=' num2str(largura) 'x' num2str(alturaplus)...
     101                        '&size=' num2str(width) 'x' num2str(heightplus)...
    102102                        '&maptype=satellite'...
    103103                        '&sensor=false'...
     
    106106                [X, map]=imread(url,'png');
    107107                X=ind2rgb(X,map);
    108                 indx1 = floor(x*largura)+1;
    109                 indx2 = min(floor(dx),floor(x*largura)+size(X,2));
    110                 indy1 = floor(y*altura)+1;
    111                 indy2 = min(floor(dy),floor(y*altura)+size(X,1));
     108                indx1 = floor(x*width)+1;
     109                indx2 = min(floor(dx),floor(x*width)+size(X,2));
     110                indy1 = floor(y*height)+1;
     111                [floor(dy),floor(y*height)+size(X,1)]
     112                [height heightplus]
     113                indy2 = min(floor(dy),floor(y*height)+size(X,1));
    112114                final(indy1:indy2,indx1:indx2,:)=X(1:indy2-indy1+1,1:indx2-indx1+1,:);
    113115        end
Note: See TracChangeset for help on using the changeset viewer.