Archive for the 'Locality and Space' Category

Mapserver Wishlist Items

Posted in Locality and Space, Mapserver on April 25th, 2006 at 17:09:16

Caching headers. Geoserver has an outstanding JIRA item about this, and a geoserver mailing list post describes the problem:

Putting squid in front of geoserver can help tremendously, but squid is very reluctant to cache anything without proper caching meta-information in the appropriate http headers.

This applies to mapserver as well.

Additionally, when running mapserver behind squid, libcurl sends “Pragma: no-cache” headers, so even if a remote mapserver instance supported caching (which it doesn’t), it wouldn’t be cached when behind a proxy. I think this is fixable by adding ‘Pragma:’ to the header setting code in maphttp.c, but I tried that and couldn’t get it to work.

The combinations of these would make tiling map apps much more realistic, since it would reduce load when requesting tiles from the map server.

More Mapserver Goodness

Posted in Locality and Space, OpenGuides, Spatial Databases on April 22nd, 2006 at 03:39:34

In the vein of my previous post, I bring you another nifty trick: This time integrating Google Maps and Mapserver (kind of).

Visit static renderer. Browse Google Map. Then, when you’re looking where you want to be, hit the link up top, and off you go — transported to a world where data is public domain or licensed for re-use 🙂

I’m still trying to find a happy medium level of size of markers — when you’re zoomed way out, they’re too big, but when you zoom way in, they’re too small, so I don’t know what to do, but it *works* and that’s the important part.

Interface suggestions welcome — perhaps a side by side view is better? (I think I may be having a bit too much fun…)

Mapserver, Postgis

Posted in Locality and Space, OpenGuides, Spatial Databases on April 22nd, 2006 at 02:24:38

After hours of fighting with Postgis, Schuyler finally got bia into a state where she would do the right thing when told to install it, so I was able to load the data from the Open Guide to Boston into postgis, and from there, to talk to it with mapserver. The result is a couple of pretty cool looking maps: Boston Metro, and Boston Metro Big, 1000×800 and 2000×1600 respectively.

The maps underneath are provided by Public Domain datasets, wrapped up in a tidy little easy to use package by the folks at OpenPlans through their “Sigma” project, and I’m extremely grateful to them for their efforts! They’ve saved me a ton of work, and allowed me to produce something that looks pretty damn cool.

If that’s not an advertisement for Open Geodata, I don’t know what is.

Google Earth Browser Pane?

Posted in Locality and Space on March 27th, 2006 at 01:48:27

So, this weekend I was showed Google Earth-on-Windows has a “Browser Pane”, where you can do searches and so on from within Google Earth, and the application will send back extra requests when the Google Earth client moves and so on.

I’m looking into doing some stuff with this, but when I looked, the mac client has no such browser pane. I then looked up WINE’s records for Google Earth and found it doesn’t run under Ubuntu Breezy, which is what I’m running.

So, does anyone have any suggestions as to how I could either 1. Get a copy of Windows Google Earth running on OS X or Ubuntu 5.10, for the Browser Pane feature, or 2. Get an account on a windows box I can RDC to? 🙂

Grass Hacking

Posted in Locality and Space on March 4th, 2006 at 21:24:45

Working with Schuyler on hacking my cell/gps data — got it displayed on top of tiger/line data (At which point I said to schuyler, “Okay, so now we’ve got an extremely crappy version of what I already have with Google Maps. What’s next?”) Next step is to work on a voronoi translation of some kind to make centroids out of the data and see what that does.

In the process, have discovered that v.in.ascii appears to be completely broken in openosx grass.

We have also discovered that v.surf.idw can produce really pretty pictures… but on OS X, it gives something more like:

GRASS 6.0.0 (bostonlatlong):~/cell > v.surf.idw in=cell out=cell\_idw col=cid npoints=1
v.surf.idw:
8468 records selected from table
3538 points loaded
Interpolating raster map <cell_idw> … 247 rows … Segmentation fault

Hooray for segfaults, eh?

Cell Map

However, Grass is still really fucking cool.

Adventures in GPS

Posted in GPS Devices, Locality and Space on February 1st, 2006 at 08:32:49

A couple weeks ago, I was lent a rebranded RoyalTek BlueGPS by Jo Walsh. She and Schuyler had it for something for Wireless Hacks, and hadn’t used it since. I’ve been using it to do a number of fun things. If you still do not have a car o truck so you can run in to new adventures with your gps, a ford van or transit custom might be just for you according to the local road expert, find his explanation at the last link.

Getting it working was pretty easy. Just go through the “Setup a Bluetooth Device” process, enter ‘0000’ in the passcode box. Set up a Serial Port in the Bluetooth System Preferences Panel. Then I’ve got a ‘/dev/tty.BlueGPS27E8B5-SerialPort-1’ device that I can play with.

