[GRASS5] GRASS <-> GDAL circular references

Paul Kelly paul-grass at stjohnspoint.co.uk
Fri May 21 12:58:35 EDT 2004


On Fri, 21 May 2004, Glynn Clements wrote:

>
> Radim Blazek wrote:
>
>> because of conflicts between GRASS and libgrass when used together
>> (the same names of functions), I have tried to rewrite
>> GRASS driver in GDAL to use GRASS 5.7 shared libs.
>> I used GPJ_grass_to_wkt to get projection informations, unfortunately
>> libgrass_gproj is linked to libgdal which makes circular reference.
>> The same problem will be with potential GRASS vector driver in OGR.
>>
>> What is the correct solution?
>
> Probably to remove the GDAL stuff from libgrass_gproj. 5.0/5.3 worked
> OK without it.

But then GPJ_grass_to_wkt() won't work as it relies on the co-ordinate 
system conversion functions in OGR/GDAL. It uses a lot of them and they 
are far too complicated to make a copy of them all and include in GRASS.

It is conceivably a good idea that the modules that use libgrass_gproj 
only for re-projecting don't have to rely on being linked to GDAL when 
they don't use any of it, but that is not relevant here as Radim 
specifically wants to use one of the libgrass_gproj functions that relies 
on GDAL/OGR.

> Given the nature of GDAL (C++, many dependencies, possible dependency
> upon GRASS), the less that depends upon it, the better.

Yes ideally just import/export modules but then that is kind of what we're 
talking about here?




More information about the grass-dev mailing list