What is the cause for the degradation of environment?
Capitalism, corruption, consuming society? - OVERPOPULATION!
Please, save the Planet - kill yourself...

Sunday, March 31, 2013

RSAGA: Getting Started

RSAGA provides access to geocomputation capabilities of SAGA GIS from within R environment. Having SAGA GIS installed is a (quite obvious) pre-requirement to use RSAGA. 

In Linux x64 sometimes additional preparations are needed. In Linux SAGA as well as other software that would like to use SAGA modules usually searches for  them in /usr/lib/saga, but if your Linux is x64, they usually will be located in /usr/lib64/saga. Of course you may set up proper environmental variables, but the most lazy and overall-effective way is just to add symbolic link to /usr/lib64/saga (or whatever a correct path is) from /usr/lib/saga:
:~> sudo ln -s /usr/lib64/saga /usr/lib/saga
Now no app should miss these modules.

Thursday, March 14, 2013

About Questions and Answers

That is very interesting how people perceive and assess questions and answers. How do we assess quality of the question? The first and the main criteria is whether topic-starter did his homework searching for the answer himself. That's why "Do your homework" is the first advise on "how to ask the question" page on every software forum (and there is one on gis.stackexchange). The second criteria is sufficiency of information provided by the topic-starter. No one likes to play clairvoyant and guess what is the actual situation (but with experience the ability to foresight omitted details is being developed) and waste their time asking for more information.

Saturday, March 9, 2013

GRUB2 Recovery

Encountered an unpleasant issue today. Suddenly without any reason GRUB2 at my dual boot laptop halted with the "GRUB" string on the black screen and refused to proceed any further. Seems that is a known issue for the openSUSE 12.2 (GRUB2 became a bootloader for this version).

GRUB recovery usually an easy procedure and I did it quite often having several machines with a windows as a spare OS (it has an annoying habit deleting GRUB during own installation). I just used openSUSE live USB to load, and in Yast in Bootloader settings asked to propose the configuration for GRUB and then just saved it to the /boot partition.

This time it didn't work at all... So I've spent all the day looking for solution. This two sources helped me a lot: Re-install Grub2 from DVD Rescue and openSUSE Help and Troubleshooting. Here you are the steps that helped me with my dualboot needs:
  1. Boot to Rescue System from the openSUSE installation DVD (login is root).
  2. Run fdisk -l to locate root partition (/dev/sda6 for me)
  3. Mount all that is needed (including partitions with other OSs so they will be scanned and included in GRUB configuration):
    • mount /dev/sda6 /mnt 
    • mount --bind /dev /mnt/dev 
    • chroot /mnt 
    • mount /proc 
    • mount /sys 
    • mount -a
  4. If the configuration file for GRUB is lost (like in my case):
    • grub2-mkconfig -o /boot/grub2/grub.cfg
  5. Write GRUB2 configuration to disc:
    • grub2-install /dev/sda
  6. Unmount and reboot:
    • umount -a
    • exit
    • reboot

Thursday, March 7, 2013

DSM to DEM Conversion

Often you may have some Digital Surface Model (DSM) acquired from a LiDAR data, and you may desire to get rid of buildings and trees in order to get a DEM. There can be found some articles on a subject that would provide more accurate result then that described here. But I will show here my quick-n-dirty way when one don't need extreme accuracy. It is meant to be used for a relatively flat urban areas.

There will be 3 steps:
  1. Subtraction of the elevated objects like buildings and trees from DSM.
  2. Filling the gaps of the raster cleaned of the elevated objects.
  3. Polishing the DEM.
FOSS software you will need: SAGA GIS, QGIS.

Initial DSM (LiDAR)