[Qgis-developer] QGIS API: add new SRS to DataBase

romain riviere romain.riviere.974 at gmail.com
Mon Jul 25 21:04:44 EDT 2011


Thanks !
That's exactly what I needed

Romain,
*
*



2011/7/26 Giuseppe Sucameli <sucameli at faunalia.it>

> 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/20110726/a427f778/attachment-0001.html


More information about the Qgis-developer mailing list