The results of Dinsar to Matlab

Dear SAR friends,

I use snap procrssing D-insar and obtaining the result of co-seismic deformation.

I would like to know how can i transform the results of Dinsar to Matlab, such as how can i obtain the value of deformation, the latitude and longitude, and the incidence angle… in Matlab.

Many thanks!

as all the processing is done in matlab, there is probably an easier way, but when I want to work with the points in a GIS I use this work around:

  1. Export it as a kml file as described in chapter 7 of the manual
    ps_gescatter('velocity_export.kml', ph_disp, 1, 0.4)
Described at more detail here

  1. Convert the kml to a csv table
    ogr2ogr -select description velocity_table.csv velocity_export.kml

Thank you for your replying, i got it!

how did you solve it in your case?

I export the D-INSAR results in ENVI format, then use Matlab to read the output file.

Dear ABraun ,I want convert my result to csv table.
I read your answer and use the code:“ps_gescatter(‘velocity_export.kml’, ph_disp, 1, 0.4)”.The result convert to kml successful.
But there is a trouble when i try convert the kml to a csv table.i use the code"ogr2ogr -select description velocity_table.csv velocity_export.kml"in matlab.It shows that:“Undefined function or variable ‘ogr2ogr’”.
Can you tell me how to solve this problem?
Thank you very mach!

ogr2ogr is a command of the gdal libraries. They are installed with QGIS, for example. You can also simply load the csv into a GIS based on the coordinates and convert it into a shapefile in there.

I’m very sorry. I can’t understand the first half of your sentence.
Now I want to convert the KML file into a CSV table in MATLAB, and then import it into ArcGIS for analysis
But when i use command“ogr2ogr -select description velocity_table.csv velocity_export.kml”,it shows ogr2ogr undefined. I also want convert KML to CSV table, could you tell me how can i solve this problem?
PS: Here’s another situation I want to tell you,when i first use the command “ps_gescatter(‘velocity_export.kml’, ph_disp, 1, 0.4)”,it also shows ‘ph_disp’ undefined.But when i input the command ‘ps_plot(‘v-d’,-1)’ / load ps_plot_v-d ph_disp (you write in Described at more detail here)one by one. I input the command ‘ps_gescatter(‘velocity_export.kml’, ph_disp, 1, 0.4)’ again ,it can run successfully. I am not sure this situation realted to the probelom.
Thanks for your reply.

If you work with ArcGIS, you can use File > Add Data > Add xy data and select the csv file. There you select the columns for latitude and longitude which allows you to display the points in the map.

emmm…But Dear ABraun,I do not have a csv file.
My goal is to get the CSV file

first you plot a map of displacement
ps_plot('v-d', -1)

then you store the map content in a variable (ph_disp)
load ps_plot_v-d ph_disp

then you export the variable to a kml file
ps_gescatter('velocity_export.kml', ph_disp, 1, 0.4)

I follow these steps and i get a KML file. Now how can I convert it into a CSV file?

Or import KML file directly into ArcGIS for analysis?

you can import the KML file into ArcGIS directly, but the velocity is hidden in the description of the attribute. With a bit of string formatting, you can get it out.

Hello @ABraun
When I run the above code, I get the following error. What is the problem and how can I solve it

can you please share a screenshot of the command you entered?

I’m really sorry that the picture uploaded before is wrong. This picture is the question I want to ask this time

Please run this line before:
load ps_plot_v-d ph_disp

Initially, there was an additional leading “_” before ph_disp which caused that the variable was not found.

Hello @ABraun I want to refer to exporting the geographic information of the points as. KML file, if exported according to your instructions above. The KML files are hundreds of meterslong and cannot be opened in Google Earth.