Saving a figure as shape file
조회 수: 13 (최근 30일)
이전 댓글 표시
Hi everyone,
I'm trying to export a figure to a shape file so that I import it into ArcGIS. The figure is made up of arcs and lines.
I've already created the figure (attached), but I'm not sure how to export it as a shape file that includes all latc, longc, and Depth values. I'd also like to fill these bowties. Is there anyone who knows how to do it?
Thank you.
radius=0.15;
longitude=Data_FM(:,4);
latitude=Data_FM(:,5);
Depth=Data_FM(:,6);
AZ1=Data_FM(:,7);
Mean_AZ=Data_FM(:,8);
AZ2=Data_FM(:,9);
%arc
[latc1,longc1] = scircle1(latitude,longitude,radius*ones(length(Data_FM),1),[AZ1 AZ2]);
[latc2,longc2] = scircle1(latitude,longitude,radius*ones(length(Data_FM),1),[AZ1+180 AZ2+180]);
% connecting arcs
arclen=radius; %In units of degrees of arc
[latc3,longc3] = track1(latitude,longitude,AZ1,arclen*ones(length(Data_FM),1));
[latc4,longc4] = track1(latitude,longitude,AZ2,arclen*ones(length(Data_FM),1));
[latc5,longc5] = track1(latitude,longitude,AZ1+180,arclen*ones(length(Data_FM),1));
[latc6,longc6] =track1(latitude,longitude,AZ2+180,arclen*ones(length(Data_FM),1));
figure;axesm('mercator','MapLatLimit',[-42 -36],'MapLonLimit',[174 180]);
hold on;
plotm(latc1,longc1,'m');
plotm(latc2,longc2,'m');
plotm(latc3,longc3,'-m');
plotm(latc4,longc4,'-m');
plotm(latc5,longc5,'-m');
plotm(latc6,longc6,'-m');
hold off;
댓글 수: 2
Benjamin Thompson
2022년 2월 11일
Can you provide a sample of a shape file, or a link to the file specification?
답변 (1개)
Anjaneyulu Bairi
2024년 1월 11일
Hi,
I understand that you are trying to create a shape file which contains geographic data to import into ArcGIS. In MATLAB, converting image file which contains raster data to a shape file containing vector data is not possible. You can try the below troubleshooting steps to resolve your query.
- Create “Geospatial Table” from your data. There are multiple ways to create “Geospatial Table”, refer the documentation provided at the end.
- Use the “shapewrite” function to create shape with the following signature “shapewrite(GT,filename)” ,where “GT” is Geospatial Table, the “filename” is location and name of the file at which to create the shapefile, specified as a string scalar or character vector. If you include a file extension, it must be .shp or .SHP.
Visit the below documentation for more information.
- https://in.mathworks.com/help/map/create-geospatial-tables.html
- https://in.mathworks.com/help/map/ref/shapewrite.html
I hope it helps to resolve your query
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Printing and Saving에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!