[gdal-dev] Wrong number or type of arguments for overloaded function 'CoordinateTransformation_TransformPoint'
Even Rouault
even.rouault at spatialys.com
Wed Feb 11 05:11:05 PST 2015
Brendan,
thanks for the follow-up. I've just committed a fix so that the error report is
hopefully clearer now:
$ python swig/python/samples/tolatlong.py 0 0 byte.png
ERROR: Cannot import projection ''
Even
Le mercredi 11 février 2015 14:01:30, DeTracey, Brendan a écrit :
> I found the problem, and wanted to my idiot mistake archived for posterity.
> The CoordinateTransformation_TransformPoint error is thrown when a raster
> has no projection. I was working with a raster that I had created myself
> from vectors. I finally tried another sample raster and it worked. I am
> new to this, so my advice to other newbs is that if your product is not
> working try another known sample before posting questions. And always
> always always run ogrinfo/gdalinfo on your product to make sure nothing is
> missing. Once I ran gdalinfo on my geotiff and saw that: Coordinate System
> is `'
> I knew I had made a newbie mistake. Exported my source SRS as WKT and set
> as my raster projection. Problem solved.
>
> > -----Original Message-----
> > From: gdal-dev-bounces at lists.osgeo.org [mailto:gdal-dev-
> > bounces at lists.osgeo.org] On Behalf Of Kyle Shannon
> > Sent: February-10-15 2:46 PM
> > To: gdal-dev at lists.osgeo.org
> > Subject: Re: [gdal-dev] Wrong number or type of arguments for overloaded
> > function 'CoordinateTransformation_TransformPoint'
> >
> > Brendan,
> >
> > On 02/10/2015 11:13 AM, DeTracey, Brendan wrote:
> > > The should be on the path. (Very strange that the Anaconda installer
> > > dumped a copy in its root directory.)
> > >
> > > C:\Users\DeTraceyB\AppData\Local\Continuum\Anaconda>echo %PATH%
> >
> > C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\
> > Sys
> >
> > > tem32\WindowsPowerShell\v1.0\;C:\Program
> > > Files\MATLAB\R2012a\bin;C:\Program Files
> >
> > (x86)\MATLAB\R2010bSP1\bin;C:\Users\DeTraceyB\AppData\Local\Continuum
> > \
> >
> > > Anaconda;C:\Users\DeTraceyB\AppData\Local\Continuum\Anaconda\Scripts;
> > >
> > > C:\Users\DeTraceyB\AppData\Local\Continuum\Anaconda>dir proj.*
> > >
> > > Volume in drive C is OSDisk
> > > Volume Serial Number is 7A59-3F7E
> > >
> > > Directory of C:\Users\DeTraceyB\AppData\Local\Continuum\Anaconda
> > >
> > > 06/02/2015 07:45 AM 369,152 proj.dll
> > > 06/02/2015 07:45 AM 19,456 proj.exe
> > >
> > > 2 File(s) 388,608 bytes
> > > 0 Dir(s) 76,317,147,136 bytes free
> > >
> > > C:\Users\DeTraceyB\AppData\Local\Continuum\Anaconda>proj.exe
> > > Rel. 4.8.0, 6 March 2012
> > > usage: proj.exe [ -beEfiIlormsStTvVwW [args] ] [ +opts[=arg] ] [ files
> > > ]
> > >
> > > I also tried adding to the script :
> > > gdal.SetConfigOption('PROJSO',
> > > 'C:\Users\DeTraceyB\AppData\Local\Continuum\Anaconda\proj.dll')
> > >
> > > This also did not work.
> > >
> > >> -----Original Message-----
> > >> From: Even Rouault [mailto:even.rouault at spatialys.com]
> > >> Sent: February-10-15 11:55 AM
> > >> To: gdal-dev at lists.osgeo.org
> > >> Cc: DeTracey, Brendan
> > >> Subject: Re: [gdal-dev] Wrong number or type of arguments for
> > >> overloaded function 'CoordinateTransformation_TransformPoint'
> > >>
> > >> Le mardi 10 février 2015 16:27:54, DeTracey, Brendan a écrit :
> > >>> Hi,
> > >>>
> > >>> I am using the GDAL python bindings via Windows 64 bit Anaconda, but
> > >>> I am getting an error when I try to run one of the GDAL sample
> > >>> scripts, tolatlong.py e.g.
> > >>>
> > >>> E:\parse_cis>python tolatlong.py 0 0 temp.tif Traceback (most recent
> > >>>
> > >>> call last):
> > >>> File "tolatlong.py", line 106, in <module>
> > >>>
> > >>> (int, lat, height) = ct.TransformPoint(X, Y)
> > >>>
> > >>> File
> > >>>
> > >>> "C:\Users\DeTraceyB\AppData\Local\Continuum\Anaconda\lib\site-packag
> > >>> es \osg eo\osr.py", line 757, in TransformPoint return
> > >>> _osr.CoordinateTransformation_TransformPoint(self, *args)
> > >>> NotImplementedError: Wrong number or type of arguments for
> > >>> overloaded function 'CoordinateTransformation_TransformPoint'.
> > >>>
> > >>> Possible C/C++ prototypes are:
> > >>> OSRCoordinateTransformationShadow::TransformPoint(double [3])
> > >>> OSRCoordinateTransformationShadow::TransformPoint(double
> > >>>
> > >>> [3],double,double,double)
> > >>>
> > >>> When I google this error I find it might be related to GDAL not
> > >>> finding Proj (https://github.com/avalentino/gsdview/issues/89).
> > >>> Could someone please verify that this would be the source of this
> > >>> error? I have installed Proj under Anaconda and am trying to rule
> > >>> out whether it is a problem with Anaconda or GDAL.
> > >>
> > >> Yes, it seems very likely this is due to proj missing. Check that
> > >> proj.dll is available in one of the paths in the PATH.
> > >>
> > >>> Thanks,
> > >>> Brendan
> > >>> _______________________________________________
> > >>> gdal-dev mailing list
> > >>> gdal-dev at lists.osgeo.org
> > >>> http://lists.osgeo.org/mailman/listinfo/gdal-dev
> > >>
> > >> --
> > >> Spatialys - Geospatial professional services http://www.spatialys.com
> > >
> > > _______________________________________________
> > > gdal-dev mailing list
> > > gdal-dev at lists.osgeo.org
> > > http://lists.osgeo.org/mailman/listinfo/gdal-dev
> >
> > Is GDAL_DATA set? I seem to remember that error if it was missing.
> > Just a guess though...
> >
> > kss
> >
> > --
> > Kyle
> > _______________________________________________
> > gdal-dev mailing list
> > gdal-dev at lists.osgeo.org
> > http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
--
Spatialys - Geospatial professional services
http://www.spatialys.com
More information about the gdal-dev
mailing list