Hi Francois > /home/fielies/dev/cpp/qgis/src/core/qgscoordinatereferencesystem.cpp: 498: > (getRecord) failed : /resources/srs.db does not exist!
Seems that your application resources search path is not set (you should see the full path before /resources/srs.db). Try setting the application prefix path before trying to instantiate your CRS object e.g. QgsApplication::setPrefixPath( INSTALL_PREFIX, true ); Regards Tim On Mon, Oct 11, 2010 at 8:49 PM, Francois Maass <fieli...@gmail.com> wrote: > 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_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]] > > /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 > > _______________________________________________ > Qgis-developer mailing list > Qgis-developer@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/qgis-developer > > -- Tim Sutton - QGIS Project Steering Committee Member (Release Manager) ============================================== Please do not email me off-list with technical support questions. Using the lists will gain more exposure for your issues and the knowledge surrounding your issue will be shared with all. Visit http://linfiniti.com to find out about: * QGIS programming and support services * Mapserver and PostGIS based hosting plans * FOSS Consulting Services Skype: timlinux Irc: timlinux on #qgis at freenode.net ============================================== _______________________________________________ Qgis-developer mailing list Qgis-developer@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/qgis-developer