matlab中mfwdtran,(To be removed) Project geographic features to map coordinates - MATLAB mfwdtran - M...

Get geographic location data for the District of

Columbia.

dc = shaperead('usastatelo', 'UseGeoCoords', true,...

'Selector',{@(name) strcmpi(name,'District of Columbia'),...

'Name'});

lat = [dc.Lat]';

lon = [dc.Lon]';

[lat lon]

ans =

38.9000 -77.0700

38.9500 -77.1200

39.0000 -77.0300

38.9000 -76.9000

38.7800 -77.0300

38.8000 -77.0200

38.8700 -77.0200

38.9000 -77.0700

38.9000 -77.0700

NaN NaN

Obtain the UTM zone for this point.

dczone = utmzone(mean(lat,'omitnan'),mean(lon,'omitnan'))

dczone =

'18S'

Set up the UTM coordinate system based on this

information.

utmstruct = defaultm('utm');

utmstruct.zone = dczone;

utmstruct.geoid = wgs84Ellipsoid;

utmstruct = defaultm(utmstruct);

Project the District of Columbia data from geographic

coordinates into map coordinates for UTM zone

18S.

[x,y] = mfwdtran(utmstruct,lat,lon)

x =

1.0e+05 *

3.2049

3.1629

3.2421

3.3524

3.2367

3.2459

3.2476

3.2049

3.2049

NaN

y =

1.0e+06 *

4.3077

4.3134

4.3187

4.3074

4.2943

4.2965

4.3043

4.3077

4.3077

NaN

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值