<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv=Content-Type content="text/html; charset=us-ascii">
<meta name=Generator content="Microsoft Word 12 (filtered medium)">
<style>
<!--
/* Font Definitions */
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:11.0pt;
        font-family:"Calibri","sans-serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-compose;
        font-family:"Calibri","sans-serif";
        color:windowtext;}
.MsoChpDefault
        {mso-style-type:export-only;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
-->
</style>
<!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang=EN-US link=blue vlink=purple>
<div class=WordSection1>
<p class=MsoNormal>Good day all! <br>
<br>
When I try to create a QgsCoordinateReferenceSystem object from an image’s
metadata (via GDAL->GetProjectionRef()), I get the following output:<br>
<br>
/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_Mercator"],PARAMETER["latitude_of_origin",0],PARAMETER["central_meridian",33],PARAMETER["scale_factor",0.9996],PARAMETER["false_easting",500000],PARAMETER["false_northing",10000000],UNIT["Meter",1]]<o:p></o:p></p>
<p class=MsoNormal>/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'<o:p></o:p></p>
<p class=MsoNormal>/home/fielies/dev/cpp/qgis/src/core/qgscoordinatereferencesystem.cpp:
498: (getRecord) failed : /resources/srs.db does not exist!<o:p></o:p></p>
<p class=MsoNormal>/home/fielies/dev/cpp/qgis/src/core/qgscoordinatereferencesystem.cpp:
413: (createFromProj4) globbing search for srsid from this proj string<o:p></o:p></p>
<p class=MsoNormal>/home/fielies/dev/cpp/qgis/src/core/qgscoordinatereferencesystem.cpp:
753: (setMapUnits) Projection has linear units of Meter<o:p></o:p></p>
<p class=MsoNormal>/home/fielies/dev/cpp/qgis/src/core/qgscoordinatereferencesystem.cpp:
791: (findMatchingProj) entered.<o:p></o:p></p>
<p class=MsoNormal>/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!<o:p></o:p></p>
<p class=MsoNormal>/home/fielies/dev/cpp/qgis/src/core/qgscoordinatereferencesystem.cpp:
416: (createFromProj4) globbing search for srsid returned srsid: 0<o:p></o:p></p>
<p class=MsoNormal>/home/fielies/dev/cpp/qgis/src/core/qgscoordinatereferencesystem.cpp:
431: (createFromProj4) Projection is not found in databases.<o:p></o:p></p>
<p class=MsoNormal>/home/fielies/dev/cpp/qgis/src/core/qgscoordinatereferencesystem.cpp:
753: (setMapUnits) Projection has linear units of Meter<o:p></o:p></p>
<p class=MsoNormal>/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'<o:p></o:p></p>
<p class=MsoNormal>/home/fielies/dev/cpp/qgis/src/core/qgscoordinatereferencesystem.cpp:
498: (getRecord) failed : /resources/srs.db does not exist!<o:p></o:p></p>
<p class=MsoNormal>/home/fielies/dev/cpp/qgis/src/core/qgscoordinatereferencesystem.cpp:
442: (createFromProj4) Projection appears to be valid. Save to database!<o:p></o:p></p>
<p class=MsoNormal>/home/fielies/dev/cpp/qgis/src/core/qgscoordinatereferencesystem.cpp:
1266: (saveAsUserCRS) Update or insert sql <o:p></o:p></p>
<p class=MsoNormal>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)<o:p></o:p></p>
<p class=MsoNormal>/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'<o:p></o:p></p>
<p class=MsoNormal>/home/fielies/dev/cpp/qgis/src/core/qgscoordinatereferencesystem.cpp:
498: (getRecord) failed : /resources/srs.db does not exist!<o:p></o:p></p>
<p class=MsoNormal>/home/fielies/dev/cpp/qgis/src/core/qgscoordinatereferencesystem.cpp:
469: (createFromProj4) Couldn't find newly added proj string?<o:p></o:p></p>
<p class=MsoNormal><o:p> </o:p></p>
<p class=MsoNormal>And then after this, the call to ‘crs->createFromWkt(projDefinition)’
returns false.<br>
Could someone please tell me why this method returns false?<br>
<br>
Thank you!<o:p></o:p></p>
<p class=MsoNormal>Francois<o:p></o:p></p>
</div>
</body>
</html>