Blender + Papervision3D + Tweener

September 20th, 2009

This is the second iteration of my explorations with Papervision3D, Tweener, and Flash CS3. For this demo, I built and exported a 3D model from Cobalt v5.4 and reworked it with Blender. After adding texture and lighting, I exported each part as a COLLADA file for use by Papervision3D. The result will let you view (and drive!) a Moke from my Mini Moke project. This version has over 5,500 triangles.

Here’s the Moke demo:

- To view, flip, and rotate – click and drag your mouse.
- To drive, use your arrow keys.
- Click anywhere to reset after driving.

Download source files:

v2 – PV3D 2.0
v1 – PV3D 1.7

Zip Code, Latitude, Longitude, City, State

September 27th, 2008

Recently Eric Meyer asked how to translate thousands of postcodes into city and state. For large datasets, your best bet may be a commercial geocoding service. Google and the USGS both use Tele Atlas, for instance. However, if you just want something to play with, you have several options. You can pre-process your data with the 1999 U.S. Postal Service ZIP Codes and Federal Information Processing Standards (FIPS) Codes from the US Census Bureau. Use MS Access to import the zipnov99 dBase file and then export as a tab delimited text file. The result includes Zip Code, latitude, longitude, state code, county code, and a few other codes. The state and county codes match the FIPS codes, which then give you the full state and county.

You could also use the United States Zip Code Database (updated 2/99) available from Unisys Global Station Index Information. This is a National Weather Service related data product, and contains state, country, latitude, longitude, and elevation of weather stations.

To use the 1999 geocode data, I wrote a small Perl script that reads multiple data files, matches each Zip Code with the corresponding geocode data, and then outputs a single combined file.

For data visualization, I uploaded the resulting tab delimited file to a Google Spreadsheet, and then used the Google Map Wizard to output the map code. This is an easy way to put any location on a map. You can also add information and links to each marker.

What follows is a Google map for the processed California data from the 2008 Survey results. A few Zip Codes did not match the 1999 data and are not included. Please note there are nearly 2,000 data points, so there will be a delay when the data loads. Loading will also max your CPU temporarily, and the map will be a bit slow when you zoom. Here is the map demo.

If you don’t have thousands of addresses, you may be interested in geocoding addresses with PHP/MySQL instead. You may also be interested in Ben Fry’s zipdecode project, which is further described in his book, Visualizing Data.

Comments are moderated.