Dear Google Maps Team…

Please update your satellite imagery/addresses for Murray, KY. I know we aren’t exactly your top priority, but this is getting ridiculous.

The following things have happened since the maps were last updated:


  • I graduated.
  • I worked three different full time jobs and moved three times.
  • The Wellness Center (shown under construction in the photo) has been open for OVER THREE YEARS. (source)
  • My current apartment complex was finished and has been open for years.
  • Friends that I’ve had have met, gotten married, and conceived.
  • Things that have happened since Duke Nukem Forever was announced was released.

Thank you.


MySQL Goodies

MySQL: The Binary Log

From 5.2.3. The Binary Log, 6.2.2. Using Backups for Recovery, 6.3. Point-in-Time Recovery

Starting mysql like with --log-bin switched does this:

The binary log contains all statements that update data or potentially could have updated it (for example, a DELETE which matched no rows). Statements are stored in the form of “events” that describe the modifications. The binary log also contains information about how long each statement took that updated data.

This is near the equivalent of a transaction log in other DBMSes. You will notice a minimal (1%) loss in performance, but you’ll be able to restore your database to specified points in time.

To restore, run two commands:

shell> mysql < backup_sunday_1_PM.sql
shell> mysql mysqlbinlog host-bin.000007 host-bin.000008 | mysql

There are a few ways to deal with your logs from a maintenance standpoint.

You can periodically run this command:



shell> mysqladmin flush-logs

But my choice goes to changing expire_logs_days in /etc/my.cnf to an appropriate number (I like 30 days). You will have to bounce MySQL after updating /etc/my.cnf.

MySQL: Selecting a Random Record

From ~jk ORDER BY RAND()

SELECT col1, col2
  FROM table JOIN
       (SELECT CEIL(RAND() *
                    (SELECT MAX(id)
                       FROM table)) AS id
        ) AS r2
       USING (id);

MySQL: Full Text Search

From 11.8.1. Natural Language Full-Text Searches and MySQL SQL Syntax and Use

To examine your existing fulltext configuration directives:

show variables where variable_name like 'ft_%'

To change the minimum length of words to caught in your fulltext indexes, change the value of ft_min_word_len.

Example fulltext query:

SELECT * FROM apothegm
    WHERE MATCH(attribution, phrase)

If you really want your fulltext searches to go to the next level, take a look at Stemming. This changes words into their “root” words so their variances can be found easier.

MySQL Closest GIS Location

With Latitude/Longitude stored in two seperate fields:

SELECT * FROM table 
ORDER BY SQRT(POW(fieldLong - givenLong, 2) + POW(fieldLat - givenLat, 2))

Google Maps MouseWheel Subtlety

It’s not much of a secret that you can use your Mouse Wheel with Google Maps… but you have to love the sense of direction even the smallest UI cue gives you:

Zooming Out:


Zooming In:


With All Your Power

A few things going on lately. I’m probably 80% done rewriting “the app” (still unnamed) with full Object Orientation. “The App” itself, before I started the rewrite, was probably 70% complete, and time hasn’t really been too critical of a factor. I’ve hit a couple of snags along the way, but luckily there’s guys out there like Stephen Mizell who help a newbie out.

Another application I’ve been working on is using data from our GIS department and the Google Maps API. I hope to be showing that off by next week.

Does anyone know of any good online MIS programs? I was originally looking at University of Illinois, but they just have Library and Information Sciences.

point(x,y) versus point(lat, long) or What I Learned Today

At work I’m starting to experiment with some really cool GIS and starting to hook their data into useful applications. Hopefully I’ll get them out the door soon so I can show them off publicly. 🙂

Anyway, the lesson learned today is that points in GIS are not exactly the same as a point in math.




lat, long

The problem is, latitude is actually a Y coordinate. Latitude refers to a point relative to the equator. Longitude is actually an X coordinate, since it is referring to a point relative to the Prime Meridian.

Moral of the story: when you’re reading a database of X, Y points on a map in decimal degrees to plug into Google Maps, you don’t want to plug them into the GLatLong function in that order. In other words, don’t use GLatLong(x,y) … it’s wrong. Use GLatLong(y,x).