Hi Romain, <br><br><div class="gmail_quote">On Mon, Jul 25, 2011 at 6:17 AM, romain <span dir="ltr">&lt;<a href="mailto:romain.riviere.974@gmail.com">romain.riviere.974@gmail.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

I&#39;d like to allow my plugin&#39;s users to be able to create a new SRS ( from a<br>
proj4 string or wkt) within the plugin, and save it to QGIS srs DataBAse.  </blockquote><div> </div><div>You can use the QgsCoordinateReferenceSystem class and its createFrom* methods.<br><br><span style="font-family: courier new,monospace;">crs = QgsCoordinateReferenceSystem()</span><br style="font-family: courier new,monospace;">

<span style="font-family: courier new,monospace;">valid = crs.createFromProj4( proj4string )</span><br style="font-family: courier new,monospace;"><br>If that CRS doesn&#39;t exists yet in the srs database, a new custom CRS will be created.<br>

<br>Regards.<br><br></div><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">

<font color="#888888">View this message in context: <a href="http://osgeo-org.1803224.n2.nabble.com/QGIS-API-add-new-SRS-to-DataBase-tp6617101p6617101.html" target="_blank">http://osgeo-org.1803224.n2.nabble.com/QGIS-API-add-new-SRS-to-DataBase-tp6617101p6617101.html</a><br>


Sent from the qgis-developer mailing list archive at Nabble.com.<br>
_______________________________________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-developer</a><br>
</font></blockquote></div><br><br clear="all"><br>-- <br>Giuseppe Sucameli<br><br>