<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I load an not georeferenced 3D model and i have the geo information in other file : DATUUM, Projection system, EPSG and an offset in meter for cartographic system and in seconds for geo system. I looking for set those informations programatically. Set the SRS is not a big deal, but I don't know how to set the offset.<br>I use a osgEarth::Map object with osgEarth::ModelLayer, I set the layer and put it in my map, then i set the SRS of my map :<br>map->getSRS()->create(".....")<br></blockquote><div><br></div><div> I think this ais all you need to do:</div><div><br></div><div><a href="http://docs.osgearth.org/en/latest/faq.html#common-usage">http://docs.osgearth.org/en/latest/faq.html#common-usage</a></div><div><br></div><div><br></div><pre style="box-sizing:border-box;font-family:consolas,"andale mono wt","andale mono","lucida console","lucida sans typewriter","dejavu sans mono","bitstream vera sans mono","liberation mono","nimbus mono l",monaco,"courier new",courier,monospace;font-size:12px;margin-top:0px;margin-bottom:0px;padding:12px;line-height:1.5;overflow:auto;color:rgb(64,64,64)">GeoTransform* xform = new GeoTransform();
...
xform->setTerrain( mapNode->getTerrain() );
...
GeoPoint point(srs, -121.0, 34.0); </pre><div><span style="color:rgb(64,64,64);font-family:consolas,"andale mono wt","andale mono","lucida console","lucida sans typewriter","dejavu sans mono","bitstream vera sans mono","liberation mono","nimbus mono l",monaco,"courier new",courier,monospace;font-size:12px">xform->setPosition(point);</span> </div><div><br></div><div><br></div><div> So, the X and Y coordinates are either the latitude and logitude (if your SRS's system is geographic) or X and Y (usually meters from the system's origin) if it's a projected SRS.</div><div><br></div><div> Does that answer your questions?</div><div><br></div><div> If you have more questions, feel free to email me privately, as I don't always see osgEarth questions on the OSG mailing list.</div><div><br></div><div><br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Cheers,<br>
Djoé<br><br></blockquote><div> </div></div><br clear="all"><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div style="text-align:center">Chris 'Xenon' Hanson, omo sanza lettere. Xenon@AlphaPixel.com <a href="http://www.alphapixel.com/" target="_blank">http://www.alphapixel.com/</a></div><div style="text-align:center">Training • Consulting • Contracting</div><div style="text-align:center">3D • Scene Graphs (Open Scene Graph/OSG) • OpenGL 2 • OpenGL 3 • OpenGL 4 • GLSL • OpenGL ES 1 • OpenGL ES 2 • OpenCL</div><div style="text-align:center"><span style="font-size:12.8px">Legal/IP •</span><span style="font-size:12.8px"> </span><span style="font-size:12.8px">Code Forensics •</span><span style="font-size:12.8px"> </span>Digital Imaging • GIS • GPS • osgEarth • Terrain • Telemetry • Cryptography • LIDAR • Embedded • Mobile • iPhone/iPad/iOS • Android</div><div style="text-align:center"><a href="https://twitter.com/alphapixel" target="_blank">@alphapixel</a> <a href="http://facebook.com/alphapixel" target="_blank">facebook.com/alphapixel</a> (775) 623-PIXL [7495]</div></div></div></div></div>
</div></div>