« June 2011 | Main | August 2011 »

July 20, 2011

Archiving audio files

Just making a record of an email. We have a researcher collecting bird song data and the question is how to best archive the data. Opensource vs proprietary; compressed vs uncompressed, lossless vs lossy, ubiquity of the format.

Hi,

Thanks for taking the initiative on this. Here are notes on a small bit of research:

Quick Primer on Audio File Formats:

- WAV = Microsoft propreitary, no compression, lossless
- MP3 = patented, compression, lossy


Lossless indicates no data (sound waves in this case?) are lost. Lossy is the opposite. You can have a format that compress the data but is lossless.

Notes on the file you sent:

Original size: 7.3 MB, 1 min 15 secs (.wav format)
Zipped size: 6.1 MB (.wav format)

Using Audacity, I exported to mp3: 1.3MB
Zipped size: 1.2MB (.mp3 format)

Obvious question, is the quality of the mp3 sufficient for scientific analysis of the data? Are you aware of best practices guides out of the ornithology world?

Posted by kkwaiser at 12:07 PM | Comments (0) | TrackBack

July 14, 2011

Set up OpenLayers on Drupal 7

First Drupal 7 How to post!!

Enough celebration.

Goal: Get basic CMS GIS capabilities running on D7 using an opensource approach. I've used GMap on D6 but want to switch - partially because of the source issue but also because OpenLayers can handle bounding boxes, WKT, etc.

Assumptions: I'm past the point of writing for complete newbies. Sorry, because I know what it is like when items are shortchanged but there is only so much time in the day.

Steps:

1) Install Drupal 7 - that's all the help you get. Hint, it's pretty much the same as D6.

2) Install OpenLayers

$ cd sites/all/modules
$ sudo wget http://ftp.drupal.org/files/projects/openlayers-7.x-blah.tar.gz
$ sudo tar -xzf openlayers-7.x-blah.tar.gz

3) Install GeoField and Libraries
- OpenLayers does not support fields (CCK) in D7. It is recommended that you use GeoField.
- As of July 14th, 2011 you need the dev version of GeoField!!
- GeoField should give us the ability to add, well, a geo field to our content types

4) Enable Modules
- Visit admin/modules
- OpenLayers UI, OpenLayers, Geofield, Libraries

- Note: I don't have Views on this install yet but OpenLayers Views will be used at a later date.

5) Configuration Notes
- Openlayers is found at admin/structure/openlayers and admin/people/permissions#module-openlayers_ui
- I didn't immediately find config spots for GeoField and Libraries

6) Add a GeoField to a content type
- Visit Content Type Structure (admin/structure/types)
- Pick a CT and add a new GeoField (Widget = Well Known Text) - I'm not 100% certain on the other Widgets but feel free to experiment.

Notes: I hit these messages:
- "Plot Location has no field settings."
(I saved past this but recommend going back in to check your settings.)

- "Unable to load geoPHP library. Not all values will be computer [sic] correctly"
(Hmmm...this looks potentially troublesome, especially if geoPHP doesn't ship with whatever version of PHP we are using)


Further Notes:
I changed the widget to OpenLayers Map because I need a map interface to input WKT values. I got a map but lost WKT. I also got this error:
Notice: Trying to get property of non-object in geofield_form_latlon_map()

(line 166 of /var/drupal7/sites/all/modules/geofield/geofield.widgets.inc).

7) Create a node with a GeoField field.

Posted by kkwaiser at 11:17 AM | Comments (0) | TrackBack

July 12, 2011

Data Turbine Notes - HelloDT Example

From a previous post:

There is a HelloDT project on the documentation homepage but the link is dead . I think I found the valid link however I'm not sure what to do with the code there.

This is what to do with the code there. These instructions assume you have an rbnbServer instance running already (all default settings.)

1) Visit the repository (linked above)
2) Download code via subversion
- You can try the subversion commands given at the Getting Started link but the source destination failed.
$ sudo apt-get install subversion
$ svn checkout https://neeshub.org/tools/hellodt/svn/trunk hellodt
#Fail
$ sudo svn checkout https://nees.org/tools/hellodt/svn/trunk hellodt
#Fail

Curse three times that there should be a simple tar.gz download link!!

3) Download all files manually by going into the directories
- Click on the file, scroll to the bottom of the page and Download as plain text.

$ cd ~/
$ sudo mkdir helloDT
$ sudo mkdir helloDT/docs
$ sudo mv ~/Downloads/README ~/helloDT/docs

- Repeat for ALL files

4) Open the README

