[Qgis-developer] QgsCoordinateReferenceSystem instantiation

Francois Maass fieliesm at gmail.com
Mon Oct 11 14:49:00 EDT 2010


Good day all! 

When I try to create a QgsCoordinateReferenceSystem object from an image's
metadata (via GDAL->GetProjectionRef()), I get the following output:

/home/fielies/dev/cpp/qgis/src/core/qgscoordinatereferencesystem.cpp: 245:
(createFromWkt) QgsCoordinateReferenceSystem::createFromWkt(QString theWkt)
using: PROJCS["UTM Zone 36, Southern Hemisphere",GEOGCS["Unknown datum based
upon the Clarke 1880 ellipsoid",DATUM["Not specified (based on Clarke 1880
spheroid)",SPHEROID["Clarke
1880",6378249.144808011,293.4663076556303,AUTHORITY["EPSG","7034"]]],PRIMEM[
"Greenwich",0],UNIT["degree",0.0174532925199433]],PROJECTION["Transverse_Mer
cator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],P
ARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER[
"false_northing",10000000],UNIT["Meter",1]]

/home/fielies/dev/cpp/qgis/src/core/qgscoordinatereferencesystem.cpp: 491:
(getRecord) running query: select * from tbl_srs where parameters='+proj=utm
+zone=36 +south +a=6378249.144808011 +b=6356514.966204134 +units=m +no_defs'

/home/fielies/dev/cpp/qgis/src/core/qgscoordinatereferencesystem.cpp: 498:
(getRecord) failed : /resources/srs.db does not exist!

/home/fielies/dev/cpp/qgis/src/core/qgscoordinatereferencesystem.cpp: 413:
(createFromProj4) globbing search for srsid from this proj string

/home/fielies/dev/cpp/qgis/src/core/qgscoordinatereferencesystem.cpp: 753:
(setMapUnits) Projection has linear units of Meter

/home/fielies/dev/cpp/qgis/src/core/qgscoordinatereferencesystem.cpp: 791:
(findMatchingProj) entered.

/home/fielies/dev/cpp/qgis/src/core/qgscoordinatereferencesystem.cpp: 795:
(findMatchingProj) QgsCoordinateReferenceSystem::findMatchingProj will only
work if prj acr ellipsoid acr and proj4string are set and the current
projection is valid!

/home/fielies/dev/cpp/qgis/src/core/qgscoordinatereferencesystem.cpp: 416:
(createFromProj4) globbing search for srsid returned srsid: 0

/home/fielies/dev/cpp/qgis/src/core/qgscoordinatereferencesystem.cpp: 431:
(createFromProj4) Projection is not found in databases.

/home/fielies/dev/cpp/qgis/src/core/qgscoordinatereferencesystem.cpp: 753:
(setMapUnits) Projection has linear units of Meter

/home/fielies/dev/cpp/qgis/src/core/qgscoordinatereferencesystem.cpp: 491:
(getRecord) running query: select * from tbl_srs where parameters='+proj=utm
+zone=36 +south +a=6378249.144808011 +b=6356514.966204134 +units=m +no_defs'

/home/fielies/dev/cpp/qgis/src/core/qgscoordinatereferencesystem.cpp: 498:
(getRecord) failed : /resources/srs.db does not exist!

/home/fielies/dev/cpp/qgis/src/core/qgscoordinatereferencesystem.cpp: 442:
(createFromProj4) Projection appears to be valid. Save to database!

/home/fielies/dev/cpp/qgis/src/core/qgscoordinatereferencesystem.cpp: 1266:
(saveAsUserCRS) Update or insert sql 

insert into tbl_srs
(description,projection_acronym,ellipsoid_acronym,parameters,is_geo) values
(' * Generated CRS (+proj=utm +zone=36 +south +a=6378249.144808011
+b=6356514.966204134 +units=m +no_defs)','utm','','+proj=utm +zone=36 +south
+a=6378249.144808011 +b=6356514.966204134 +units=m +no_defs',0)

/home/fielies/dev/cpp/qgis/src/core/qgscoordinatereferencesystem.cpp: 491:
(getRecord) running query: select * from tbl_srs where parameters='+proj=utm
+zone=36 +south +a=6378249.144808011 +b=6356514.966204134 +units=m +no_defs'

/home/fielies/dev/cpp/qgis/src/core/qgscoordinatereferencesystem.cpp: 498:
(getRecord) failed : /resources/srs.db does not exist!

/home/fielies/dev/cpp/qgis/src/core/qgscoordinatereferencesystem.cpp: 469:
(createFromProj4) Couldn't find newly added proj string?

 

And then after this, the call to  'crs->createFromWkt(projDefinition)'
returns false.
Could someone please tell me why this method returns false?

Thank you!

Francois

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20101011/bbd41a00/attachment.html


More information about the Qgis-developer mailing list