spatialite - azimuth function not available

205 views
Skip to first unread message

Pascal Boisson

unread,
Feb 24, 2014, 3:32:48 AM2/24/14
to spatiali...@googlegroups.com

Hello, 

this is a cross-post with http://gis.stackexchange.com/questions/87268/spatialite-azimuth-function-not-available . sorry for this, but I thought that this question could be better adressed as part of this group.

I am working with last spatialite versions on both Windows (7) and Ubuntu (13.10).

I installed these from reference spatialite website. For both, version that I downloaded is 4.1.1 (nevertheless in Ubuntu, at spatialite start up, i get a version number : 4.1.0 ; I assume this is a little bug)

Details on the packages :

  • binaries for windows: spatialite-4.1.1-win-x86.zip
  • source for ubuntu: libspatialite-4.1.1.tar.gz and all other usefull ressources (spatialite-tools)

I then developped a sql script on windows, notably using azimuth /st_azimuth. This works fine on this OS. I have problems when I use it on Ubuntu and get the following error:

no such function: Azimuth

after some search, I undesrtood that this could be related to a missing lib: liblwgeom.

I had some more search to get this lib installed properly (at least no error message at the end) using the procedure described here (I effectively did the make and make install), but this does not seem to help.

Questions:

  • is the "wrong" version number for spatialite 4.1.1 a known bug?
  • is the missing Azimuth a know problem (i could not find any info)
  • is installing liblwgeom the solution to my probleùm ?
  • how to know if the liblwgeom install properly working ?
  • what may I have missed in the process ?

Thanks for your help and pieces of advice

a.fu...@lqt.it

unread,
Feb 24, 2014, 4:02:42 AM2/24/14
to spatiali...@googlegroups.com
Hi Pascal,

the most recent versions of SpatiaLite support several interesting
"advanced" functions based on LWGEOM: ST_Azimuth(), ST_MakeValid(),
ST_Split() and so on.
anyway enabling or not LWGEOM is a configurable option; and the
default setting is --disable-lwgeom=yes
(i.e. always disable LWGEOM, if not explicitly required)

the liblwgeom library is a self-standing independent module, but
it isn't directly available as such.
it is integral part of PostGIS, and the unique supported way to
get liblwgeom installed (or built) is the one to install (or build)
a very recent version of PostGIS (v.2.0 or v.2.1)

if you wish to get a full fledged version of libspatialite-4.1.1
on any Linux system you have to accomplish the following steps:
- install (or build) PostGIS 2.x
- install (or build) libxml2
- configure and then build libspatialite-4.1.1 by enabling both
lwgeom and libxml2

./configure --enable-lwgeom=yes --enable-libxml2=yes
make
sudo make-install

PLEASE NOTE WELL: liblwgeom is released under the GPL licence;
due to cross-license constraints, building libspatialite with
liblwgeom enabled make libspatialite (and any further sw depending
on libspatialite) to become implicitly GPLed.

bye Sandro

Pascal Boisson

unread,
Mar 4, 2014, 4:21:21 AM3/4/14
to spatiali...@googlegroups.com
thanks this is working fine.
I did not now about the compile options. and thanks for the clarification about the licence
I'll update the gis stackexchange page accordingly

best regards
Pascal
Reply all
Reply to author
Forward
0 new messages