How to 1. view a .lyrx file as a "heat map"? 2. Import the .lyrx file into a 2-d matrix?

5 次查看(过去 30 天)
I have a .lyrx file, generated by GIS, where different points on the map were assigned some values that represent local temperature.
  1. How can I view this heat map, with different colors representing different temperatures?
  2. How can I create a 2-d matrix where each site contains a number that fits to a point in the map.
I wish to be able to look at the map and the matrix side by side, or eventually put them one on top of the other, and see how the matrix values match the heat map.
I am using the new Matlab R2024a.
  2 个评论
Erez
Erez 2024-4-10
编辑:Erez 2024-4-10
Unfortunately I couldn't find a sample file to upload, without copyrights.
But, here is the documentation of lyrx files, which are generated by ArcGIS:
http://pro.arcgis.com/en/pro-app/3.1/arcpy/mapping/layerfile-class.htm#C_GUID-60DA2FA6-4721-4072-B882-03C256F6F530 .
I tried using the mapping toolbox in Matlab and the function readgeotable, but it seems that they cannot convert lyrx files into a matrix...
(Readgeotable: http://mathworks.com/help/map/ref/readgeotable.html)
Thanks for your help!

请先登录,再进行评论。

回答(1 个)

Harsh Sharma
Harsh Sharma 2024-11-11,4:54
Hi Erez,
The layer file (.lyrx) is not supported in MATLAB. As a workaround you can export the layer file to a supported format. Here’s the documentation link for the standard file formats and the functions to import those format files - https://www.mathworks.com/help/map/standard-file-formats.html?s_tid=CRUX_lftnav
Once you have your data imported you can use scatter plot to create a heatmap as you have multiple points in the dataset. Here is an example of a “scatter” plot with different color circles - https://www.mathworks.com/help/matlab/ref/scatter.html?searchHighlight=scatter&s_tid=srchtitle_support_results_1_scatter#:~:text=a%20numeric%20scalar.-,Vary%20Circle%20Color,-Vary%20Color%20Palette
You can use “meshgrid” function to create a 2D grid. Refer to the following documentation to understand how to do so - https://www.mathworks.com/help/matlab/ref/meshgrid.html
You can use “imagesc” function to visualize the matrix points and overlay it on the “scatter” plot. Refer to the following documentation to understand how to use imagsc” function - https://www.mathworks.com/help/matlab/ref/imagesc.html?s_tid=doc_ta

类别

Help CenterFile Exchange 中查找有关 Statistics and Machine Learning Toolbox 的更多信息

产品


版本

R2024a

Community Treasure Hunt

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

Start Hunting!

Translated by