Monday, May 27, 2013

Optimize aligned aerial photo images tip

Agisoft Photoscan is a software application that can be used for generating orthophoto mosaic images from aerial photographs using structure from motion (SFM) techniques. As part of the procedure of creating orthophotos, the aerial photographs must go through a photo alignment process. Sometimes the alignment process can result in odd orientations; an example is shown below, where the cameras seem oriented at 45 degrees from the horizontal.

It is possible to correct this by running the Optimize command from the Ground Control pane as shown in the screenshot below.

The following dialog will appear when the Optimize command is clicked. Click OK.

Run the Optimize command as many times as required until the orientation appear correct or there is only minor changes in the camera and point cloud. The screenshot below shows the optimized or corrected cameras and point cloud.

Monday, May 20, 2013

Android App for monitoring natural disasters

You can monitor natural disasters around the world, as published by the Global Disaster Alert and Coordination System - with this Android App. The app shows the latest natural disasters like earthquakes, volcano eruptions, tropical cyclones, tsunamis and floods as color coded icons in a list as well as on a Google Maps backdrop; the icon colors indicate the alert level - green, orange, and red. The icon will look more transparent the older the event was published. 

The list view can be used to sort the natural disaster events according to the date time, region, and disaster type. 

Clicking on an item on the list will bring up more details about the disaster event.

To view more information about the event, clicking the Browser button will open up the source GDACS web page with more details, as shown below.

On the other hand, clicking the Map button will bring up a Google Map view of the event, as shown below.

Download the app from the Google Play store. 
Get it on Google Play

Monday, May 13, 2013

Export a LibreOffice Base table as a CSV file

Previously I use Microsoft Access to manipulate and export out table data as comma separated values (CSV) files. I decided to use LibreOffice Base to do the same thing. It wasn't difficult to create CSV files in LibreOffice but the concept is different than Microsoft Office's. In LibreOffice, you have to create the text file document first before dragging the source table into the document. It took me a while to figure this out. The following steps illustrate how to do it.

  1. Click Start | All Programs | LibreOffice 4.0 | LibreOffice.

    LibreOffice appears.

  2. Click Text Document.

    A blank Writer document appears.

  3. Press F4.

    The Data Source pane appears.

  4. Expand the database nodes until the desired table e.g. biblio, is visible.

  5. Drag and drop the table onto the blank document.

    The Insert Database Columns dialog box appears.

  6. Toggle on Text.
  7. Select a Database column to export, e.g. Booktitle. Then click >. Repeat for additional columns, e.g. Author and Publisher.
  8. Edit the format string to include a comma or any other delimiter between the columns.

  9. Click OK.

    The table data is placed on the document.

  10. Select File | Save As.

    The Save As dialog box appears.

  11. Type in a file name e.g. mycsvfile. Choose the type as Text. Click Save.

    The CSV file is created.

Monday, May 6, 2013

Import a CSV file into LibreOffice Base

After using Microsoft Access for many years, I decided to give LibreOffice Base a spin. One of the usual task I do with Access is to import a Comma Separated Values (CSV) file into an Access *.mdb database, where I could run some SQL queries on it. I wanted to do the same thing using Base. It turned out that I could copy and paste the CSV file via a LibreOffice Calc spreadsheet, but a better way is to simply open the CSV file directly, as shown below.

The example CSV file is shown in the screenshot below.

  1. From the Start button, select All Programs | Libre Office 4.0 | LibreOffice Base.

    The Database Wizard appears.

  2. Toggle on Connect to an existing database. Choose Text. Click Next.
  3. In the Path to text files field, click Browse. Select the folder containing the CSV file, e.g. D:\Temp\myfolder\. Click OK.

  4. If necessary, choose the CSV type e.g. Plain text files (*.txt). Choose the CSV separator formats. Click Next.

  5. Click Finish.

    The Save As dialog box appears.
  6. Type in a new file name, e.g. D:\Temp\csv.odf. Click Save.

    The database is created and the CSV file can be seen as a table.

    Note: this CSV database is read-only. 
  7. Now, create or open up an existing Base database, e.g. New database.odf in another window.

  8. Simply drag and drop the CSV table to the newly opened Base window's Tables icon or pane.

    The Copy table dialog box appears.

  9. Optional. In the Table name field, type in a new name.
  10. Click Next.

    The Apply columns appear.

  11. Click the >>.

    All the columns are moved to the right.
  12. Click Next.

  13. Optional. Type in a new field name and change the type or length if necessary.
  14. Click Create. Optional. When prompted to create a primary key, click Yes to create or No to ignore.

    The CSV file is imported into the Base database.