資源簡介
主要是中國地圖相關(guān)內(nèi)容的一些shp文件,含中國行政區(qū)劃數(shù)據(jù)、國界線(包含九段線)等數(shù)據(jù),一般可用matlab可視化中國地圖練習(xí)。shape文件由ESRI開發(fā),一個ESRI(Environmental Systems Research Institute)的shape文件包括一個主文件,一個索引文件,和一個dBASE表。其中主文件的后綴就是.shp

代碼片段和文件信息
close?all?clear?all?clc?dbstop?if?error
h1=worldmap(‘china‘)
setm(h1‘mapprojection‘‘lambert‘);%圓柱投影
setm(h1‘FFaceColor‘‘w‘)%圖廓
ChinaP=shaperead(‘bou1_4p.shp‘‘UseGeoCoords‘true)
ChinaL=shaperead(‘bou2_4l.shp‘‘UseGeoCoords‘true)
CapLon=[117.000923115.48333125.35000127.63333123.38333111.67080187.68333103.73333106.26667112.53333108.95000113.65000117.283042119.78333120.20000118.30000113.23333115.90000110.35000108.320004106.71667113.00000114.298572104.06667102.7333391.0000096.75000117.20000121.55333106.45000116.41667121.30114.10000113.50000];
CapLat=[36.67580738.0333343.8833347.7500041.80000?41.81831143.7666736.0333337.4666737.8666734.2666734.76667?31.8611932.0530.26626.083323.1666728.6833320.01667?22.824026.5666728.2166?30.5843530.666625.0500030.60036.566639.13331.2000?29.56639.9166?25.0322.2022.20];
names={‘濟(jì)南‘‘石家莊‘‘長春‘‘哈爾濱‘‘沈陽‘?‘呼和浩特‘‘烏魯木齊‘‘蘭州‘‘銀川‘‘太原‘‘西安‘‘鄭州‘‘合肥‘‘南京‘‘杭州‘‘福州‘‘廣州‘‘南昌‘‘海口‘‘南寧‘‘貴陽‘‘長沙‘‘武漢‘‘成都‘‘昆明‘‘拉薩‘‘西寧‘‘天津‘‘上?!貞c‘?‘北京‘‘臺北‘‘香港‘‘澳門‘};
geoshow(ChinaP‘Facecolor‘[1?1?0.5])%顯示面
geoshow(ChinaL‘Linestyle‘‘-.‘‘Color‘‘k‘‘LineWidth‘1)%顯示界線
geoshow(CapLatCapLon‘DisplayType‘‘point‘‘Marker‘‘.‘‘MarkerEdgeColor‘‘red‘)%省會點
geoshow(39.9166116.41667‘DisplayType‘‘point‘‘Marker‘‘p‘‘MarkerEdgeColor‘‘red‘)%首都
%省會標(biāo)注
for?i=1:numel(names)
????textm(CapLat(i)+0.3CapLon(i)+0.3names(i)‘color‘‘k‘‘FontSize‘8)
end
%圖名
title(‘中國政區(qū)地圖‘‘FontSize‘20);
%圖例
legend({‘省界線‘‘省會‘‘首都‘‘國界線‘}‘FontSize‘12‘Location‘‘southwest‘)
%比例尺
scaleruler(‘units‘‘km‘)
setm(handlem(‘scaleruler1‘)‘Rulerstyle‘‘lines‘‘MajorTick‘0:500:1000‘MinorTick‘0:250:500‘TickDir‘‘down‘)
%海南島及南海諸島
h2=axes(‘pos‘[0.5922?0.15?0.13?0.2])
worldmap([5.559248066?20.549868679][106.680363685?122.034461754])
setm(h2‘FFaceColor‘‘w‘)
insert1=shaperead(‘bou2_4l.shp‘‘UseGeoCoords‘true)
geoshow([insert1.Lat][insert1.Lon]‘Color‘‘k‘‘LineWidth‘1)
mlabel
plabel
gridm
setm(h2‘FFacecolor‘‘c‘)
title(‘海南島及南海諸島‘‘FontSize‘6)
%?指北針
northarrow(‘latitude‘50‘longitude‘62)
h=handlem(‘NorthArrow‘);
set(h‘FaceColor‘‘k‘)
?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----
?????文件??????72608??1999-04-10?15:06??ChinaMap\bou1_4p.dbf
?????文件????1065828??1999-04-10?15:06??ChinaMap\bou1_4p.shp
?????文件???????7252??1999-04-10?15:06??ChinaMap\bou1_4p.shx
?????文件?????152015??1999-04-10?15:09??ChinaMap\bou2_4l.dbf
?????文件????1395500??1999-04-10?15:09??ChinaMap\bou2_4l.shp
?????文件??????14380??1999-04-10?15:09??ChinaMap\bou2_4l.shx
?????文件???????2336??2020-06-06?12:49??ChinaMap\ChinaMap.m
?????目錄??????????0??2020-06-06?13:57??ChinaMap
-----------?---------??----------?-----??----
??????????????2709919????????????????????8
評論
共有 條評論