Giuseppe,<br><br>Sorry for the confusion but the Python interface doesn&#39;t need the first argument, the number of GCPs.<br>Examples:<br><a href="http://trac.osgeo.org/gdal/browser/trunk/autotest/gcore/tiff_write.py#L236">http://trac.osgeo.org/gdal/browser/trunk/autotest/gcore/tiff_write.py#L236</a><br>
<a href="http://trac.osgeo.org/gdal/browser/trunk/autotest/warp/warp.py#L695">http://trac.osgeo.org/gdal/browser/trunk/autotest/warp/warp.py#L695</a><br><br><div class="gmail_quote">On Thu, Jul 8, 2010 at 2:24 PM, vizziello <span dir="ltr">&lt;<a href="mailto:vizziello@consorzio-innova.it">vizziello@consorzio-innova.it</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><br>
I have a problem with SetGCPs method in GDAL python binding.<br>
<br>
My gdal version is 1.6.3.<br>
<br>
Seems impossible assigns the passed set of GCPs to dataset:<br>
<br>
newdataset.SetGCPs(ngcp, newgcp, gcpProjection)<br>
<br>
Where:<br>
     - ngcp      = Number of GCP<br>
     - newgcp  = New gcp list<br>
     - gcpProjection = Gcp projection<br>
<br>
I have this error code:<br>
<br>
/usr/lib/python2.5/site-packages/osgeo/gdal.pyc in SetGCPs(self, *args)<br>
    584     def SetGCPs(self, *args):<br>
    585         &quot;&quot;&quot;SetGCPs(self, int nGCPs, char pszGCPProjection) -&gt;<br>
CPLErr&quot;&quot;&quot;<br>
--&gt; 586         return _gdal.Dataset_SetGCPs(self, *args)<br>
    587<br>
    588     def FlushCache(self, *args):<br>
<br>
TypeError: Dataset_SetGCPs() takes exactly 3 arguments (4 given)<br>
<br>
<br>
Is a bug or error in the sample code?<br>
<br>
Greets,<br>
Giuseppe<br>
<font color="#888888"><br>
--<br>
View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/Bug-in-SetGCPs-method-of-GDALDataset-class-tp5269103p5269103.html" target="_blank">http://osgeo-org.1803224.n2.nabble.com/Bug-in-SetGCPs-method-of-GDALDataset-class-tp5269103p5269103.html</a><br>

Sent from the GDAL - Dev mailing list archive at Nabble.com.<br>
_______________________________________________<br>
gdal-dev mailing list<br>
<a href="mailto:gdal-dev@lists.osgeo.org">gdal-dev@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/gdal-dev" target="_blank">http://lists.osgeo.org/mailman/listinfo/gdal-dev</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Best regards,<br>Chaitanya kumar CH.<br>/tʃaɪθənjə/ /kʊmɑr/ <br>+91-9494447584<br>17.2416N 80.1426E<br>