[QGIS-Developer] locate proj.db used by Qgis from python plugin or script

Even Rouault even.rouault at spatialys.com
Wed May 14 14:07:40 PDT 2025


Hi,

 >>> from osgeo import osr
 >>> osr.GetPROJSearchPaths()
['/home/even/.local/share/proj', 
'/home/even/proj/install-proj-master/share/proj', 
'/home/even/proj/install-proj-master/share/proj']

and look up for proj.db in one of the above directories. The first one 
found will be the one used

Even

Le 14/05/2025 à 22:59, Jacques Beilin via QGIS-Developer a écrit :
> Dear colleagues,
>
> I have already sent my question on the qgis-user list but someone told me it should be bette to ask on Qgis-dev.
>
> I am working on the plugin IdentifProj (https://plugins.qgis.org/plugins/IdentifProj/). For the developpement of the plugin I would like to acces to the CRS definition file (proj.db).
>
> Is there a way to locate the proj.db on the system (and precisely the version which is currentely used by qgis) ? I would like to be able to load it from python to get some informations which are not available from QgsCoordinateReferenceSystem class.
>
> Best regards,
> Jacques
> -- 
> ______________________________________________________________________________________ 
>
> <https://www.ensg.eu/Collecte-de-la-taxe-d-apprentissage>
> Jacques BEILIN
> Responsable des enseignements en Géodésie, Mathématiques, Métrologie 
> et Topométrie
> Responsable pédagogique de la filière ingénieur 3e année 
> Photogrammétrie, Positionnement, Mesure de Déformations (PPMD)
> École Nationale des Sciences Géographiques
> Cité Descartes, 6-8 Avenue Blaise Pascal, 77420 Champs-sur-Marne
> ign.fr - ensg.eu - geoportail.fr
>
> _______________________________________________
> QGIS-Developer mailing list
> QGIS-Developer at lists.osgeo.org
> List info:https://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe:https://lists.osgeo.org/mailman/listinfo/qgis-developer

-- 
http://www.spatialys.com
My software is free, but my time generally not.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20250514/86a6c811/attachment.htm>


More information about the QGIS-Developer mailing list