v@lists.osgeo.org <mailto:gdal-dev@lists.osgeo.org>
*Subject:* Re: [gdal-dev] pass gdal dataset as an argument from
Python to C
Shawn,
PyObject and GDALDatasetH are incompatible types and you can't
pass the former to a function that expects the latter. I'm
surpr
] pass gdal dataset as an argument from Python to C
On lundi 27 novembre 2017 11:46:50 CET Sean Gillies wrote:
> I believe it's possible, yes, but it will be challenging. I'm not aware of
> anybody else doing this.
>
> In
> https://github.com/OSGeo/gdal/blob/trunk/gd
On lundi 27 novembre 2017 11:46:50 CET Sean Gillies wrote:
> I believe it's possible, yes, but it will be challenging. I'm not aware of
> anybody else doing this.
>
> In
> https://github.com/OSGeo/gdal/blob/trunk/gdal/swig/python/extensions/gdal_wr
> ap.cpp you can see examples of C++ functions th
ilename")
>
> result = _my_c_module.function1(ds)
>
>
>
> is this possible? If yes, how?
>
>
>
>
> Shawn
> ------
> *From:* Sean Gillies [s...@mapbox.com]
> *Sent:* November-27-17 11:09 AM
> *To:* Shawn Gong
> *Cc:* g
.com]
Sent: November-27-17 11:09 AM
To: Shawn Gong
Cc: gdal-dev@lists.osgeo.org
Subject: Re: [gdal-dev] pass gdal dataset as an argument from Python to C
Shawn,
PyObject and GDALDatasetH are incompatible types and you can't pass the former
to a function that expects the latter. I'm surp
Shawn,
PyObject and GDALDatasetH are incompatible types and you can't pass the
former to a function that expects the latter. I'm surprised your program
can compile with these incompatible types.
Do you mean for your module to extend GDAL's Python bindings? If you look
inside the C code of GDAL's
Hi list,
Has anyone done this before?
I try to pass a gdal dataset as an argument from Python to C.
in my C code, I have
PyObject* py_my_func(PyObject *self, PyObject *args)
{
PyObject *poDataset;
if(!PyArg_ParseTuple(args, "Odd", &poDataset, &a1, &a2))
{
return NULL;
}