Using geointerp and los2
이전 댓글 표시
I'm a novice with the mapping toolbox. I've read in a tiff file using readgeoraster that contains elevation data
[Z R] = readgeoraster('test.tif')
R is a mapPostingReference. When I try to use geointerp function I get the error it expects a GeographicPostingsReference.
When I'm trying to use los2(Z,R, lat1,lon1,lat2,lon1) it states that it expects to be a raster object. I'm looking to understand what I'm doing wrong and what geointerp and los2 expects as inputs.
답변 (1개)
Bjorn Gustavsson
2022년 9월 1일
If you check the documentation (browse on from the help) you will see this:
load topo
Create a raster reference object associated with the topo raster grid.
R = georefcells(topolatlim,topolonlim,size(topo))
and a couple of lines further down:
Define the points you want to interpolate using latitude and longitude.
mylats = [-40 -20 20 40];
mylons = [ 42 54 38 62];
Interpolate the values at the defined points.
Vinterpolated = geointerp(topo,R,mylats,mylons)
There's also a live-script illustrating the workings.
HTH
카테고리
도움말 센터 및 File Exchange에서 Raster Data에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!