[Qgis-user] QgsCoordinateReferenceSystem in

Radosław Pasiok rpasiok at gmail.com
Thu Jan 29 04:41:51 PST 2009


Hello list!

I am happy OSGeo4W user with QGIS 1.0.0-5.
I got strange things using QgsCoordinateReferenceSystem in a custom
python script.
For example, from the following script:

from qgis.core import *

QgsApplication.setPrefixPath("C:\OSGeo4W\apps",True)
QgsApplication.initQgis()

cs = QgsCoordinateReferenceSystem(2180)
print "EPSG ID:", cs.epsg()
print "Is it valid CRS? ", cs.isValid()

QgsApplication.exitQgis()

I get:

EPSG ID: 10
Is it valid CRS? False

On my Ubuntu machine I got similar things...

When I check the script in python console of QGIS:

>>> newcs = QgsCoordinateReferenceSystem(2174)
>>> ncs.isValid()
True
>>> ncs.epsg()
2174

Do you have the same?
Thank you for any info.

Radek



More information about the Qgis-user mailing list