[Qgis-user] QgsCoordinateReferenceSystem in
wonder.sk at gmail.com
Sat Jan 31 09:09:47 EST 2009
On Thu, Jan 29, 2009 at 1:41 PM, Radosław Pasiok <rpasiok at gmail.com> wrote:
> 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 *
> cs = QgsCoordinateReferenceSystem(2180)
> print "EPSG ID:", cs.epsg()
> print "Is it valid CRS? ", cs.isValid()
> I get:
> EPSG ID: 10
> Is it valid CRS? False
I haven't tried qgis from osgeo4w yet, but it's possible that the CRS
is not found because of different paths to the qgis.db file (which
contains database of CRS). By default it should be located (on
windows) in "resources" subdirectory from the specified prefix path.
In case it's different, you could use
QgsApplication.setPkgDataPath(path) to change it.
More information about the Qgis-user