[Gdal-dev] GDAL 1.2.0 Beta Release - Error
Frank Warmerdam
warmerdam at pobox.com
Tue Mar 2 11:05:03 EST 2004
Lorenzo Moretti wrote:
>> Folks,
>>
>> I have worked hard clearing up old bug reports, and reported build
>> problems
>> with the GDAL alpha release and now I have a new cut I consider "Beta"
>> quality.
>> I would appreciate people checking it out and reporting any problems.
>>
>> If all goes well, I may cut a final release essentially matching this in a
>> couple of days.
>>
>> ftp://ftp.remotesensing.org/gdal/gdal-1.2.0b.tar.gz
>> ftp://ftp.remotesensing.org/gdal/gdal120b.tar.gz
>
>> Best regards,
>
>
> Until gdal_cvs-1.2.0a I have built binary in OSX very well.
>
> From this version 1.2.0b it's impossible to build from source.
> The error is in raw format (inside frmts formats)
>
> This is the error:
>
> ....
>
> /bin/sh ../../libtool --mode=compile g++ -Wall -O3 -fno-common
> -no-cpp-precomp -DCPL_MULTIPROC_PTHREAD -I../../port -I../../gcore
> -I../../ogr -I../../port -c -o ../o/fastdataset.o fastdataset.cpp
>
> g++ -Wall -O3 -fno-common -no-cpp-precomp -DCPL_MULTIPROC_PTHREAD
> -I../../port -I../../gcore -I../../ogr -I../../port -c
> fastdataset.cpp -fno-common -DPIC -o ../o/.libs/fastdataset.o
>
> fastdataset.cpp: In function `static GDALDataset*
>
> FASTDataset::Open(GDALOpenInfo*)':
>
> fastdataset.cpp:607: warning: `char*pszValue' might be used
> uninitialized in
>
> this function
>
> g++ -Wall -O3 -fno-common -no-cpp-precomp -DCPL_MULTIPROC_PTHREAD
> -I../../port -I../../gcore -I../../ogr -I../../port -c
> fastdataset.cpp -o ../o/fastdataset.o >/dev/null 2>&1
>
> /bin/sh ../../libtool --mode=compile g++ -Wall -O3 -fno-common
> -no-cpp-precomp -DCPL_MULTIPROC_PTHREAD -I../../port -I../../gcore
> -I../../ogr -I../../port -c -o ../o/atlsci_spheroid.o
> atlsci_spheroid.cpp
>
> g++ -Wall -O3 -fno-common -no-cpp-precomp -DCPL_MULTIPROC_PTHREAD
> -I../../port -I../../gcore -I../../ogr -I../../port -c
> atlsci_spheroid.cpp -fno-common -DPIC -o ../o/.libs/atlsci_spheroid.o
>
> g++ -Wall -O3 -fno-common -no-cpp-precomp -DCPL_MULTIPROC_PTHREAD
> -I../../port -I../../gcore -I../../ogr -I../../port -c
> atlsci_spheroid.cpp -o ../o/atlsci_spheroid.o >/dev/null 2>&1
>
> /bin/sh ../../libtool --mode=compile g++ -Wall -O3 -fno-common
> -no-cpp-precomp -DCPL_MULTIPROC_PTHREAD -I../../port -I../../gcore
> -I../../ogr -I../../port -c -o ../o/btdataset.o btdataset.cpp
>
> g++ -Wall -O3 -fno-common -no-cpp-precomp -DCPL_MULTIPROC_PTHREAD
> -I../../port -I../../gcore -I../../ogr -I../../port -c
> btdataset.cpp -fno-common -DPIC -o ../o/.libs/btdataset.o
>
> btdataset.cpp: In member function `virtual CPLErr
> BTRasterBand::IReadBlock(int,
>
> int, void*)':
>
> btdataset.cpp:133: error: `nWordSize' undeclared (first use this
> function)
>
> btdataset.cpp:133: error: (Each undeclared identifier is reported
> only once for
>
> each function it appears in.)
>
> make[2]: *** [../o/btdataset.o] Error 1
>
> make[1]: *** [raw-install-obj] Error 2
>
> make: *** [frmts-target] Error 2
>
> [lor:APPLI/gdal-cvs-040302] lor%
>
>
> The file btdataset.cpp has a new version (1.4 vs 1.3 of old 1.2.0a).
> I check this file and at line 130
>
> /*
> -------------------------------------------------------------------- */
>
> /* Swap on MSB
> platforms. */
>
> /*
> -------------------------------------------------------------------- */
>
> #ifdef CPL_MSB
>
> GDALSwapWords( pImage, nDataSize, nRasterYSize, nWordSize );
>
> #endif
>
>
> nWordSize is undeclared.
>
> Thank for fixing !!
Lorenzo,
Sorry about that ... my error. I have fixed this in CVS, committed
the fix and replaced the beta tarballs and zip.
> Another problem:
>
> I have QUICK BIRD image files:
>
> Gdal read the band in wrong mode.
> It creates
> xxxx.red channel
> xxxx.green channel
> xxxx.blue channel
> xxxx.alpha channel
>
> QUICK BIRD has this format
> xxxx.blue channel
> xxxx.green channel
> xxxx.red channel
> xxxx.alpha channel
>
> QUICK BIRD has 4 files
> 03MAY19095313-M2AS_R1C2-000000040462_01_P002.TIF (Multispectral file)
> 03MAY19095313-M2AS_R1C2-000000040462_01_P002.TIL (Tile of group
> image)
> 03MAY19095313-M2AS_R1C2-000000040462_01_P002.IMD (Image description)
> 03MAY19095313-M2AS_R1C2-000000040462_01_P002.RPB (Parameter of image)
>
> Is it possible to fix this error ??
If you want to reorder the bands it is possible to do so with some tricky
steps.
Basically, build a .vrt file corresponding to the input file:
gdal_translate -of VRT bgra.tif bgra.vrt
Then edit the .vrt file with a text editor, and change the <SourceBand>
values around to the order you want. For instance, change the
<SourceBand> for the first VRTRasterBand to 3, the 2nd to 2, and the
3rd to 1.
Then convert the .vrt file back into a TIFF file and it should be reordered.
gdal_translate bgra.vrt rgba.tif
Good luck,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | Geospatial Programmer for Rent
More information about the Gdal-dev
mailing list