[gdal-dev] Compiling only OGR

Frank Warmerdam warmerdam at pobox.com
Fri Feb 4 08:54:19 EST 2011


On 11-02-04 02:54 AM, Helm, P.W. (Pim) van den wrote:
> Hi all,
> I am using only vertex calculation (OGR part) of GDAL. Using the GDAL library
> does the work perfectly, but I think this 6mb+ dll is rather large for my usage
> only.

Pim,

If you really want to trim down GDAL/OGR you will likely have to do some
fiddling.  I'd start by going through gdal/frmts/makefile.vc and removing
most formats from the EXTRAFLAGS list (each -DFRMT_xxx relates to one of the
subdirectories).

Because of relations to stuff on the OGR side you may find you need
to keep the FRMT_pcidsk and FRMT_sdts items.  You may also find that
you need to keep FRMT_gtiff because the geotiff machinery is used
to lookup EPSG coordinate systems, and FRMT_zlib (added below) for
other things using compression.

You might be able to skip building in all the stuff in
gdal/alg by removing it from gdal/makefile.vc but you will also
likely need to remove some entry points from BASE_INCLUDE in
gdal/makefile.vc.


> Further more, do I really need the link to proj4 if I only refer to EPSG
> systems, since this also enlarges my project?

PROJ.4 is usually loaded at runtime so if you don't need it just
don't distribute PROJ.DLL. Note that if you use
OGRCoordinateTransformation then you will need PROJ.4 even if you
just use EPSG coordinate systems.

It would be nice if your and others findings with doing slimmed down
builds could find its way into the trac wiki - perhaps in the

   http://trac.osgeo.org/gdal/wiki/BuildingOnWindowsWithMinimizedDrivers

page or elsewhere as appopriate off:

   http://trac.osgeo.org/gdal/wiki/BuildHints

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