Re: [SpatiaLite-Users] Error for Reproject in SpatiaLite

43 views
Skip to first unread message
Message has been deleted

a.fu...@lqt.it

unread,
Nov 30, 2022, 2:07:02 AM11/30/22
to spatiali...@googlegroups.com
On Tue, 29 Nov 2022 22:22:05 -0800 (PST), Elham Peiravian wrote:
> Hello Everyone,
>
> I am a newbie in SpatialLite, and I am trying to practice how to
> change the projection of a dataset by using the ST_Transform command
> and I get this error:
>
> I don't have any prior experience with this so I was hoping someone
> could let me know what the problem is here?
>

Hi Elham,

the ST_Transform() SQL function fully relies on the support of the
PROJ library that handles any coord reprojection.

recent versions of PROJ (starting from PROJ.6) strictly require to
access a SQLite database of their own where all geodesic informations
are stored (Ellipsoids, Prime Meridians, Reference Systems, formulae
and so on).

the error message clearly states that no such database in installed
on your PC (or it's' installaed but in the wrong location), so the
PROJ library is now completely disabled.

SOLUTION: you are just required to correctly install the PROJ DB.
You've surely received a copy of the PROJ DB into the same package
shipping the binary executable of spatialite_gui for Windows.
The simplest and easiest solution is to copy it into the same
folder where the EXE is.

please read this Wiki page for any furher information:

https://www.gaia-gis.it/fossil/libspatialite/wiki?name=PROJ.6

NOTE: at the bottom of the Wiki page you'll find a specific
paragraph about Windows platforms.

bye Sandro

Elham Peiravian

unread,
Nov 30, 2022, 2:20:58 AM11/30/22
to SpatiaLite Users
Hello Sandro,

Thank you for your prompt response and taking the time to explain things in detail. I looked at it and the proj.db is already in my spatialite_gui folder. Take a look:
Screenshot 2022-11-30 021218.png

There is also another proj.db in my 'spatialite-tools-5.0.1-win-amd64' folder. Are these two the same?

I also did the diagnosis check from the link you sent me but it returns as NULL. I guess this means that the PROJ LIB hasn't been correctly installed?

a.fu...@lqt.it

unread,
Nov 30, 2022, 3:30:32 AM11/30/22
to spatiali...@googlegroups.com
On Tue, 29 Nov 2022 23:20:58 -0800 (PST), Elham Peiravian wrote:
> Hello Sandro,
>
> Thank you for your prompt response and taking the time to explain
> things in detail. I looked at it and the proj.db is already in my
> spatialite_gui folder. Take a look:
>
> There is also another proj.db in my
> 'spatialite-tools-5.0.1-win-amd64'
> folder. Are these two the same?
>

each version of the PROJ library has its own specific DB.
both the spatialite-tools and spatialite_gui executable
binaries for Windows of the same version share two identical
copies of the same PROJ DB


> I also did the diagnosis check from the link you sent me but it
> returns as NULL. I guess this means that the PROJ LIB hasn't been
> correctly installed?
>

yes.

1. you can check the SQL queries explained in the immediately
previous paragraph of the same Wiki page:

SELECT PROJ_GetDatabasePath();
SELECT PROJ_SetDatabasePath( ?path? );
SELECT PROJ_GetLastErrorMsg();

2. just in case you can use Regedit in order to clean a
possibly corrupted installation.

a) completely delete this registry key:
HKEY_CURRENT_USER / SOFTWARE / SpatialiteGui

b) then launch again the GUI tool, that will automatically
recreate the missing registry key.

bye Sandro
Reply all
Reply to author
Forward
0 new messages