Conversion of mapogr.cpp to use OGR C API

Frank Warmerdam warmerdam at POBOX.COM
Wed Mar 28 18:00:05 EDT 2007


Daniel Morissette wrote:
> Daniel Morissette wrote:
>>
>> This is a relatively straightforward conversion that doesn't affect 
>> functionality. The most noticeable impact will be that mapogr.cpp will 
>> be renamed mapogr.c (and will lose its CVS history).
>>
> 
> Actually, another possible impact is that if changes are required in 
> GDAL to support this (for instance addition of new OGR C API methods to 
> support style stuff) then MapServer 5.0 may require an upgrade of GDAL 
> to v1.5.0 or whatever the next release will be.

Daniel,

Oh dear - this is messy.  I do believe you will need to add C wrappers for
some of the style stuff in GDAL/OGR, and that will go into GDAL 1.5.0 which
won't even be released till circa August.   I don't think it is prudent to
require MapServer 5 users to require GDAL 1.5.0.

Perhaps you should leave the file as mapogr.cpp, and use conditional
compilation based on the GDAL version in the bits of style stuff that
have a problem.  Keep using the C++ API if GDAL version is less than 1.5.

That way mapserver benefits from the changes as GDAL 1.5 becomes widely
deployed, but there is no negative implications for users of older
GDAL versions.

The downside is a bunch of cruft in mapogr.cpp for a while, and that we
don't get rid of the need for C++ compilation of this one module yet.

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    | President OSGeo, http://osgeo.org



More information about the mapserver-dev mailing list