[FWTools] Including drivers into fwtools...

Frank Warmerdam warmerdam at pobox.com
Sun Dec 4 10:02:23 EST 2005


On 12/4/05, Agostino Fiorani <agostino.fiorani at fastwebnet.it> wrote:
>               I would like to knows if there is a way to include a new
> driver to FWtools.
>
> I am infact working with MSG data which are not included in the list of
> supported formats.
>
> If not am I forced to build everything (gdal , and all the others linked
> libraries) again?

Agostino,

I deliberately distribute all the GDAL include files with the
FWTools releases, so that folks can build plugin drivers if
they have the know-how.   This is fairly straight forward with
the GRASS driver, because it is offered as a standalone
plugin driver with appropriate build files.  With other drivers
it is more tricky, and likely involves you preparing your own
makefile.

For something simple like the RMF driver that has no external
dependencies other than GDAL, you might be able to do something
like:

 g++ -shared -o gdal_RMF.so -I$FWTOOLS_HOME/include rmfdataset.cpp \
        -L$FWTOOLS_HOME/lib -lgdal

On win32 the corresponding build lines might be:

 cl /I%FWTOOLS_HOME% rmfdataset.cpp
 link /dll rmfdataset.obj %FWTOOLS_HOME%\lib\gdal_i.lib /out:gdal_RMF.dll

The DLL or shared library should be dumped into the FWTools\gdal_plugins
directory on win32, or on linux ... Hmm, that isn't pre-setup.

The build for the MSG driver will be somewhat more complex
since it has several files, and depends on external libraries.  But
still achievable.  Note, I didn't try the above compile lines, so I may
have a few errors.  The AutoLoadDrivers() method is described at the
following url, which may be helpful.

  http://www.gdal.org/classGDALDriverManager.html#1e10f0276813a9996f7f7c57486e787b

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 FWTools mailing list