5) Install the Ant compiler
$ sudo apt-get install ant

6) Compile the code
$ cd ~/helloDT
$ sudo ant

Buildfile: build.xml

prepare:
[mkdir] Created dir: /home/ubuntu/helloDT/compile
[mkdir] Created dir: /home/ubuntu/helloDT/compile/classes
[mkdir] Created dir: /home/ubuntu/helloDT/compile/lib

compile:
[javac] Compiling 2 source files to /home/ubuntu/helloDT/compile/classes

jar:
[jar] Building jar: /home/ubuntu/helloDT/compile/lib/HelloDT.jar

BUILD SUCCESSFUL
Total time: 2 seconds

7) Run the source (and sink if you want, not sure exactly what it does)
$ sudo ant runSrc

8) You should see terminal output now. If you have an rbnbServer, rbnbAdmin and rbnbPlot running you can refresh those and everything should show up.

Posted by kkwaiser at 10:59 AM | Comments (0) | TrackBack

Data Turbine Notes - First Start

Very simple startup instructions assuming installation is complete. This will plot a sin wave (or some kind of wave) which can be considered data.

1) Start Tomcat webserver
$ cd ~/RBNB/V3.2B5/bin
$ sudo ./Start_Webserver.sh

2) Start RNBB
$ sudo java -jar rbnb.jar

3) Navigate to http://localhost/webTurbine/

4) Start rbnbAdmin > File > Open > default's except add any username and password
5) Start rbnbPlot > File > Open RBNB > Accept Defaults
6) Start rbnbSource > File > Open Connection > Accept Defaults
- click Start in lower right
7) Refresh
- rbnbAdmin > View > Refresh
- rbnbPlot > Refresh

8) rbnbPlot Channel Configuration> click rbnbSource > click c0

9) rbnbPlot > click RT (for Real Time)


Posted by kkwaiser at 09:44 AM | Comments (0) | TrackBack

July 11, 2011

World is writable!!!!

We have successfully set up Ubuntu dev machines on USB sticks but there are a few tweaks.

1) Enabling the UFW yields a warning:

ubuntu@ubuntu:~$ sudo ufw enable
WARN: / is world writable!
WARN: / is group writable!

- Solution from this forum.

ubuntu@ubuntu:~$ sudo chown root:root /
ubuntu@ubuntu:~$ sudo chmod 755 /
ubuntu@ubuntu:~$ sudo ufw status
Status: active

Posted by kkwaiser at 01:34 PM | Comments (0) | TrackBack

July 01, 2011

Data Turbine Notes - Installation

1) Downloaded code from http://code.google.com/p/dataturbine/
- V3.2B5-ReleaseNotes.html
- RBNB-V3.2B5-install.jar

2) Install Java SDK for Ubuntu. Commands taken from StackOverflow

$ sudo add-apt-repository ppa:sun-java-community-team/sun-java6
$ sudo apt-get update
$ sudo apt-get install sun-java6-jre sun-java6-bin sun-java6-jdk

- Accept the software license

3) Ran the installer using Java
$ sudo java -jar RBNB-V3.2B5-install.jar

- Accept license // default path

Here is some text that the installer spits out:

Shortcut Information ====================

The following is a listing of all relevant information about the intended
shortcuts. This information should make it possible to create shortcuts manually.

--------------------------------------------------------------------------------

Shortcut : RBNB-V3.2B5
Intended Location : Desktop
Description : RBNB V3.2B5 WebTurbine Launcher
Shortcut Target : ~/RBNB/V3.2B5/apache-tomcat-6.0.18/bin/JavaEnv.exe
Command Line : jre startup
Icon File : ~/RBNB/V3.2B5/apache-tomcat-6.0.18/bin/RBNB.ico
Icon Index : 0
Working Directory : ~/RBNB/V3.2B5/apache-tomcat-6.0.18/bin

--------------------------------------------------------------------------------

Shortcut : RBNB-V3.2B5
Intended Location : Applications Menu
Description : RBNB V3.2B5 WebTurbine Launcher
Shortcut Target : ~/RBNB/V3.2B5/apache-tomcat-6.0.18/bin/JavaEnv.exe
Command Line : jre startup
Icon File : ~/RBNB/V3.2B5/apache-tomcat-6.0.18/bin/RBNB.ico
Icon Index : 0
Working Directory : ~/RBNB/V3.2B5/apache-tomcat-6.0.18/bin

--------------------------------------------------------------------------------

see below the fold for more output from the install process.

4) Start the webserver.

