实例介绍
osgearth最新的官方开发文档,里面有earth文件的说明已经基础的C++代码开发内容
CONTENTS 1 Table of Contents 1.1 About the project 1. 2 Building osg Earth 1. 3 User Guide “· 1. 4 Developer Topics 1.5 Working with Data 1. 6 Reference Guides 1. 7 FAQ 1. 8 Release notes OsgEarth Documentation, Release 2. 4 Welcome to the osg larth documentation project osg Earth is a big SDK. Keeping up on the documentation is not easy! So now we've moved the docs right into the osg Earth Git repository to make it easier for the osg Earth team and user community to help. Check the links at the bottom of the sidebar CONTENTS OSg Earth Documentation, Release 2. 4 CONTENTS CHAPTER ONE TABLE OF CONTENTS 1.1 About the Project 1.1.1 Introduction osg Earth is a 3D mapping SDK for Open Scene Graph applications. It's different than traditional terrain engines in an important way: osg Earth does not require you to build a 3D terrain model before you display it. Instead, it will access the raw data sources at application run time and composite them into a 3D map on the fly. No terrain model is actually stored to disk, though it does use caching techniques to speed up the rendering of the map The goals of osg Earth are to: Enable the development of 3D geospatial appliations on top of Open Scene Graph Make it as easy as possible to visualize terrian models and 3D maps Interoperate with open mapping standards, technologies, and data So if it for me? So: does osg Earth replace the need for offline terrain database creation tools? In many cases it doe Consider using osg Earth if you need to Get a terrain base map up and running quickly and easily Access open-standards map data services like WMS,wCs, or TMs Integrate locally-stored data with web-service-based data Incorporate new geospatial data layers at run-time · Run in a“thin- client' environment Deal with data that may change over time Integrate with a commercial data provider 1.1.2 Community Resources Since osg Earth is a free open source SDK, the source code is available to anyone and we welcome and encourage community participation when it comes to testing, adding features, and fixing bugs upport Forum The best way to interact with the osg Earth team and the user community is through the support forum Please read and follow these guidelines for using the forum 3 OSg Earth Documentation, Release 2. 4 Sign up for an account and use your real name. You can participate anonymously, but using your real name helps build a stronger community(and makes it more likely that we will get to your question sooner) Limit yourself to one topic per post. Asking multiple questions in one post makes it too hard to keep track of responses Always include as much supporting information as possible. Post an earth file or short code snippet Post the output to osgearth version --caps. Post the output to gdalinfo if you are having trouble with a GeoTIFF or other data file. List everything you have tried so far Be patient OSG Forum Since osg Earth is built on top of Open Scene Graph, many questions we get on the message boards are really osg questions. We will still try our best to help. But it's worth your while to join the OSG mailing List or read the osg Forum regularly as well Social media Follow pelicanmapping on twitter for updates Add our google+ page to your circles for gallery shots Professional services The osgEarth team supports its efforts through professional services. At Pelican Mapping we do custom software development and integration work involving osg Earth(and geospatial technologies in general) We are based in the us but we work with clients all over the world Contact us if you need help! 1.1.3 License Pelican Mapping licenses osg Earth under the lgpl free open source license This means that: 1. You can link to the osg Earth SdK in any commercial or non-commercial application free of charge If you make any changes to osg Earth itself, you must make those changes available as free open source software under the LGPL license. ( Typically this means contributing your changes back to the project, but it is sufficient to host them in a public GitHub clone) 3. If you redistribute the osg Earth source code in any form, you must include the associated copyright notices and license information unaltered and intact 4. iOS/static linking exception: The LGPL, requires that anything statically linked to an LGPL library (like osg Earth) also be released under the lGPl. We grant an exception to the lGPl in this case. If you statically link osg Earth with your proprietary code, you are NOT required to release your own code under the lgpl That 's it 1. 1. 4 Maintainers Pelican Mapping maintains osg Earth. We are located in the Washington, DC area Pelican is glenn, Jason, Jeff. and Paul Chapter 1. Table of Contents OsgEarth Documentation, Release 2. 4 1.2 Building osgEarth oSg Earth is a cross-platform library. It uses the CMake build system. You will need version 2.8 or newer. (This is the same build system that Open Scene Graph uses. NOTE: To build osg Earth for iOS see ios 1.2.1 Get the source code Option 1: use GIt osg Earth is hosted on GitHub. You will need a git client to access it. We recommend TortoiseGit for Windows users To clone the repository, point your client at git: //github. com/waldron/osgearth git Option 2: download a tagged version To download a tarball or zip archive of the source code, visit the osgEarth Tags and select the one you want. The latest official release will be at the top 1.2.2 Get the Dependencies The following are required dependencies Open Scenegraph 3.0.1 or later, with the Curl plugin enabled GDAL 1.6 or later- Geospatial Data Abstraction Layer Curl-Http transfer library(comes with Open scene Graph 3rd party library distros These are the optional depedencies osg Earth will compile without them, but some functionality will be missin GEOS 3.2.0 or later-C++ library for topological operations. oSg Earth uses geos to perform various geometry operations like buffering and intersections. If you plan to use vector feature data in osg Earth, you probably want this Minizip-ZIP file extractor; include this if you want to read KMz files V8-Google's JavaScript engine. Include this if you want to embed JavaScript code in your earth files. Optional: get pre-built dependencies AlphaPixel has pre-built OSG and 3rd-party dependencies for various architectures Mike Weiblen has some pre-built OSG binaries and dependencies too FWTools has pre-built gdal binaries with all the fixins Pre-built gdal binaries for various architectures 1.2.3 Build it Make sure you built OSG and all the dependencies first. osg Earth uses CMake, version 2. 8 or later. Since OSG uses CMake as well, once you get osg built the process should 1.2. Building osgEarth OSg Earth Documentation, Release 2. 4 Here are a few tips Always do anout-of-source" build with CMake. That is, use a build directory that is separate from the source code. This makes it easier to maintain separate versions and to keep git updates clean For optional dependencies (like GEOS or v8), just leave the CMake field blank if you are not using it For the osg dependencies, just input the OSG_DIR variable, and when you generate CMake will automatically find all the other osg directories As always, check the forum if you have problems Good luck: 1.3 User Guide 1.3.1 Tools osg Earth comes with many tools that help you work with earth files and geospatial data osgearth viewer osgearth_viewer can load and display a map from and command line. The osg Earth Earth Manipulator is used to control the camera and is optimized for viewing geospatial data Sample Usage osgearth viewer earthfile earth options l Opt Ion Description sky Installs a Sky Node(sun, moon, stars and atmosphere. globe only) ocean Installs a sample ocean surface node -kml [file. kml] Loads a kml or kmz file Displays map coords under mouse dms Displays map coords as degrees/mins /seconds dd Displays map coords as decimal degrees -mgrs Displays map coords as MGrs ho Installs an orthographic camera projection au=oC⊥1p Installs an automatic clip plane handler images [path] Finds images in [path] and loads them as image layers image-extensions [* With --image s, only considers the listed extensions ouc-earth [out earth] With -images, writes out an earth file osgearth version osgearth version displays the current version of osgear Argument Description --caps Print out system capabilities mnajor-nuimoer Print out major version number only m⊥nOr- nummer Print out minor version number only -pacch-numioer Print out patch version number only so number Print out shared object version number only --version-number Print out version number onl Chapter 1. Table of Contents 【实例截图】
【核心代码】
标签:
小贴士
感谢您为本站写下的评论,您的评论对其它用户来说具有重要的参考价值,所以请认真填写。
- 类似“顶”、“沙发”之类没有营养的文字,对勤劳贡献的楼主来说是令人沮丧的反馈信息。
- 相信您也不想看到一排文字/表情墙,所以请不要反馈意义不大的重复字符,也请尽量不要纯表情的回复。
- 提问之前请再仔细看一遍楼主的说明,或许是您遗漏了。
- 请勿到处挖坑绊人、招贴广告。既占空间让人厌烦,又没人会搭理,于人于己都无利。
关于好例子网
本站旨在为广大IT学习爱好者提供一个非营利性互相学习交流分享平台。本站所有资源都可以被免费获取学习研究。本站资源来自网友分享,对搜索内容的合法性不具有预见性、识别性、控制性,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,平台无法对用户传输的作品、信息、内容的权属或合法性、安全性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论平台是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二与二十三条之规定,若资源存在侵权或相关问题请联系本站客服人员,点此联系我们。关于更多版权及免责申明参见 版权及免责申明
网友评论
我要评论