[Qgis-user] CRS problem in stand alone application

Andrea Amparore andrea.amparore at gmail.com
Wed Dec 17 02:10:51 PST 2014


Dear all,

I have a very annoying problem with my QGIS stand alone application since I
upgraded to 2.6.

It seems that the application can not create a coordinate reference system,
and this is affecting my whole workflow.

The script works perfectly inside the QGIS python console, but not in the
stand alone mode.


from qgis.core import *

QgsApplication.setPrefixPath("/usr", True)

QgsApplication.initQgis()

app = QgsApplication([], True)

map_projection = QgsCoordinateReferenceSystem(4326,
QgsCoordinateReferenceSystem.EpsgCrsId)

map_projection_descr = map_projection.description()

print map_projection.isValid()


The output of the last line is 'False'.

I tried to change the prefix path to "/usr/share/qgis/resources/“ but this
doesn’t make any difference.

I’m using python 2.7.6 on Ubuntu 14.04.


Thank you in advance.

Best Regards,


Andrea
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-user/attachments/20141217/0756f6ab/attachment.html>


More information about the Qgis-user mailing list