How to install - Remi-C/Pointcloud_in_db GitHub Wiki

##How to install##

###How to Install summary ###

  1. Dependencies
  2. short description of install process
  3. detailled description of install process

Dependencies###

###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
    • 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
          • 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
            • 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
          • 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
      • 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
          • compiling postgis
            • it is very straight forward
            • dl sources
            • execute ./configure, you may need to install the command called by executing ./configure
            • execute "make and sudo make install
          • testing postgis
            • in a db add postgis extension CREATE EXTENSION Postgis, and try the function SELECT PostGIS_full_version();
        • 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, then make, then sudo 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
      • (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
      • 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