[gdal-dev] Using MEM datasets in librarified functions

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] Using MEM datasets in librarified functions

Joaquim Luis

HI,

 

Is that supposed to work?

 

We have a kind of toy program in GMT that calls a couple of librarified functions. It works well when the hSrcDS in

https://github.com/GenericMappingTools/gmt/blob/master/src/gmt_gdal_librarified.c#L382

 

was obtained with

 

hSrcDS = GDALOpen(fname_in, GA_ReadOnly);

 

but I want now to be able to use in memory data and created a MEM dataset whose handle works fine when used in GDALCreateCopy(). However, it crashes GDAL when used, for example, in GDALGrid()

 

Thanks from my sofa

 

Joaquim


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Using MEM datasets in librarified functions

Even Rouault-2
On lundi 23 mars 2020 17:49:27 CET Joaquim Manuel Freire Luís wrote:
> HI,
>
> Is that supposed to work?

Yes, should work

> but I want now to be able to use in memory data and created a MEM dataset
> whose handle works fine when used in GDALCreateCopy(). However, it crashes
> GDAL when used, for example, in GDALGrid()

Self-contained reproducer please :-)

Even

--
Spatialys - Geospatial professional services
http://www.spatialys.com
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: Using MEM datasets in librarified functions

Joaquim Luis
Even, hard to send a MWE. The workflow involves using Julia from where I call GMT like you do with the GDAL Python bindings. If you are so low in occupation I'll be happy to explain the whole procedures.

But I built GDAL debug and caught the crash at gdalmajorobject.cpp See attached image.


On lundi 23 mars 2020 17:49:27 CET Joaquim Manuel Freire Luís wrote:
> HI,
>
> Is that supposed to work?

Yes, should work

> but I want now to be able to use in memory data and created a MEM
> dataset whose handle works fine when used in GDALCreateCopy().
> However, it crashes GDAL when used, for example, in GDALGrid()

Self-contained reproducer please :-)

Even

--
Spatialys - Geospatial professional services http://www.spatialys.com

_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Capture.PNG (91K) Download Attachment