Questions tagged [osgearth]

osgEarth is a geospatial SDK and terrain engine for OpenSceneGraph applications

28 questions
1
vote
1 answer

How to correctly loading shp file by code

I am trying to load a .shp file by OGRFeatureSource class, and it is not showing in the scene, but when I load .earth file, using osgearth_viewer by arguments, the shape file works. Any errors are printing on terminal. I based my code on tutorials…
Victor
  • 13
  • 2
1
vote
1 answer

OSG Earth camera position

I am writing to you after several negative attempts. I am working with OSGEarth, in particular I cannot set the longitude, latitude and height of the camera for the starting position. I'm afraid it is associated with the fact that I use the…
1
vote
2 answers

How to use osgearth with vcpkg

I've installed osgearth package with vcpkg with following command: vcpkg.exe install osgearth:x64-windows Now in a CMake I want to use it. cmake_minimum_required (VERSION 3.10.0) project (osgmap) add_definitions…
Jepessen
  • 11,744
  • 14
  • 82
  • 149
1
vote
1 answer

Lines not showing up in osgEarth & Qt

I am attempting to use osgEarth in a Qt (5.12) application on Windows, and I am having some trouble with it showing lines - as in, they are simply not showing up. Following some of the instructions to build osg, osgQt, and osgEarth here on Stack…
Bavid80
  • 13
  • 2
1
vote
0 answers

How to create a osg::Image object in Android?

On iOS/windows I can create a osg::Image object by this: osg::ref_ptr icon = osgDB::readRefImageFile(filePath); the filePath param could be the "Resource/a.png", which is a relative path in the project. but this could not work in…
1
vote
1 answer

How to add osgEarth Features at runtime?

I'm playing around with osgEarth and while it's crazy easy to add features in the .earth file, I'm struggling to do it at runtime via the API. I want to let the user draw polygons on the map/globe so I need to be able to dynamically define geometry…
Moohasha
  • 245
  • 1
  • 13
1
vote
0 answers

osgEarthQt app crash on startup with error

i am using Qt 5.11.2 / osgEarth 2.9.0. When I try to run the code below, I get an error: Cannot make QOpenGLContext current in a different thread I tried to find a solution on the Internet, but found only similar situations where people were just…
garbart
  • 55
  • 4
1
vote
2 answers

OSG/OSGEarth How to move a Camera

I'm making a Drone simulator with OSGEarth. I never used OSG before so I have some troubles to understand cameras. I'm trying to move a Camera to a specific location (lat/lon) with a specific roll, pitch and yaw in OSG Earth. I need to have multiple…
Tom Henoch
  • 13
  • 4
1
vote
2 answers

Why is osgEarth not building with Qt?

I'm trying to build osgEarth with Quarts. Instructions on the official website reads: Point the QT_QMAKE_EXECUTABLE CMake variable to the qmake.exe you want to use and CMake will populate all the other QT variables. Good. I do the…
garbart
  • 465
  • 4
  • 19
1
vote
1 answer

Build osgEarth application from Qt Creator

I tried to run simple osgearth example: #include #include #include #include #include #include #include…
1
vote
1 answer

how can i draw a triangle on the osgearth with osg api

I want to draw triangle on the earth. If I draw the triangle by the class osgEarth::Features::Feature there is no problem. for example: void DrawGeometryByFeature(ListVec3d& vecList, std::vector& lstIndices) { …
Leo
  • 13
  • 5
0
votes
0 answers

How to draw circle using osgEarth::CircleNode?

Here is my current code: osgEarth::Style style; auto cn = new osgEarth::Annotation::CircleNode(_mapNode, pointsWgs84.at(0), 100, style); _mapNode->addChild(cn); pointsWgs84 is vector of osg::GeoPoint objects. It should work correctly, but I didn't…
nick_redwill
  • 43
  • 1
  • 6
0
votes
0 answers

C++ library import with problem when adding the osg and the osgearth lib

I try to add the osg and the osgearth lib to my Qt project.After qmake I try to build the whole project but something is wrong.Here are the errors and my .pro file I have tried clear the whole project and qmake again,then rebuild the project,but…
qizijia
  • 11
  • 6
0
votes
0 answers

Load texture from OpenGL context to OpenSceneGraph context

This is my first time writing, so I apologize in advance for possible errors, repetitions or incorrect formatting.... First of all, using JOGL I created a texture and loaded it inside an OpenGL context. So, I passed the context id and the texture id…
0
votes
1 answer

Cmake not able to find a directory even if it is specified in CmakeSettings.json in visual studio 2022

I am trying to build a project which requires to have OsgEarth installed from source code and not vcpkg. I build the Osgearth and now I have set the OSGEARTH_DIR (in the CmakeSettings.json) to the place where I build it from the source. I am using…
arc111
  • 1
  • 1
1
2