Getting Started with Spatial Modeling Environment

UPDATE: This attempt has been abandoned at the advice of one of the SME developers. R was suggested as an alternative.

Sometime this week I hope to get the Spatial Modeling Environment up and running on at least one of my computers (office Windows 7 PC, Macbook Pro OS X Snow Leopard, or Ubuntu 12.04(?) in VirtualBox), but I’m posting this as a shoutout to anyone who has attempted this before: the README is pretty technical, and I could use some help.

This is also a note to developers (even if they are scientists) who write “user-friendly,” “icon-based” software and then make you jump through command line hoops to install it. Stop it. What are you trying to accomplish? The more people who can install your software, the more people will use it, and the better it will become.

I don’t think I’m being unnecessarily harsh. Luckily, I really want to use this software and I’m fairly comfortable following detailed specifications and dealing with the command line, but there are others who aren’t. Hopefully I can follow the directions and install this software and use it for my dissertation; hopefully I can put together some sort of installation tutorial that is clearer than the README; and hopefully this will help someone in the future.

P.S. I’m working through Landscape Simulation Modeling this week as well, and I’m pretty pumped to try SME. How’s that for an endorsement?

Need a geologic time scale? Use TimeScale Creator!

I didn’t know this existed until today, so I’ll give it a little promotion. I was in the midst of building my own in Illustrator by tracing the official 2009 timescale from stratigraphy.org (the PDF has font issues on my computer, apparently).
TimeScale Creator
Overview

We’ll see how it works for my 2011 UND Scholarly Forum poster. Wish me luck.

EDIT: Had some problems saving the image as a PDF in Mac OS 10.6.6 (Snow Leopard), but saving as SVG works fine. If a save seems to fail, you need to restart the program and try again. Using version 4.2.5.

Trouble-Free Upgrading Between Opera Nightly Builds in Mac OS 10.6

(If you can’t tell from the title, I’ve been reading too much Lifehacker lately.)

As alluded to before, I’ve been using Opera for a month or so now because Camino decided it was going to suck down all my CPU. Since only the nightly build at the time had the feature I wanted (bookmark bar, works well so far), I was forced to travel into “the land of no automatic updates.” Fortunately, I figured out how to keep all of my settings, bookmarks, and even open tabs when upgrading. Note that these steps may not be necessary, since everything might end up hunky-dory all by itself.

