<div dir="ltr">Hi,<div><br></div><div>I had the same problem.<br><div><br></div><div>I looked in the source, this constructor is not available anymore in Python Bindings:</div><div><a href="https://github.com/qgis/QGIS/blob/master/src/core/qgscoordinatetransform.h#L75">https://github.com/qgis/QGIS/blob/master/src/core/qgscoordinatetransform.h#L75</a><br></div><div><br></div><div>You need to give a QgsCoordinateTransformContext in the constructor:</div><div><div><br></div><div>transform = QgsCoordinateTransform(crs, crs_4326, QgsCoordinateTransformContext())</div></div><div><br></div><div>I hope it's the right way to do it.</div><div>But I guess, like you and me, a lot of users will wonder the same question about this new parameter and how to configure it so it would be nice to provide some snippet or to update the QGIS Cookbook.</div><div><br></div><div>Regards</div><div>Etienne</div><div><br></div><div><br></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2017-12-22 8:44 GMT+01:00 Richard Duivenvoorde <span dir="ltr"><<a href="mailto:rdmailings@duif.net" target="_blank">rdmailings@duif.net</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Devs,<br>
<br>
since ages, I use like the following to create/get 2<br>
QgsCoordinateReferenceSystem's , then create a QgsCoordinateTransform<br>
from those and transform geoms or points:<br>
<br>
crs = iface.mapCanvas().mapSettings(<wbr>).destinationCrs()<br>
print(type(crs))<br>
print(crs.srsid())<br>
print(crs.toWkt())<br>
<br>
crs2 = QgsCoordinateReferenceSystem()<br>
crs2.createFromId(4326)<br>
print(type(crs2))<br>
print(crs2.srsid())<br>
print(crs2.toWkt())<br>
<br>
crsTransform = QgsCoordinateTransform(crs2, crs)<br>
<br>
But since some time (test in python console):<br>
<br>
Traceback (most recent call last):<br>
File "/usr/lib/python3.6/code.py", line 91, in runcode<br>
exec(code, self.locals)<br>
File "<input>", line 1, in <module><br>
File "<string>", line 10, in <module><br>
TypeError: QgsCoordinateTransform(): arguments did not match any<br>
overloaded call:<br>
overload 1: too many arguments<br>
overload 2: not enough arguments<br>
overload 3: not enough arguments<br>
overload 4: not enough arguments<br>
overload 5: argument 1 has unexpected type 'QgsCoordinateReferenceSystem'<br>
<br>
While the api<br>
<br>
<a href="https://qgis.org/api/classQgsCoordinateTransform.html#a8c036726885d51e9fdfe1478a063dfcd" rel="noreferrer" target="_blank">https://qgis.org/api/<wbr>classQgsCoordinateTransform.<wbr>html#<wbr>a8c036726885d51e9fdfe1478a063d<wbr>fcd</a><br>
<br>
still notes this constructor?<br>
<br>
Do I miss info? Or is something wrong with my sip stuff?<br>
<br>
Regards,<br>
<br>
Richard Duivenvoorde<br>
<br>
______________________________<wbr>_________________<br>
QGIS-Developer mailing list<br>
<a href="mailto:QGIS-Developer@lists.osgeo.org">QGIS-Developer@lists.osgeo.org</a><br>
List info: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br>
Unsubscribe: <a href="https://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">https://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a></blockquote></div><br></div>