How to specify initial viewpoint of a large geocentric dataset

classic Classic list List threaded Threaded
6 messages Options
MarkL MarkL
Reply | Threaded
Open this post in threaded view
|

How to specify initial viewpoint of a large geocentric dataset

I am building a .earth file that uses a global shoreline geocentric dataset of ESRI shapefiles.  When I run osgearth_viewer to open the .earth file, the map always centers on the same point (zero degrees latitude, 90 degrees west longitude) and the map is zoomed out to show the entire globe.  How do I specify a specific initial position and zoom level in a .earth file?
Mark
remoe remoe
Reply | Threaded
Open this post in threaded view
|

Re: How to specify initial viewpoint of a large geocentric dataset

One can use viewpoints:

https://github.com/gwaldron/osgearth/blob/3.0/tests/viewpoints.xml
Remo Eichenberger, Switzerland
MarkL MarkL
Reply | Threaded
Open this post in threaded view
|

Re: How to specify initial viewpoint of a large geocentric dataset

I have already defined a viewpoint in my .earth file, but I need to click on the link in order to zoom and pan the map to the viewpoint.  Is there a way to have it automatically zoom and pan to the viewpoint without clicking on it?
Mark
Josiah425 Josiah425
Reply | Threaded
Open this post in threaded view
|

Re: How to specify initial viewpoint of a large geocentric dataset

Hey Mark,

Not sure if this answers your question since it's in regards to the .earth file itself, but you can call setViewpoint on the EarthManipulator to have the center of the camera pan to it, you can even define a number of seconds to transition to the new viewpoint.
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: How to specify initial viewpoint of a large geocentric dataset

Mark,
That feature is not available in the earth file. Sorry!
Glenn Waldron / Pelican Mapping
MarkL MarkL
Reply | Threaded
Open this post in threaded view
|

Re: How to specify initial viewpoint of a large geocentric dataset

Hi Glenn,

Just saw your response.  Thanks for getting back to me.  

I suppose that would be more a function of the viewer application than the .earth file, but I thought I'd ask anyway.

Thanks,
Mark
Mark