annotation text in 2d or 3d

classic Classic list List threaded Threaded
5 messages Options
jaisingla jaisingla
Reply | Threaded
Open this post in threaded view
|

annotation text in 2d or 3d

Hello All,

Text displayed through shape files are rendered as 2D or 3D text ?

if 2D can we change it to 3D ? How to do that ?


gwaldron gwaldron
Reply | Threaded
Open this post in threaded view
|

Re: annotation text in 2d or 3d

osgEarth only supports 2D text.
Glenn Waldron / Pelican Mapping
jay jay
Reply | Threaded
Open this post in threaded view
|

Re: annotation text in 2d or 3d

Hi
In case 3d text is required . How it can be placed
Nikkitta Nikkitta
Reply | Threaded
Open this post in threaded view
|

Re: annotation text in 2d or 3d

Hi,

You can set position of 3D text in OSG coordinates (world). So you  just need to convert coordinates from geographical to world.
Here is a small code sample:

osg::Vec3d textPostiton;      // World coordinates
GeoPoint textGeoPosition;     // Geographical coordinates
textGeoPosition.set(geoSRS, LONGITUDE, LATITUDE, ALTITUDE, ALTMODE_ABSOLUTE);    // Set Lat, Lon, Alt for point on Earth
textGeoPosition.toWorld(textPostiton);   // Convert geo to world

osgText::Text3D* text3d = new osgText::Text3D(); ...   // Create 3D text and its settings

text3d->setPosition(textPostiton);   // Set 3D text position

I can't say how this label will behave while Earth rotating, but anyway you can set its rotation with text3d->setRotation();
Best regards,
Nikita Petrov
jay jay
Reply | Threaded
Open this post in threaded view
|

Re: annotation text in 2d or 3d

Hello

Thanks for replying.
We have to use text symbology class to put all vector labels ??
In that case how to achieve it in 3d
Best regards
Jay