Re: [osg-users] osgText crash

2015-04-09 Thread Alexander Bobkov
Robert,

thanks! I'll try this helper marco.

Cheers,
Alexander

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63310#63310





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


[osg-users] osgText crash

2015-04-09 Thread Alexander Bobkov
Hi,

My osgEarth based application was crashing from time to time (3-4 times a day). 
It was not easy to debug. But eventually I've caught the problem place in 
Release with Debug info mode.

DatabasePager thread crashed in osgText/Font.cpp file in the function:


Code:
osg::ref_ptrFont Font::getDefaultFont()
{
static OpenThreads::Mutex s_DefaultFontMutex;
OpenThreads::ScopedLockOpenThreads::Mutex lock(s_DefaultFontMutex);

static osg::ref_ptrFont s_defaultFont = new DefaultFont;
return s_defaultFont;
}



I suppose that scoped static variable initialization is not thread-safe.

Perhaps the s_DefaultFontMutex variable should be the global.

Regards,
Alexander

--
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=63290#63290





___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org


Re: [osg-users] [vpb] Shift of coordinates

2010-08-09 Thread Alexander Bobkov

 Hi,

maybe my previous message was a bit vague. I'll try to explain my 
problem more accurately.
I have a georeferenced image with a road in high resolution (0.5m). And 
I have a vector road in KML-file made with Google Earth.

There is exact match between vector road and raster road in Google Earth.
I have even made a test in QuantumGIS: I added there the image and 
KML-file and got the same result  - vector road is on raster road.


But when I place vector road on a VPB terrain, the road is shifted to 
the west.


There is two logical explanations:
1) Error with the texture in VPB or OSG
2) Error in osg::EllipsoidModel

This is gdalinfo for my image:

Driver: GTiff/GeoTIFF
Files: GeoEye_fus_50sm.tif
Size is 39877, 25458
Coordinate System is:
GEOGCS[WGS 84,
DATUM[WGS_1984,
SPHEROID[WGS 84,6378137,298.2572235629972,
AUTHORITY[EPSG,7030]],
AUTHORITY[EPSG,6326]],
PRIMEM[Greenwich,0],
UNIT[degree,0.0174532925199433],
AUTHORITY[EPSG,4326]]
Origin = (160.053108789177884,54.496583902721099)
Pixel Size = (0.06107432741,-0.06107432741)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  ( 160.0531088,  54.4965839) (160d 3'11.19E, 54d29'47.70N)
Lower Left  ( 160.0531088,  54.3411009) (160d 3'11.19E, 54d20'27.96N)
Upper Right ( 160.2966549,  54.4965839) (160d17'47.96E, 54d29'47.70N)
Lower Right ( 160.2966549,  54.3411009) (160d17'47.96E, 54d20'27.96N)
Center  ( 160.1748818,  54.4188424) (160d10'29.57E, 54d25'7.83N)
Band 1 Block=39877x1 Type=Byte, ColorInterp=Red
  Overviews: 19939x12729, 9970x6365, 4985x3183, 2493x1592, 1247x796
Band 2 Block=39877x1 Type=Byte, ColorInterp=Green
  Overviews: 19939x12729, 9970x6365, 4985x3183, 2493x1592, 1247x796
Band 3 Block=39877x1 Type=Byte, ColorInterp=Blue
  Overviews: 19939x12729, 9970x6365, 4985x3183, 2493x1592, 1247x796

Regards,
Alexander


07.08.2010 13:23, Александр Бобков пишет:

 Hi,

I have a georeferenced image with resolution 0.5m. This image was 
added to Google Earth Pro and there was created several paths and 
marks. This is screenshot from Google Earth with a path: 
http://img155.imageshack.us/i/googleearth.jpg/


Then I created a VPB terrain with the same image. I exported paths 
from Google Earth to KML file, got geocoordinates and placed them on 
the VPB terrain. Here is screenshot from the VPB terrain: 
http://img175.imageshack.us/i/openscenegraph.png/


As you can see, there is a small constant shift to the west. 
Approximately 1m. How can I fix this shift? What is the reason for it?


I use osg::EllipsoidModel to convert coordinates. Coordinates in KML 
file have a very high precision. For example: 160.1361826749267, 
54.43656637255538, 0


Regards,
Alexander
___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org




___
osg-users mailing list
osg-users@lists.openscenegraph.org
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org