There are two scripts for managing the webserver in /RBNB/V3.2B5/bin:

Start_Webserver.sh
Stop_Webserver.sh

Make these executable:
$ sudo chmod +x Stop_Webserver.sh

Then start the server:
$ sudo ./Start_Webserver.sh

The server starts for me but throws a warning/error:


Start_Webserver: JAVA_HOME not defined.
Start_Webserver: setting JAVA_HOME to /usr/bin/..
Using CATALINA_BASE: ~/RBNB/V3.2B5/apache-tomcat-6.0.18
Using CATALINA_HOME: ~/RBNB/V3.2B5/apache-tomcat-6.0.18
Using CATALINA_TMPDIR: ~/RBNB/V3.2B5/apache-tomcat-6.0.18/temp
Using JRE_HOME: /usr/bin/..

I'm going to ignore this for now because I don't know how/where to set the JAVA_HOME variable.

Notes on setting the environment variable:
$ sudo gedit /etc/bash.bashrc

Add the following:


#
# Setting home variables for DataTurbine related activities
#
JAVA_HOME=/usr/lib/jvm/java-6-sun-1.6.0.21/
JAVA_HOMEPATH=$PATH:$JAVA_HOME/binexport

RBNB_HOME = /home/ubuntu/RBNB/V3.2B5/
RBNB_HOMEPATH=$PATH:$RBNB_HOME/binexport

#JRE_HOME=/usr/lib/jvm/java-6-sun-1.6.0.21/
#JRE_HOMEPATH=$PATH:$JRE_HOME/binexport


Checkpoint: When I navigate to http://localhost I am forwarded to http://localhost/webTurbine/ and see a simple page with links to further documentation.

5) Once the WebServer is running, an RBNB Server can be initiated through webTurbine (rbnbServer) or via command line:

$ sudo java -jar /RBNB/V3.2B5/bin/rbnb.jar

6) Similarly, the rbnbAdmin interface can be started through webTurbine (rbnbAdmin) or command line:

$ sudo java -jar admin.jar

7) The example situation with this software is a little fubar.

There is a HelloDT project on the documentation homepage but the link is dead
. I think I found the valid link however I'm not sure what to do with the code there.

Then there is the matter of the Example directory that ships with the .install file. No README file = no example.

-----------------------------------------------

-----------------------------------------------
3) continued...

RBNB-V3.2B5 has been successfully installed to:

/home/ubuntu/RBNB/V3.2B5


Usage
-----

To use this product, start the Web server by either:

1) WINDOWS: using the shortcut provided on the desktop.
2) LINUX/UNIX/MACOSX: by executing the script:

/home/ubuntu/RBNB/V3.2B5/bin/Start_WebServer.sh

Once the Web server has been started, point your Web browser to:

http://localhost

(You may need to tell your browser not to try the firewall for that address).
There you will find documentation and links that will allow you to start and
configure the RBNB DataTurbine server and applications.


Standalone Installation
-----------------------

If you wish to deploy the RBNB components into your own J2EE compatible
webserver, please perform the following operations.

1) Copy common/lib/rbnb.jar from the installed webserver into your own
common/lib.
2) Copy the WAR files from the installed webapps directory into your own
webapps directory. These currently include documentation.war, RBNB.war,
webTurbine.war, and the stylesheets directory (uncompressed).


Third Party Software
--------------------

Various third party packages are required by some applications delivered with
the RBNB system. These include:

1) Sun's Java Media Framework (JMF) is required to capture video.

1) Sun Java Media Framework

The Sun Java Media Framework (JMF) is used by the video capture code to capture
video. It is required to run the rbnbjcap.jar file.

You can download the Java Media Framework from http://java.sun.com.

Once you've unpacked this package, make sure the JMF JAR file is in your
CLASSPATH environment variable value or is in the extension directory of your
Java SDK or JRE installation (usually in JAVA_HOME/jre/lib/ext).

Posted by kkwaiser at 09:09 AM | Comments (0) | TrackBack

Ubuntu on a stick

Installation Notes:

SanDisk Cruzer 8GB USB 2.0 - FAT32 default formatting

1) Ubuntu.com to download 10.04 LTS; 32bit
- get drirection to create a USB Drive (we used the Windows option)
- "Show me how" -> Download Universal USB Installer

2) Open USB Installer
- Ubuntu 10.04.x
- Point .iso file
- Allow to format to FAT32
- Persistent Data - 4GB (saves 4GB for OS)

Posted by kkwaiser at 08:57 AM | Comments (0) | TrackBack