ObjectPlacer altitude/height units

classic Classic list List threaded Threaded
3 messages Options
Adam Adam
Reply | Threaded
Open this post in threaded view
|

ObjectPlacer altitude/height units

In ObjectPlacer::createPlacerMatrix it says:
@param height Height above the terrain (in local units)

Is there any way to tell what units a MapNode is using? or by local units do you mean with no connection to map units?

Basically I want to be able to enter 10,000ft or 3km above terrain or sea level.  The conversions are obviously not a problem, but I need to know what altitude the terrain is at and what unit the altitude is.

For example, right now I can enter
createPlacerMatrix(0, 0, 0, out_result)
createPlacerMatrix(0, 0, 10, out_result)
createPlacerMatrix(0, 0, 1000, out_result)
and there is no visual difference.

Using geocentric map with GDAL driver loading DTED0 and vertical_scale = 30.
gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: ObjectPlacer altitude/height units

Adam,

There's no way to tell throught the API yet. It's on the todo list :)

For a geocentric map, the units will always be meters. For a projected map, they will be the same as the native linear units of that projected map. If you are using a plate carre setup (flat lat=y long=x) ... don't.

Also, there is a new osgEarthUtil::ElevationManager class that does a better job of elevation queries. When I get around to it, ObjectPlacer will migrate to use the ElevationManager under the hood.

It's possible that your huge vertical scale might be causing the ObjectPlacer to fail, if the intersector is not long enough. At some point we'll make that configurable.

Glenn
Glenn Waldron / Pelican Mapping
Adam Adam
Reply | Threaded
Open this post in threaded view
|

Re: ObjectPlacer altitude/height units

Glenn,

Thanks your first sentence was what I was looking for.

The huge scale is for show right now to test elevation and draping features.