[GRASS5] Re: GRASS <-> GDAL circular references

Jens Oberender grass at troja.net
Wed May 26 11:28:59 EDT 2004


Hi

> >> Maybe the functions in convert.c could go into a special GRASS/GDAL
> >> interface library, something like a new version of libgrass. I only
> >> noticed after I had done most of the work on GPJ_wkt_to_grass()
> >> etc. that Frank had written some slightly similar projection
> >information> conversion functions that are in libgrass but not in any
> >version of GRASS> itself, or GDAL. I suppose the projection information
> >conversion functions> are really only needed when importing or exporting
> >data, so they should be> grouped with the other functions that do that.
> >
> > Do you think that at least one function which produce a projection info
> > in a format known by GDAL OSR functions (WKT?) could be independent of
> > GDAL and put e.g. in libgrass_gis.so?
> 
> Well they know PROJ.4 format and that is produced independently of those 
> functions, but to produce good quality WKT with all the information there 
> requires more detail than is included in the PROJ.4 description so it is 
> really best to produce the WKT inside GRASS where it can access 
> datum.table for the EPSG datum names and other things. The OSR functions 
> are vital for producing WKT though as it is so complicated and couldn't be
> 
> done without them.
> 
> I like the idea of the functions in convert.c becoming part of the 
> GRASS-access component of GDAL some day.but it's not clear to me at the 
> minute what is the best way to go.

I would suggest (although it's a bit crucial) to move convert.c from grass
to gdal, radims stuff, so it's only build with grass-support.
A lot of the data structures and functions have to be adapted from grass
style to gdal (if possible) or normal C.
The gdal functions are used normal as it's lib internal.
The other grass functions can be used as it's linked to libgrass_gproj
already.
As I understand you, that step wouldn't harm the grass modules which use
libgrass_gproj, so it should be fine.

Frank: What is your opinion on that?

-- 
MfG
	Jens Oberender
------------------------------------
Die Liebe ist ein seltsam Ding.




More information about the grass-dev mailing list