[Qgis-user] Custom CRS-database issues?

Leyan ouyang.leyan.ml at hotmail.com
Sat Oct 27 19:11:15 PDT 2012



On 10/28/2012 01:27 AM, jch at caltech.edu wrote:
>> Date: Sat, 27 Oct 2012 16:30:30 +0800
>> From: Leyan <ouyang.leyan.ml at hotmail.com>
>> To: qgis-user at lists.osgeo.org
>> Subject: Re: [Qgis-user] QGIS not accepting valid Proj.4 data for CRS
>> Message-ID: <BLU0-SMTP209D955D8DA76E5504A8FF0BA7D0 at phx.gbl>
>> Content-Type: text/plain; charset="UTF-8"; format=flowed
>>
>> When you say "hitting the save button", do you mean clicking OK or the
>> button with the save icon ? Hitting OK will not be enough to save your
>> custom CRS, you need to click the save button first.
>>
>> I tried to add your CRS and did not encounter any issue, could you
>> describe more precisely what you did ?
>>
>> Regards,
>>
>> Leyan
>
> Thanks for looking.
>
> In QGIS I open up the Custom CRS definition dialog
>
> Copy and paste a proj4 parameter line starting with +proj=  into the
> Paremeters box
>
> Copy and paste the Name into the name box.
>
> Hit the little folder icon.
>
> Nothing happens.  The number below the parameter line doesn't increment.
>
> Hit OK and the custom CRS isn't added to the database.  Could my database
> be unavailable somehow?
>
> If I take a known, valid proj4 parameter line that QGIS has in it's
> database, it it won't add it either (I miswrote this below)
>
> I played around some more, and the test dialog WILL accept the custom
> parameter lines, and does say they are valid, I just can't get my database
> to recognize them.
>
> I remember the database dialog box when I first installed QGIS, I think I
> just took the defaults, in the DB manager it shows a SpatialLite entry,
> but there's a flashing alert in the bottom of the window that says
> "postgis No module named psycopg2"
>
> If I highlight 'SpatialLite" and click the SQL window icon, I get an error
> that says 'no database selected or you are not connected to it'.  I'm not
> sure I have the necessary SQL programs installed.  in Synaptic I have some
> sql packages, client libraries, shared libraries, python extensions.  Do I
> need a specific core SQL package to get the database in QGIS to be
> accessible?
>
> In synaptic I tried to install python-psycopg2 and I got a warning that it
> could not be authenticated and malicious control etc etc etc,  should I
> install it anyway?
>
> thanks,
>
> Janet
>

OK, so it is not a problem of proj4 definition. You should check if you 
have the file ~/.qgis/qgis.db. The file is a SQLite database, that you 
can browse using sqlitebrowser. Check you have the rights to write to 
it. You can also try to move it or delete it, maybe it has been 
corrupted. If there is no file, QGIS will automatically create a new one.

If you start qgis from the console, do you get any output while trying 
to save ? (I have QGIS built with debug output, so I am not sure what 
there in the normal build).

The custom CRS does not use the settings from the DB manager, it is 
simpler than that. You need to have sqlite installed though, but Ubuntu 
should have taken care of it.

Regards,

Leyan



More information about the Qgis-user mailing list