フィルターのクリア

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

タグ

Community Treasure Hunt

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

Start Hunting!

Translated by