How to produce georeferenced maps?
조회 수: 6 (최근 30일)
이전 댓글 표시
I am using Snap2StAMPS thrid-party module installed over matlab and I create maps that contains persistent scatterer points/pixel that contains annual ground displacement velocity over period of time and i would like to know how to make matlab georeference the produced figures so that i can export them into google earth and arcgis. I have got the X,Y coordinate of the the study area boundaries [32.1013 , 29.6010 ] , [32.6143 , 29.2054]
답변 (1개)
Anshuman
2024년 9월 3일
To georeference your figures in MATLAB and export them for use in Google Earth, you can follow these steps:
- Use the boundary coordinates you've provided to define the extent of your map. These coordinates correspond to the corners of your study area.
- If your data is in pixel coordinates, you'll need to transform it to geographic coordinates (latitude and longitude) based on the extent.
- Use the 'maprefcells' function to create a referencing object that defines the relationship between the pixel grid and geographic coordinates.
- You can use the 'kmlwrite' function to export your georeferenced data to a KML file, which can be opened in Google Earth.
% Create a KML file
kml_filename = 'displacement_velocity.kml';
% Assuming you have a matrix 'your_data' containing the displacement values
% and a colormap 'cmap' to represent the data visually
kmlwrite(kml_filename, R, your_data, 'ColorMap', cmap);
5. To export your data to ArcGIS, you might want to save it as a GeoTIFF file. You can use the 'geotiffwrite' function
% Create a GeoTIFF file
geotiff_filename = 'displacement_velocity.tif';
% Write the data to a GeoTIFF file
geotiffwrite(geotiff_filename, your_data, R, 'CoordRefSysCode', 'EPSG:4326');
You can refere to these documentations for more details:
- https://in.mathworks.com/help/map/ref/maprefcells.html?searchHighlight=maprefcells%20&s_tid=srchtitle_support_results_1_maprefcells%2520
- https://in.mathworks.com/help/map/ref/kmlwrite.html?searchHighlight=kmlwrite&s_tid=srchtitle_support_results_1_kmlwrite
- https://in.mathworks.com/help/map/ref/geotiffwrite.html?searchHighlight=geotiffwrite&s_tid=srchtitle_support_results_1_geotiffwrite
댓글 수: 0
참고 항목
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!