Osg-OsgEarth使用“.earth”文件加载数据,加载在线地图、shp矢量数据、tms数据、tif数据
长江三角洲科学数据中心](http://nnu.geodata.cn:8008/index.html
<map> <image driver="tms" index="DOMT_Local" max_level ="19" min_level = "0"> <cache_policy usage="none"/> <url>http://nnu.geodata.cn:8009/DOM/tms.xml</url> </image> </map>
矢量数据(地级城市驻地、国界线、经纬网、全国县级统计数据、省会城市、线状省界、中国地州界、中国湖泊、主要公路、主要河流)
<map name="WMS Radar returns" version="2"> <image name="t1" driver="tms"> <url>world10/tms.xml</url> </image> <model name="river" driver="feature_geom"> <features name="heliu" driver="ogr"> <url>shp/heliu.shp</url> </features> <styles> <style type="text/css"> states { stroke: #ff0000; render-depth-test: false; render-clip-plane: 0; render-order: 1; } </style> </styles> </model> <model name="boundaries" driver="feature_geom"> <features name="china" driver="ogr"> <url>shp/china.shp</url> </features> <styles> <style type="text/css"> states { stroke: #00ff00; render-depth-test: false; render-clip-plane: 0; render-order: 1; } </style> </styles> </model> <model name="route" driver="feature_geom"> <features name="gonglu" driver="ogr"> <url>shp/gonglu.shp</url> </features> <styles> <style type="text/css"> states { stroke: #0000ff; render-depth-test: false; render-clip-plane: 0; render-order: 1; } </style> </styles> </model> <model name="lake" driver="feature_geom"> <features name="hupo" driver="ogr"> <url>shp/hupo.shp</url> </features> <styles> <style type="text/css"> states { stroke: #ffff00; render-depth-test: false; render-clip-plane: 0; render-order: 1; } </style> </styles> </model> </map>
tif数据
<map name="WorldMap" type="projected" version="2"> <image name="t1" driver="gdal"> <url>world.tif</url> </image> <options> <profile>eqc-wgs84</profile> </options> </map>
ArcGIS(我电脑上未实现效果,原因不明)
<map name="ArcGIS Online" type="geocentric" version="2"> <image name="arcgis-world-imagery" driver="arcgis"> <url>http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer</url> <nodata_image>http://services.arcgisonline.com/ArcGIS/rest/services/World_Imagery/MapServer/tile/0/0/0.jpeg</nodata_image> </image> <image name="arcgis-transportation" driver="arcgis"> <url>http://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Transportation/MapServer</url> </image> <image name="arcgis-reference-overlay" driver="arcgis"> <url>http://services.arcgisonline.com/ArcGIS/rest/services/Reference/World_Boundaries_and_Places_Alternate/MapServer</url> </image> <options> <lighting>false</lighting> <terrain> <min_tile_range_factor>9</min_tile_range_factor> </terrain> </options> </map>
作者:疯狂Delphi
本文版权归作者和博客园共有,欢迎转载,但未经作者同意必须保留此段声明,且在文章页面明显位置给出原文连接,否则保留追究法律责任的权利.
欢迎关注我,一起进步!扫描下方二维码即可加我
![](https://images.cnblogs.com/cnblogs_com/FKdelphi/1101510/o_200417075318%E5%8A%A0%E6%88%91QQ.jpg)
![](https://images.cnblogs.com/cnblogs_com/FKdelphi/1101510/o_200417080925%E5%8A%A0%E6%88%91%E5%BE%AE%E4%BF%A1.jpg)