필터 지우기
필터 지우기

Saving a figure as shape file

조회 수: 15 (최근 30일)
Effat Behboudi
Effat Behboudi 2022년 2월 11일
답변: Anjaneyulu Bairi 2024년 1월 11일
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
Benjamin Thompson 2022년 2월 11일
Can you provide a sample of a shape file, or a link to the file specification?
Effat Behboudi
Effat Behboudi 2022년 2월 11일
Hi Benjamin,
I'm looking to a shape file as following figure to colour code the bowties based on depth.
Thanks,
Effat

댓글을 달려면 로그인하십시오.

답변 (1개)

Anjaneyulu Bairi
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.
I hope it helps to resolve your query

카테고리

Help CenterFile Exchange에서 Data Import and Export에 대해 자세히 알아보기

태그

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by