Re: [osg-users] floating point exeption in VPB...

2010-08-10 Thread Bernardt Duvenhage
Hi Torben


I checked out and successfully recompiled an unmodified VPB (trunk rev 1015) 
with GDAL 1.7.2 (GDAL 1.7.2, released 2010/04/23) and MS VS8 a few minutes ago. 
As far as I remember VPB also compiles with the version of GDAL provided with 
FWTools (GDAL 1.7.0b2, FWTools 2.4.7, released 2010/01/19). I haven't tested 
other compilers though.


Note that the GDAL version strings I give are the result of gdalinfo --version


Kind regards,
Bernardt

 Torben Dannhauer  08/10/10 8:58 AM 
Hi bduvenhage, 

You saif you are using GDAl 1.7.x ..
As I tried to compile VPB with GDAL 1.7.x last time, it failed since there are 
some modified function signatures.

Is VPB modified to work with GDAL 1.7.x ?

Thank you!

Cheers,
Torben

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





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



-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail 
legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at 
http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their 
support.

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


Re: [osg-users] Fwd: Re: floating point exeption in VPB...

2010-08-10 Thread Bernardt Duvenhage
Thanks Robert


I've used the latest version of vpb (and osg) and successfully built the blue 
marble terrain that previously led to a memory access violation and program 
crash. It does indeed seem that the problem is fixed now :-)


Regards,
Bernardt



 Robert Osfield  08/09/10 9:50 PM 
Hi Bernardt, Shayne et. al,

I've now reviewed Bernadt's change and understand the need for this.
To make the required test clearer I feel that it would be worth making
an additional test of a valid GeospatialExtents in the form of a
GeospatialExtents::nonZeroExtents() method which, this would then
replace the use of valid() method in the SourceData code.  I have now
implemented, tested and checked in this change.

I don't have any databases that trigged the numerical error so could
you guys do an svn update on the OSG and VPB and test these changes
out.

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



-- 
This message is subject to the CSIR's copyright terms and conditions, e-mail 
legal notice, and implemented Open Document Format (ODF) standard. 
The full disclaimer details can be found at 
http://www.csir.co.za/disclaimer.html.

This message has been scanned for viruses and dangerous content by MailScanner, 
and is believed to be clean.  MailScanner thanks Transtec Computers for their 
support.

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


Re: [osg-users] Fwd: Re: floating point exeption in VPB...

2010-07-14 Thread Bernardt Duvenhage
Hi Shayne

Under Win XP we've compiled and used gdal 1.7.2 as well as used gdal_fw 1.7.0b2 
(from FWTools) with the same result.

I have however looked at the code again and I think the problem is in the way 
the intersections are being generated within vpb::SourceData::readImage(...). 
The added check improves the test to find the intersection, but it can possibly 
be improved further.

I'm still not sure why the original code works on some platforms and not on 
others. It could, as we've discussed, be a floating point inaccuracy in gdal or 
vpb (or some other issue) that affects the inputs to the two pass intersection 
code. I'll investigate it a bit further.

Regards,
Bernardt


 Tueller,Shayne R Civ USAF AFMC 519 SMXS/MXDEC 07/14/10 4:39 PM  
JP, 

