back
Installing spatialite-2.3.0 on Linux
SpatiaLite implements a complete Spatial DBMS engine based on the very popular SQLite.
A complete set of spatially-oriented extensions are directly implemented in SpatiaLite:
- SpatiaLite itself supports the Geometry data type and related Spatial SQL functions
as defined by the Open Gis Consortium - OGC
- RTree is the original SQLite implementation for Spatial Indexing
- MbrCache represents an alternative implementation for Spatial Indexing
- mathSQL supports useful mathematical SQL functions as Cos(), Sqrt() Log() ...
- VirtualShape allows immediate SQL access to Shapefiles
- VirtualText allows immediate SQL access to TXT/CSV files
- VirtualNetwork supports Routing
- EXIF GPS supports EXIF metadata, including GPS position when available
There are various alternative ways you can follow at your choice to deploy and use them:
- the spatialite-gui way:
- this one represents all-the-stuff-you-need already-bounded-together,
and adopts an user friendly GUI
i.e. you can simply work in the most natural way you are accustomed, using graphic windows and
taking profit of the mouse
- spatialite-gui does not requires any installation process;
you simply have to unpack what you've just downloaded [i.e. spatialite-gui-linux-x86-2.3.0.tar.gz]
and put it in some folder
- to get started you can launch the spatialite-gui program. That's all.
spatialite-gui is a statically linked executable;
it has no external dependencies at all, so it's immediately ready to run
- the spatialite way:
- this one represents all-the-stuff-you-need already-bounded-together,
and is a classic CLI database front end quite identical to its brother sqlite3
- spatialite does not requires any installation process;
you simply have to unpack what you've just downloaded [i.e. spatialite-tools-linux-x86-2.3.0.tar.gz]
and put it in some folder
- to get started you can launch the spatialite program from the shell. That's all.
spatialite is a statically linked executable;
it has no external dependencies at all, so it's immediately ready to run
- and you can follow this way in order to deploy any other tool, such as
exif_loader, spatialite_network ...
- the sqlite3 way:
- go to the SQLite downloads
and get the latest sqlite-version-bin.gz
- then get libspatialite-linux-x86-2.3.0.tar.gz
- neither SQLite nor SpatiaLite requires any installation process;
you simply have to unpack what you've just downloaded, placing binaries and dynamic libraries somewhere
[see note about dynamic libraries]
- to get started you can launch the sqlite3 program, and then .load 'libspatialite.so'
or SELECT load_extension('libspatialite.so');
That's all
- the xxx GUI tool way / the xxx language binding way:
- there are lots of GUI tools supporting SQLite
- and there are lots of language bindings supporting SQLite as well:
- more or less you simply need to perform the same steps as for using sqlite3
- simply performing SELECT load_extension('libspatialite.so'); will then start SpatiaLite
- if your preferred software refuses to load extensions, then you have to stop and surrender yourself.
this actually means there is no way to interoperate your sqlite-related software and SpatiaLite.
you can found an in-depth explanation for this here
Then I suggest you to download the test.db database and follow the tutorial step by step;
it's the fastest way to become accustomed with SpatiaLite and any related stuff.
Managing shared libraries
On Linux systems, shared libraries are identified by a .so suffix
Usually they have a plain name i.e. somelib.so, but usually they supports a version name as well, i.e. somelib.so.1.0
Usually this is accomplished simply by creating a symbolic link, as in:
$ ln -s somelib.so.1.0 somelib.so
Usually shared libraries must be placed in the /usr/lib or /usr/local/lib directories
You can keep yours shared libraries in any other directory at your choice, but in this case you have to set en environment variable,
as in:
$ export "LD_LIBRARY_PATH=/home/user_name/my_preferred_so_dir"
back