# interpm2

버전 1.1.0.0 (86.5 KB) 작성자:
Densify or interpolate along paths with approximately equal spacing in meters or kilometers.
다운로드 수: 660
업데이트 날짜: 2014/6/16

라이선스 보기

This function employs the interpm function to densifiy lat/lon sampling in lines or polygons, but extends the available input units to include 'meters' or 'kilometers'. However, note that if units of meters or kilometers are specified, the resultant spacing will be only an approximation, due to an underlying approximation of the Earth's shape as a sphere of mean radius 6371 km.

Syntax

[latout,lonout] = interpm(lat,lon,maxdiff)
[latout,lonout] = interpm(lat,lon,maxdiff,method)
[latout,lonout] = interpm(lat,lon,maxdiff,method,units)
[latout,lonout] = interpm(lat,lon,maxdiff,method,units,tolerance)
[latout,lonout,deltadist] = interpm(...)

Description

[latout,lonout] = interpm(lat,lon,maxdiff) fills in any gaps in latitude (lat) or longitude (lon) data vectors that are greater than a defined tolerance maxdiff apart in either dimension. The angle units of the three inputs need not be specified, but they must be identical. latout and lonout are the new latitude and longitude data vectors, in which any gaps larger than maxdiff in the original vectors have been filled with additional points. The default method of interpolation used by interpm2 is linear.

[latout,lonout] = interpm(lat,lon,maxdiff,method) interpolates between vector data coordinate points using a specified interpolation method. Valid interpolation method strings are 'gc' for great circle, 'rh' for rhumb line, and 'lin' for linear interpolation.

[latout,lonout] = interpm(lat,lon,maxdiff,method,units) specifies the units used, where units can be 'degrees', 'radians', 'meters', or 'kilometers'. The default is 'degrees'. If units are meters or kilometers, the calculation will assume the Earth is a sphere of radius 6371 km.

[latout,lonout] = interpm(lat,lon,maxdiff,method,units,tolerance) specifies an amount of acceptable deviation between maxdiff and the average distance between output points. Due to an approximation of the Earth as a sphere, the first solution this function calculates may not yield points exactly maxdiff apart. If, however, you specify maxdiff = 15 meters and tolerance = 0.010, the function will keep trying until it finds a solution where the average distance between points is 15+/-0.010 meters. If no tolerance is declared a value corresponding to 0.1% of maxdiff will be assumed.

[latout,lonout,deltadist] = interpm(...) returns the mean distance deltadist between output points given by latout and lonout. Units of deltadist are in meters unless input units are kilometers, in which case deltadist units are in kilometers.

### 인용 양식

Chad Greene (2024). interpm2 (https://www.mathworks.com/matlabcentral/fileexchange/46923-interpm2), MATLAB Central File Exchange. 검색됨 .

개발 환경: R2012b
모든 릴리스와 호환
##### 플랫폼 호환성
Windows macOS Linux
##### 카테고리
Help CenterMATLAB Answers에서 Geometric Geodesy에 대해 자세히 알아보기

### Community Treasure Hunt

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

Start Hunting!

#### interpm2demo/html/

버전 게시됨 릴리스 정보
1.1.0.0

Functionality change. percentAcceptableError replaced by tolerance.

1.0.0.0