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