[Mapserver-dev] cpl utility functions

Daniel Morissette dmorissette at dmsolutions.ca
Wed Jul 21 17:01:27 EDT 2004


Yewondwossen Assefa wrote:
> 
>   I need to use some utility function that are available in gdal cpl_xxx 
> library. (In this specific case it is functions like CPLGetBasename). At 
> the same time, It seems a bit odd to add a dependency to GDAL/OGR just 
> to have access to a couple of functions. (in this case It is the swf 
> module and It should normally not need gdal to work).
> 
>   What is the general guidline for such a case ? Do we need to add the 
> dependency ? Do I copy the functions inside mapserver utility files ?
> 

In the past we've always tried to avoid using CPL in MapServer source 
(except in code that relies on GDAL/OGR already). What I've done when I 
ran into those cases was either find another way to do the same thing, 
or implement an equivalent function (or rename and copy the CPL 
function) in mapstring.c or where it fits best.

I'm not sure it's a good idea to create a dependency on CPL, but OTOH it 
provides several very useful utility functions that we often end up 
having to replicate... let's see what others think.

Daniel
-- 
------------------------------------------------------------
  Daniel Morissette               dmorissette at dmsolutions.ca
  DM Solutions Group              http://www.dmsolutions.ca/
------------------------------------------------------------




More information about the mapserver-dev mailing list