Thursday, February 11, 2010

Geoserver GeoWebCache Tile Seeding

If there is a "." in the Geoserver layer name, the "Seed this layer" link in the GeoWebCache interface does not work. Simply removing the "." makes it work.

Tuesday, November 17, 2009

Ubuntu Karmic : Building the GRASS GIS and its wxpython source code

From http://grass.osgeo.org/wiki/Compile_and_Install_Ubuntu

First of all, do NOT install the following grass/ogr Ubuntu packages
as they are often broken :gdal-bin libgdal1-dev.
Instead, install grass/ogr from source code (recommended) :
http://midyetavablog.blogspot.com/2009/11/compiling-gdal-on-ubuntu-karmic-910.html

To build grass install the following packages in Ubuntu :

sudo apt-get install build-essential flex bison libncurses5-dev zlib1g-dev \
libjpeg62-dev libgdal1-dev libtiff4-dev libgcc1 tcl8.5-dev tk8.5-dev \
gettext fftw3-dev libfreetype6-dev libavcodec-dev libavformat-dev libxmu-dev make python-dev \
swig libavutil-dev libavutil49 libgl1-mesa-dev libglu1-mesa-dev libcairo2-dev \
libblas-dev liblapack-dev libglw1-mesa-dev

To build the wxphython GUI, install the following Ubuntu packages :

sudo apt-get install libwxbase2.8-0 libwxbase2.8-dbg libwxbase2.8-dev \
libwxgtk2.8-0 libwxgtk2.8-dbg libwxgtk2.8-dev \
python-wxgtk2.8 wx2.8-doc wx2.8-examples \
wx2.8-headers wx2.8-i18n python-numpy

We are ready to configure the system and start building :

./configure \
--with-tcltk-includes=/usr/include/tcl8.5 \
--with-wxwidgets=/usr/bin/wx-config \
--with-postgres-includes=/usr/include/postgresql  --with-postgres=yes \
--with-cairo --with-blas --with-lapack --with-python \
--with-proj-share=/usr/share/proj

make
sudo make install

I was not able to make work the following flags  :
--with-ffmpeg --with-ffmpeg-includes=/usr/include/libavcodec --with-glw

Tuesday, November 10, 2009

Compiling GDAL on Ubuntu Karmic 9.10

First, obtain the latest stable gdal sources from http://trac.osgeo.org/gdal/wiki/DownloadSource .

In my case, I used http://download.osgeo.org/gdal/gdal-1.6.3.tar.gz

Before compiling, I had to install the following Ubuntu packages :

sudo apt-get install libnetcdf4 libnetcdf-dev libpng-dev libtiff4-dev libcurl4-dev libtool python-gdal

The following commands
./configure
make
sudo make install
sudo ldconfig

This will install the binaries in /usr/local/bin and the libraries in /usr/local/lib

This default configuration will compile only a fraction of the formats supported. Feel free to add more components to your taste. After all, it's all FREE software!

Wednesday, September 30, 2009

Bluetooth GPS in Linux with gpsd


I have the following no-name bluetooth-only gps device. When I plug it into the USB port of my computer for a recharge, it is seen as :
$lsusb
Bus 003 Device 011: ID 067b:2303 Prolific Technology, Inc. PL2303 Serial Port

I already have the bluetooth stack working on Ubuntu so I could make a bluetooth scan for it. The gadget presents itself as GT-750F :


$hcitool scan
Scanning ...
00:0B:0D:76:83:73 GT-750F

Following the instructions at http://gpsd.berlios.de/bt.html, I added the following section into /etc/bluetooth/rfcomm.conf :
rfcomm0 {
# Automatically bind the device at startup
bind yes;

# Bluetooth address of the device
device 00:0B:0D:76:83:73;

# RFCOMM channel for the connection
channel 1;

# Description of the connection
comment "GPS GT-750F";
}

I then launched gpsd with the following command :

sudo gpsd -D 2 -N /dev/rfcomm0

and using xgps and gpsdrive, I saw that it al worked fine.

Magellan Explorist 600 in Linux with gpsd

First, you need to setup the GPS. To do so, within th GPS unit, go :

Menu-Advanced Features-Communications-NMEA Data Comm

and select "V2.1 GSA"

When the GPS is connected to the USB port, a Linux system message appears. To see it, withing Linux command line, type :

sudo tail -f /var/log/messages

Sep 30 15:32:01 sac-laptop kernel: [65151.544586] usb 3-4: USB disconnect, address 6
Sep 30 15:46:34 sac-laptop -- MARK --
Sep 30 16:02:26 sac-laptop kernel: [66976.703565] usb 3-4: new full speed USB device using ohci_hcd and address 7
Sep 30 16:02:26 sac-laptop kernel: [66976.949095] usb 3-4: configuration #1 chosen from 1 choice
Sep 30 16:02:26 sac-laptop kernel: [66976.971345] cdc_acm 3-4:1.0: ttyACM0: USB ACM device

You could then manually launch the gpsd daemon :

sudo gpsd -D 2 -N -n /dev/ttyACM0&

and test it using xgps (shipped with gpsd) or gpsdrive.

If everything is working for you, you can omit the debugging option (-D 2) and the -N option that allows the program to run in the background mode.

Sunday, September 6, 2009

Can't import into Zotero a BibTeX file exported from JabRef

Instead of importing the contents into Zotero, Firefox tries to Open/Save it itself. The fix was found in Zotero forums :

This seems to be related to the character/mime encoding of the BibTeX file. Zotero produces UTF-8 files & can import them without spawning a new window:
$ file Exported\ Items.bib
Exported Items.bib: Unicode text, UTF-8
$ file -i Exported\ Items.bib
Exported Items.bib: text/plain; charset=utf-8
But not so with ascii files:$ file broken.bib
broken.bib: BibTeX text file
$ file -i broken.bib
broken.bib: text/plain; charset=us-ascii
Changing the file to UTF-8 w/ BOM:$ uconv --add-signature broken.bib >fixed.bib && file fixed.bib
fixed.bib: Unicode text, UTF-8
$ file -i fixed.bib
fixed.bib: text/plain; charset=utf-8
leads to successful import (as does importing from the clipboard).

But the fix did not work for me. So in JabRef, I had to export the same file into RIS from format. The RIS file imported successfully into Zotero.

Friday, September 4, 2009

How to recursively list and delete empty directories in linux?

To list empty directories below the current dir :
find ./ -type d -empty
to delete them :
find ./ -type d -empty -delete