[Qgis-developer] QGIS API: add new SRS to DataBase
Giuseppe Sucameli
sucameli at faunalia.it
Mon Jul 25 08:32:57 EDT 2011
Hi Romain,
On Mon, Jul 25, 2011 at 6:17 AM, romain <romain.riviere.974 at gmail.com>wrote:
> I'd like to allow my plugin's users to be able to create a new SRS ( from a
> proj4 string or wkt) within the plugin, and save it to QGIS srs DataBAse.
You can use the QgsCoordinateReferenceSystem class and its createFrom*
methods.
crs = QgsCoordinateReferenceSystem()
valid = crs.createFromProj4( proj4string )
If that CRS doesn't exists yet in the srs database, a new custom CRS will be
created.
Regards.
View this message in context:
> http://osgeo-org.1803224.n2.nabble.com/QGIS-API-add-new-SRS-to-DataBase-tp6617101p6617101.html
> Sent from the qgis-developer mailing list archive at Nabble.com.
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
--
Giuseppe Sucameli
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20110725/ef7ce8e2/attachment-0001.html
More information about the Qgis-developer
mailing list