[Gdal-dev] customizing GDAL to make only two drivers available

Frank Warmerdam warmerdam at pobox.com
Thu Feb 27 09:11:53 EST 2003


Norman Vine wrote:
> Ayman Kamal writes:
> 
>>Is there any means to minimize the numbers of drivers
>>available in GDAL so that I can use it just to convert
>>from format "A" to format "B", I guess this way it
>>will be lighter weight. Can I do this? How?
> 
> 
> If I remember correctly you are using MSVC
> in which case I believe that you can modify the
> $GDAL_SRC/frmts/makefile.vc EXTRAFLAGS variable
> to just include the formats you want
> 
> ie this should yield a GDAL that only did tiff and bmp
> EXTRAFLAGS =	 -DFRMT_gtiff -DFRMT_bmp
> 
> on Unix like systems you need to modify the 
> $GDAL_SRC/GDALmake.opt file variable $GDAL_FORMATS

Ayman,

Norman is right on this, though you can only control what gets
included by subdirectory of gdal/frmts, so for instance, to get any
driver in the frmts/raw directory you normally get them all.  However, they
are "light".  There are also a few dependencies between drivers that may come
up.

I would add that you can save alot by not including the OGR drivers in a GDAL
build where you only need raster support.

On windows set comment out the "INCLUDE_OGR_FRMTS" flag setting to disable
inclusino of OGR.

On Unix configure with the "--without-ogr" switch.

Best regards,
-- 
---------------------------------------+--------------------------------------
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