Friday, April 13, 2007
Retrieving GIS Data in Second Life
Ha! This took a bit of hacking, but it's cool.
OK. So one can grab external content via HTTP no prob. And I have GIS, and access to good aerial photography mapped to my town. Much better than Google buys.
I wanted to show my current location in real life within Second Life, visualized through a real-world GIS.
To begin, I needed a location informer. I hacked out a midlet app that runs on my cell phone. It reads my Bluetooth GPS, and posts the coordinates to a script that simply writes to a text file with the latitude and longitude of my latest known position.
Next a script on yet another server grabs that data and calls my GIS, and asks to render a JPEG of my location. The resulting image file is built in a place accessible to HTTP requests.
In Second Life, one "touches" the prim with a script that simply queries a script that grabs the most recently JPEG.
Now just need to tweak some firewalls...
Posted by Willi at 7:29 PM