Friday, April 27, 2007

Prepping for this Weekend

I tweaked my cell phone location-reporting midlet today (Friday). One funny thing is how my particular cell platform/provider sends two User_Agent defs when there's a post, which kind of threw me off for a bit. Had to check the HTTP server logs to see what was happening, but all was really well, since the target executable never failed and did its thing properly. J2ME is indeed more limited than its more capable, hardware-happy brethren, but there's always a way :)

For the server-side scripts, I modded what used to be handled by a cron job to now be handled at the end of the post target's script at run-time. So essentially an entity can report location on a regular basis, and the correct data will be ready for any queries related to location visualization. OK for a few users, but won't scale much, and this is not a concern at the moment ;)

When I have time to further define the map output, will post some pics!

Sunday, April 22, 2007

Tracking Myself

This weekend I messed around further with mapping my movements. This is not really novel these days, but I want to do things by myself, in order to understand them better. And I want to do it with stuff I wrote or set up myself.

What set me off was realizing that MapServer could handle a GML textfile as a layer. That means I can simply keep a GML file current with multiple points. For example, a GPS trace, as reported from my cell phone, and then have all of those points rendered in a map almost real-time.

Next consider that I can have a map file definition that tracks multiple location reporters in that fashion , and have each rendered as a distinct layer. Each reporter's location can be represented with a different symbol (icon) in the generated map visualization. This means nearly real-time tracking of multiple persons and other entities, assuming they choose to broadcast. The delay is negligible, and dependent only upon fine tuning of the apps and scripts involved.

Tuesday, April 17, 2007

Years ago this would have bothered me ;)

I received the attendee evaluations of a recent presentation. On a scale of one to five, the overall rating was 4.50 (not so bad).

The technical level rating was 5.0, but I got slammed on use of visual aids, etc. One person was apparently very disappointed, and I think I know who that was :) It was supposed to be a hands-on session, and I had indeed prepared materials and distributions for that. But there were so many questions that kind of sidetracked me, many of which dealt with non-technical issues, meaning I never got around to the real demos!

I'll remember in particular this comment (which I do take as constructive criticism):

"This was supposed to be a hands on (sic) workshop and there was absolutely none of that!"

That reminds me of when, in one of my first tech jobs, which involved supporting a software package, a client wrote my boss. He said something to the effect that my support, while always pleasant, polite and attentive, was in the end not terribly helpful (in other words, we didn't know the solution to his problem, or did not want to admit a known limitation/bug).

Heh, the guy who mentored me in that job used to preface almost all of his responses with the words "that is definitely non-standard behavior," and follow with much language of obfuscation ;)

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...

Wednesday, April 4, 2007

GIS on Campus

Today I got to see the results of what some of our Comp Sci students were doing with some of our GIS-related stuff. For a class project they are making a campus tour app, written in Swing, that uses the Place Lab GPS code to establish 2-D position, and then they render a map from my MapServer instance.

It was great that Justin stopped by with the Fujitsu tablet we provided, and he had their latest version of the client app running. Was really curious to see what they'd come up with. Essentially, he grabs both a GML dump of the building footprints, and grabs vector maps periodically, comparing them to current location.

I've been messing with the map files all this week, but as is normally the case with smart folks, Justin figured out what I was doing without needing to ask, and Florian did the same with Place Lab.

Justin and I wandered around Campus a bit, and I was impressed that the client, on the tablet, followed us perfectly. It knew and showed our position flawlessly, as we made our way down Campus sidewalks. Kind of scary, but great :)