crop or clip matrix shapefile
6 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
I have matrix 9600x19200 int16 that i want to cut as my shapefile. How could I cut?
I try using this:
I11 = cat(1,I10,I9); %Shapefile t = shaperead('F:\Citra\Shapefile\myshapefile.shp', 'UseGeoCoords', true); % Get x,y locations of pixels: [x,y] = pixcenters(I11); % Convert x,y arrays to grid: [X,Y] = meshgrid(x,y); % Remove trailing nan from shapefile rx = t.X(1:end-1); ry = t.Y(1:end-1); mask = inpolygon(X,Y,rx,ry); figure,imshow(mask,[]); colormap(gca,'jet'); colorbar;
the error : Error using parsePixMapInputs>parseOther (line 66) Function PIXCENTERS expected input number 1, R, to be either a 3-by-2 referencing matrix or a scalar map raster reference object. Instead its size was 9600x19200.
Error in parsePixMapInputs (line 22) [R, height, width, hasFlag] = parseOther(func_name, flagstr, varargin{:});
Error in pixcenters (line 51) = parsePixMapInputs('PIXCENTERS', 'makegrid', varargin{:});
Error in crop_matrix (line 74) [x,y] = pixcenters(I11);
Need some suggestion for crop matrix using shapefile
0 Kommentare
Antworten (0)
Siehe auch
Kategorien
Mehr zu Map Display finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!