Thanks for the info. So I guess we can conclude that this is an esoteric 
problem.?.? Have you tried VPB 0.9.10 with different versions of GDAL? I may 
try that and see what happens (I'm using GDAL 1.7.2). I know it fails on 
both Linux 64 bit and 32 bit i386 (Fedora 10). I haven't tried it with 
Windows but it sounds like you have. 

I'm glad you guys came up with a fix...:) 

-Shayne 

-Original Message- 
From: osg-users-boun...@lists.openscenegraph.org 
[mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of J.P. 
Delport 
Sent: Wednesday, July 14, 2010 12:40 AM 
To: OpenSceneGraph Users 
Subject: Re: [osg-users] Fwd: Re: floating point exeption in VPB... 

Hi Shayne, 

On 13/07/10 23:34, Tueller, Shayne R Civ USAF AFMC 519 SMXS/MXDEC wrote: 
 Just a follow up email...the fix that Bernardt proposed in SourceData.cpp 
of 
 the VPB code, seems to have fixed the problem. I don't have any issues 
 building my database with VPB 0.9.10 now. This seems like a pretty blatant 
 problem so I'm somewhat surprised that this problem hasn't come on the 
radar 
 screen of the OSG community in general... 

Bernardt  I have speculated that it might be some floating point 
representation issue with various gdal libs or maybe the intersection 
code. We've built many databases using the same dataset on a Linux 
cluster, with a range of vpb versions, and have never encountered this 
problem. In the last week Bernardt tried to build on a Windows machine 
to enable a client to build some terrains for themselves and encountered 
this problem. 

rgds 
jp 

 
 -Shayne 
 
 -Original Message- 
 From: osg-users-boun...@lists.openscenegraph.org 
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of 
 Tueller,Shayne R Civ USAF AFMC 519 SMXS/MXDEC 
 Sent: Tuesday, July 13, 2010 10:01 AM 
 To: OpenSceneGraph Users 
 Subject: Re: [osg-users] Fwd: Re: floating point exeption in VPB... 
 
 Bernardt, 
 
 Thanks much for that input. I definitely ruled out that my problem was due 
 to the 64-bit architecture because I was able to reproduce it on 32-bit 
 Linux using VPB 0.9.10. Using the same tif file, I did not see this 
problem 
 using VPB 0.9.7. 
 
 I will try your fix to see if that works for my situation. I will report 
the 
 results. 
 
 Your contribution is most appreciated... 
 
 Regards, 
 -Shayne 
 
 -Original Message- 
 From: osg-users-boun...@lists.openscenegraph.org 
 [mailto:osg-users-boun...@lists.openscenegraph.org] On Behalf Of Bernardt 
 Duvenhage 
 Sent: Tuesday, July 13, 2010 7:07 AM 
 To: osg-users@lists.openscenegraph.org 
 Subject: Re: [osg-users] Fwd: Re: floating point exeption in VPB... 
 
 Hi Shayne 
 
 I'm experiencing a similar problem. The SourceData::readImage(...) method 
in 
 \src\vpb\SourceData.cpp gives a destWidth and readWidth of zero which 
 results in a tempImage of zero size (tempImage = new unsigned 
 char[readWidth*readHeight*pixelSpace]). 
 
 This is due to (I think) a failure of the two pass 360-degree shift test 
for 
 intersection of the destination and source bounding boxes. The 
intersection 
 is tested for 'valid()', but might still be of zero size. I adapted the 
'if 
 (!intersect_bb.valid())' test as shown below and it seems to work now. 
 
 if ((!intersect_bb.valid()) || (intersect_bb.xMin()==intersect_bb.xMax()) 
) 
 { 
 log(osg::INFO,Reading image but it does not intersect destination - 
 ignoring); 
 continue; 
 } 
 
 I'm building a simple terrain with BMNG data only. The destination bb is 
 therefore (-180,180]. The intersection test however generates a valid 
 intersection for the B1 tiff which is at (-270,-180] at some stage in the 
 two pass test. The generated intersection is valid, but of zero size and 
 hence the added condition in the above if. 
 
 I attach my SourceData.cpp as reference. 
 
 Regards, 
 Bernardt 
 
 
 J.P. Delport 07/13/10 2:37 PM 
 
 = 
 Bernardt Duvenhage 
 Senior Researcher: Optronic Sensor Systems South African Council for 
 Scientific and Industrial Research (CSIR) 
 Tel: +27 12 841 2414 
 
 
 
 
 
 
  Original Message  
 Subject: Re: [osg-users] floating point exeption in VPB... 
 Date: Mon, 12 Jul 2010 11:05:19 -0600 
 From