Tuesday, November 16, 2010

Launching linux programs with a specific locale

To launch a program in Linux with a different locale, use the syntax :

LANG=en_US.UTF-8 R

if it does not work, use

LANGUAGE=en_US.utf8 R

This command launches R with the en_US.UTF-8 locale.

Friday, October 22, 2010

Subversion in Debian server/Ubuntu client

#In the debian server :

#Create an empty data repository
cd /data/aaworks/
svnadmin create R_repository

#Import already existing source files into it
svn import SeaWiFS_bio/Rfiles/Ekumen_R/ file:///data/aaworks/R_repository/Ekumen_R/

#List the imported files
svn list file:///data/aaworks/R_repository/Ekumen_R

#Create a working directory and checkout
cd ~
mkdir Ekumen_R/
svn checkout file:///data/aaworks/R_repository/Ekumen_R

cd Ekumen_R/
svn list

#After modifiying a source file, one can commit :
svn commit

#You can checkout files in the ubuntu client through ssh :
svn checkout svn+ssh://ekumen/data/aaworks/R_repository/Ekumen_R

Friday, October 1, 2010

Julian date conversion in R

Convert the Julian day into Date format
strptime("180", "%j")

or

strptime("1998249", "%Y%j")
[1] "1998-09-06"

Friday, September 24, 2010

Compiling Orfeo on Ubuntu Lucid

For OTB, install the following ubuntu packages :

libfltk1.1-dev libcurl3-dev libfftw3-dev libgdal1-1.7.0 mercurial fluid cmake-curses-gui libglu1-mesa-dev libgeotiff-dev uuid-dev libexpat1-dev

Thursday, September 23, 2010

Running SEADAS in 32-bits mode in Ubuntu 64-bits

Simply install the Ubuntu package ia32-libs

Wednesday, August 25, 2010

Monday, August 23, 2010

Configuring postgresql in debian

After the installation from the debian packages, you should run :

sudo pg_createcluster 8.3 main

To make the server listen to the network edit /etc/postgresql/8.3/main/postgresql.conf and modify it to read :

listen_addresses = '*' # what IP address(es) to listen on;

and edit /etc/postgresql/8.3/main/pg_hba.conf and add a line for each user you would like to authorize the user called "myuser" who is located on network 201.171.245.62/32 for using the database "mydb" :

host mydb my user 201.171.245.62/32 md5

and then grant privileges to that user on the table geometry_columns :

psql mydb
GRANT select, insert, update, delete ON TABLE public.geometry_columns TO myuser;