How to install - Remi-C/Pointcloud_in_db GitHub Wiki
##How to install##
###How to Install summary ###
- Dependencies
- short description of install process
- detailled description of install process
Dependencies###
-
OS:
- a computer with a linux (we used Ubuntu 12.0.4 LTS 32 and 64 bits)
- bash and a C compiler
- admin rights
-
Data Base:
-
Software
- (optionnal) the modified version of Diego Nehab's RPly to import points in ply format into database
###Install process (short)###
Note : We tested this solution both on a dedicaced 64 bits Ubuntu 12.0.4 LTS and on a 32bits Ubuntu 12.0.4 LTS hosted by a virtual machine (host = windows Vista, guest = Ubuntu)
- Abstract of the install process
*Install OS
- Install and configure postgres/postgres-dev
- Install and configure Postgres extension : Postgis, pointcloud, pointcloud_postgis
- (semi_optionnal) Compile RPly_convert
- Get the scripts to make it works
- Prepare a data base
###Install process (long)###
- Install process
- Installing the OS
- ( optionnal ) Virtual Machine Setup : we used VirtualBox
- Install is straightforward, you will need guest addition to allow shared folder and shared clipboard (usefull)
- Ubuntu 12.0.4 setup :
- dl the iso from the ubuntu website : http://www.ubuntu.com/download/desktop
Use it to install from CD or directly in VirtualBox
Update the system (
sudo apt-get update
) *Install and configure Postgres 9.2
- dl the iso from the ubuntu website : http://www.ubuntu.com/download/desktop
Use it to install from CD or directly in VirtualBox
Update the system (
- Postgres 9.2 setup
- the process should be like this
- getting postgres 9.2
- add the postgres repository (apt.postgresql.org , instructions here )
- install the 9.2 binary for your linux
- install the 9.2 dev packages for your linux
- setup of postgres
- set password for postgres user (
sudo passwd postgres
;su - postgres
;psql -c"alter user postgres with password 'postgres';"
) - change the
kernel.shmmax
of your system- edit the
/etc/sysctl.conf
and add line"kernel.shmmax = "XXX
, you may add several other kernel.sh parameters
- edit the
- config files : , Config files are in '/etc/postgres/9.2/main' , refere to postgres manual
- postgres.conf
- you have to tune at least
"shared_buffers"
,"wal_buffers"
,"work_mem"
,"maintenance_work_mem"
,"checkpoint_segments"
,"effective_cache_size"
- you have to change the parameter
listen_adresses
or you won't be able to reach the server
- you have to tune at least
- pg_hba.conf
- tune the parameters to allow connection trough
md5
from host - tune the parameter to allow a
trust
connection for postgres from local
- tune the parameters to allow connection trough
- postgres.conf
- restart server (
sudo /etc/init.d/postgresql restart
) - (optionnal) redirect your server port in the virtualbox (in Settings/network/redirect ports) to access it from outside
- create a database and test the server
- set password for postgres user (
- getting postgres 9.2
- Getting Postgres extension : postgis, pointcloud, pointcloud_postgis
- getting postgis 2.0.3
- on ubuntu LTS 12.0.4 64 bits there is no packages for postgres 9.2, so we need to build from sources
- getting postgis dependecies
- building is easy if we don't have to build the postgis dependency :GEOS, Proj.4, GDAL, LibXML2 and JSON-C.
- add the repository https://launchpad.net/~ubuntugis/+archive/ppa/ and https://launchpad.net/~ubuntugis/+archive/ubuntugis-unstable
- get from these repository the packages of depencies
- compiling postgis
- it is very straight forward
- dl sources
- execute
./configure
, you may need to install the command called by executing./configure
- execute
"make
andsudo make install
- testing postgis
- in a db add postgis extension
CREATE EXTENSION Postgis
, and try the functionSELECT PostGIS_full_version();
- in a db add postgis extension
- getting pointcloud
- getting pointcloud dependencies
- you will need "CUnit", which you can found in repository
- compiling pointcloud
- dl the sources from the git repository
- run
./autogen.sh
, then./configure
, thenmake
, thensudo make install
- testing pointcloud
- in a database,
CREATE EXTENSION pointcloud,pointcloud-postgis
- add the dummy point schema ("simple 4-dimensional schema ")
- execute
SELECT PC_AsTExt(PC_MakePoint(1, ARRAY[-127, 45, 124.0, 4.0]));
to test pointcloud - execute
SELECT PC_MakePoint(1, ARRAY[-127, 45, 124.0, 4.0])::geometry;
to test pointcloud-postgis
- in a database,
- getting pointcloud dependencies
- getting postgis 2.0.3
- (semi_optionnal) Compile RPly_convert
- (optionnal) getting the modified version of RPly
- I modified RPly so as to use it to send pointcloud data directly into postgres
- the source code is in RPly_Ubuntu folder
- to compile it :
make
- NOTE : warning : this code may cause troubles on windows
- (optionnal) getting the modified version of RPly
- Get the scripts to make it works
- you will need SQL scripts and sh scripts, they are in the folder "script"
- sql scripts ought to be executed command by command using pgadmin, so as to control results
- sh scripts requires parameter and should be launched approprietly
- see the following for use-instruction
- the process should be like this
- ( optionnal ) Virtual Machine Setup : we used VirtualBox