[GRASS5] Re: GPJ_osr_to_grass
radim.blazek at gmail.com
Fri Jan 27 13:30:10 EST 2006
There was also another bug involved (G_asprintf, BTW
use G_store to make a copy of a string; BTW2 asprintf was never
used on Linux).
I have submited some fixes to QGIS and GRASS. It seems
that QGIS+GRASS now work on Windows and Linux
if both are in HEAD. Unfortunately QGIS HEAD does not
work with old version of GRASS (not fixed, 6.0.x).
I'll have to use GRASS_VERSION_MAJOR/GRASS_VERSION_MINOR.
On 1/27/06, Paul Kelly <paul-grass at stjohnspoint.co.uk> wrote:
> Hello Radim
> On Fri, 27 Jan 2006, Radim Blazek wrote:
> > but in the body it is used as OGRSpatialReferenceH not OGRSpatialReferenceH*,
> > for example OSRMorphFromESRI( hSRS ) which is defined as
> > OGRErr OSRMorphFromESRI( OGRSpatialReferenceH hSRS )
> > The parameter should be changed to OGRSpatialReferenceH hSRS
> > or should it be used in the body as *hSRS? It seems that in GRASS
> > is the function called with OGRSpatialReferenceH*.
> > How can it work on Linux? On Windows it either crashes if
> > the parameter is passed as (void **) OGRSpatialReferenceH or
> > does not work if passed as OGRSpatialReferenceH*.
> Yes I think there is a bug there. I remember not totally understanding it
> when I was writing it and being confused by the abstraction in the OGR
> function definitions. I think the OSRMorphFromESRI() function might be a
> problem, as it changes the contents of the OGRSpatialReferenceH structure. All
> the other function calls just read from it, but it writes to it. Could you
> try the attached patch which creates a copy of the OGRSpatialReferenceH
> structure only for use in the GPJ_osr_to_grass() function, and see if it
> fixes the problem or changes anything? I am still not 100% sure what is
More information about the grass-dev