How to extract values from a georeferenced image using point shape file??
3 次查看(过去 30 天)
显示 更早的评论
I want to extract the values form a grayscale image only on the locations of known points. I have a point shape file of that locations.I have imported and extracted its coordinates as:
S1 = shaperead('shapefile');
X = extractfield(S1,'X');
Y = extractfield(S1,'Y');
How can I use these coordinate values of each point to extract the value from the georeferenced image.
Need help!!!
0 个评论
采纳的回答
Kelly Kearney
2015-8-6
The ltln2val function is probably your best bet. Are the X/Y values in your shapefile actually Longitude and Latitude? Or is the shapefile in projected coordinates? If the latter, you'll have to get reverse project the coordinates. My shapeprjread.m function may help with that (though the list of projections is incomplete due to my lack of access to ArcGIS; if you get an error about an unrecognized projection, email me!).
2 个评论
Kelly Kearney
2015-8-6
Yes, unless your shapefile and image use the exact same projected coordinate system, you'll need to get the data in both of them relative to lat/lon. When you said you had a georeferenced image, I assumed you already had that data read into Matlab with the appropriate lat/lon matrices or referencing vector/matrix. What format is your image? How are you reading it into Matlab?
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!