Steps:
1. You’re probably getting your nightly builds from here. Why they use a blog (with anonymous commenting disabled, no less) for getting feedback on builds is beyond me. In any case, you should download the nightly you want to use.
2. Back up your bookmarks and your ~/Library/Preferences/Opera Preferences * folder just in case. You can also move your current Opera application bundle out of Applications and onto the desktop just in case.
3. Install the new version by opening the DMG and dragging the application bundle to your Applications directory. Don’t start the browser yet.
4. Copy the files you backed up from your Opera Preferences folder into the most recent Opera Preferences folder (there might be a version change which changes the folder name; just today I went from 10.7 to 11.0 on the folder name even though I’m using the last build of 10.
5. Start Opera (the new version). Hope things work.

Hope this helps somebody, or at the very least sets them on the right track.

Problems with Tiddlywiki with Opera 10.70 (build 9047) for Mac

At some point in the last few days (actually it looks like since the 18th of September), Opera has quit being able to save my TiddlyWiki files–in fact it appears that all the notes I made for my dissertation on Monday have disappeared, even though I thought I was autosaving. I’m more than slightly miffed about this.

At present, it looks like TiddlyWiki works fine in Safari and Camino (the browser from which I just switched because it uses up most of my CPU). In Opera, however, I get this error:

The original file ’empty.html’ does not appear to be a valid TiddlyWiki

and the file will not save. For some reason, the dialog box asking for permission for the security certificate has also stopped appearing, while in other browsers it comes up for each new TiddlyWiki file I open.

I’ve looked into this as much as I wish but I cannot find a solution. The problem may be with Java (somehow?), or with this particular build of Opera (I think I am on a nightly build because I wanted some of the new functionality). In any case, I’m stymied by the lack of ability to really manage the security certificates, especially when they don’t pop up. I’ll be using Safari as my TiddlyWiki browser until I figure out what the issue is or things suddenly start working again in Opera.

Trying something new . . . again (part 1)

Since I just had to reinstall Leopard and lost all my custom PHP and MySQL installations (and the MySQL databases, unfortunately), I tried to remedy that yesterday and today.

I’m still pissed off that OS X doesn’t come with working PHP and MySQL out of the box, including the PHP libraries. With a simple way to know where the data are being stored, and a way to back it up (in one’s Home folder, perhaps). But I digress–I’m sick of spending hours getting things to work when they ought to work.

So I decided to try out XAMPP for Mac (I tried it a few years back for Windows and enjoyed it), and it worked. Here are a few notes.

1. Everything is installed in the Applications folder. I’m not sure I like this, since I hate having stupid little folders (and DATA) in the Applications folder. I’m not sure if this can be easily changed, perhaps with a symbolic link to somewhere else (such as my Home folder, so it will get backed up).

2. Leopard MySQL was running when I installed, so I had to kill it with ‘sudo killall mysql’ and it will hopefully not start up again when I restart. The main reason I was having issues was that Leopard AGAIN lost mysql.sock.

3. I turned off Web Sharing in System Preferences. This is probably a good thing, and it will at least keep my computer from trying to run two Apache servers at once.

4. I wanted to keep the Sites folder as my web root for localhost, so I opened /Applications/xampp/etc/httpd.conf and changed DocumentRoot to point toward my Sites directory (e.g., “/Users/Matt/Sites”). I then copied everything in /Applications/xampp/xamppfiles/htdocs into /Users/Matt/Sites, and things seem to still work fine.

5. The MySQL databases, in case you want them backed up with the rest of the file structure rather than using phpMyAdmin, are stored in /Applications/xampp/xamppfiles/var/mysql. I may try to move them (with a symbolik link) to be stored in my Home folder since I won’t be keeping a lot of data in them but it’s annoying when I lose settings for various PHP applications (Simple Machines Forum, OpenX, Drupal, Serendipity, etc.).

6. I cannot get MySQL to work if I set a password for it, which means no logging into phpMyAdmin and no access to the MySQL databases. I get “Access denied for user ‘root’@’localhost’ (using password: NO)” instead, until I reset the password to blank. (Note to self, to do this, the command is [sudo ./bin/mysqladmin -u root -p password ”] (no brackets). The -p is important, because it will them ask you for your current password rather than assuming that you just didn’t want to supply it. Idiotic.)

7. Overall, aside from having to install all my databases again (not the fault of XAMPP), it seems to be working well so far. It just miffs me that I have a non-functioning version of MySQL on my laptop as well as an unused (although missing certain useful libraries) version of PHP 5 floating around. At this point I’ll take what I can get.

Specify 5.2 and my quest to import lots of data

I’ve been unable to figure out how to get a username and password to login to the Specify forum; I’ve requested help with that but until I get a response, I’m going to shout my questions out to the ether and hope I get some echos of answers back.

UPDATE: Apparently you have to email specify@ku.edu to get a login (source).

1. When is Specify 6 coming out? Originally it was early 2008, then it was mid 2008, and I haven’t seen any updates recently. I hope it comes out soon.

2. Is there a Specify mailing list? If there isn’t, there should be, especially since it seems like nobody is able to log into the official forum. I might be interested in getting one going depending on interest, since there are supposedly lots of people using the software. There is a mailing list here.

3. The big question: is it possible to add more than the default offering of a few new fields to each form? I’m on the cusp of moving over a great deal of data, and I’d like to be able to include everything and add fields as necessary, but that doesn’t seem to be an option.

I’ve tried adding fields to the database itself (through Server Management Studio Express), but I think the number and name of each field is hard-coded into the Specify program rather than being stored as an expandable list in the database, because the new field doesn’t show up when I go to edit forms. For example, each field has both a name and a set of properties–the properties (such as what kind of data is allowed, how long it is allowed to be, etc.) are described in the database tables, but I have not been able to determine where the name of each field is stored. Hold up. It has to be stored somewhere, because it can be changed by the user. I may have to dig deeper. Sometimes talking through things does lead to answers. We’ll see what I can dig up.

In any case, I’m very comfortable with messing with the database tables themselves in order to get the data in, which is what I’m going to have to do anyway, because the data will be coming out of a tab-delimited file when I’m done with it and should be easy to get into SQL. It’s just a question of making sure those columns exist in the tables first…

Anyway, that’s where I stand. I’ll update when I know more.

Totally ignoring (skipping) a page in LaTeX

To include a dedication page in my thesis, I have to not number the page and not include the page in the numbering scheme. That is, if the dedication is on the 10th page of the thesis, the page before is numbered ix and the page after is numbered x.

To do this, use the \addtocounter command to add a negative value to the page counter when you start the page, and then don’t print the page number with \thispagestyle{empty}.

My dedication page:

%Dedication
\chapter*{} %blank chapter, no title, not included in table of contents
\thispagestyle{empty} %no page number
\addtocounter{page}{-1} %ignore this page when counting
\vspace{2.5in} %start the dedication halfway down
\begin{center} %center everything
\hl{Dedication} %the wonderful words
\end{center}

 

Source: Help On LaTeX \addtocounter: “\addtocounter{counter}{value}”

 

How to edit a layer if you’ve never edited a layer before in QGIS

Remember, you have to set the snap tolerance of each layer individually for each layer you want to edit. To do this in 0.11.0 Metis, select Settings -> Project Properties and click “Snapping options…” under the “General” tab. Make sure the checkbox next to the layer you want to edit is selected. I have not needed to change the tolerance from “0” yet. This is set in map units (see Project Properties, General tab).

Really, this is an annoying step, and something that probably frustrates noobs like me (who jump in without reading the whole guide) a whole lot.

Source: QGIS User Guide for 0.9.1 Ganymede, Chapter 4.4 Editing (about page 47 of the PDF). This PDF should have come with your install.

QGIS Community

Fun extras with the OS X terminal

I’m writing some more R scripts today to make up for the discrepancy between different people’s interpretation of the concept of disparity and variance, and I felt the need to add a signal that the script was done running. I’ve used play() in the past, but it seems silly to use an extra library when I have other methods…

system("say All done!");

I was also playing with the system volume, but decided not to do too much, since I’m usually listening to music, and blowing my ears out is not my preferred method of learning that my function has completed running.

Change the system volume from the command line – OS X Daily Check out Kevin’s comment for some more tricky things.

Of course, you can always just play a sound without the play() function–just use Terminal! http://forums.macosxhints.com/showthread.php?t=33962