There’s a couple things I’ve played with or looked at:
* BlueGPS Log Downloader — although it’s only Bluez+Linux, and my last dongle broke recently, so I can’t use it.
* gpsd — turning any serial device into something accessible over TCP in a regularized format.
* gpsdrive — uses gpsd to display your position and track on a map. Biggest problem with this is that downloading maps seems to be difficult at best. I couldn’t get it to work how I thought it should.
* gpsconnect, a mac os x program that lets me initiate conversation with the GPS, after which I can use `cat` to spit the output to a file. Set the laptop in the back seat, the gps on the dashboard, and cat the NMEA to a file, then use GPS Visualizer to generate a pretty map.

I’m also doing some nifty celltracking stuff, but I’ll save that for another entry.

The BlueGPS is nifty. I recommend it, although I have no clue how much it costs 🙂

Mapserver Will Eat My Brain

Posted in Locality and Space, Web Hosting on February 1st, 2006 at 00:09:44

Set up mapserver for an interested web-hostee over the weekend. (If you’re interested in hosting a domain with mapserver available, please contact me. Barring extra needs, cost will probably be $10/month.) He set up a WMS+Shapefile layer to demonstrate the power of mapserver for me: this is now available at massradar. Radar imagery is provided via an Iowa State WMS Server, which also has data for the Entire country. Now I really want to set up Google Maps with a radar layer.

GPS Display

Posted in Bluetooth, GPS Devices, Mobile Platform, Python, Symbian Python on January 14th, 2006 at 14:32:32

Today, there are a large number of cheap bluetooth GPS devices on the market. These devices allow you to connect to the device wirelessly, which is great for when you’re driving and don’t want cables draped all over the car.

However, what happens when you can’t drag your computer out to act as a display of your position? No bluetooth GPS on the market today for under $500 has a display of any kind. When you consider that these things can be had for $70, that makes purchasing one go from likely, to ridiculous. What’s the point of a handheld, easy to use GPS if you can’t use it to see where you are?

GPSDisplay ScreenshotIf you’ve been asking this question, I’ve got software which has an answer for you. GPSDisplay will allow you to connect to NMEA compatible Bluetooth GPS devices and display your position fix. It is written entirely in Python, using NMEA code from Forum Nokia. It requires only that you first install Python for Series 60 on your device, and should work on all first and second generation Series 60 phones. Simply download the .sis file, send it to your phone, and you’ll be all set to go — you can use your phone as a display for that new cheap Bluetooth GPS you bought, and stop dragging your laptop out into the woods to go Geocaching.

My First Spatial Database

Posted in PostGIS, Spatial Databases on January 11th, 2006 at 11:13:48

Thanks to Schuyler and Rich Gibson, I now have a spatially aware postgres database.

Later today, thanks to Schuyler and zool, I’ll have a copy of Mapping Hacks, and a bluetooth GPS.

Last night, I learned how to use centroid(), astext(), and distance_spheroid(), and calculated the distance from my house to zool’s house, and from there to Darwin’s, where I ate lunch and used the wireless yesterday. I loaded some data, learned the frustration of having data in different projections, and learned a little bit about the various types of geometry. I loaded data from an ESRI shapefile. I found that “” in Postgres is equivilant to “ in mysql — that is, “GEOMETRY” means ‘the value from column Geometry’, not ‘GEOMETRY’, which is the literal. (If you ever get “Error: column “Foo” does not exist, that might be a good thing to check.)

Last night, I made my first foray into spatial databases.

Last night, I took control of space on my machine.

Tomorrow, I take control of space in the world!

But today, I need to work on things that I’m actually paid for at the moment. 😉

PeopleFinder

Posted in Geolocation, Mobile Platform, Ning, Python, Symbian Python on October 14th, 2005 at 10:23:43

In my spare time (hah!) I’ve been hacking on an app on Ning, called PeopleFinder. The goal is to be a geolocation app, supporting a variety of things social. One of my many goals for a long time has been to create and use some kind of tool which allows me to generate MeNow data with no effort.

I’ve finally got it.

With the help of Geocoder, I can now type in an address, and have it automatically update my location on the website, including showing my position on a GMaps interface. The PeopleFinder API is still a bit weak, but using it, I can write a Client for Series 60 Python, which allows you to update via a GPS lat and long, or via an address.

I’ve created a token system for authentication via the API — when logged in, you simply hit the token link, grab the token, and put it into the client (in the “token” variable).

Eventually, once I write the functionality, it is my hope that I will be able to provide more features via this API — the ability to look for people nearby you, get their information, send them messages, and so on. However, right now this is just a 2-3 hour hack, and I’ve got piles of work to do – but this is so cool I had to share it.

As far as I know, this is the first example of a Ning App exporting a semi-usable API to remote clients. In part, this may be due to previous limitations on Ning’s end which have recently been resolved: looking at the phone client code, you’ll see the ?xn_auth=no parameter, which allows you to skip cookie authentication. It’s a pretty nice solution to the problem in my opinion — it solves what I need while not interfering with the rest of Ning.

So grab your phone, grab a client, and update your address on the go — then, the next time I see you in the neighborhood, I’ll drop by and give you a wave.