Archive for August, 2007

Hacking on OLPC

Posted in FeatureServer, GDAL/OGR, Locality and Space, OLPC on August 19th, 2007 at 03:38:49

Having spent some time around SJ Klein the past week, I’m currently hacking on some mapping things for them. I’m also trying to find interesting activities that already exist to try them out: One of the ones I stumbled into is Kuku Anakula (Hungry Chicken). After playing it for a bit, I found it dissappointingly slow to respond to keyboard input. Since Python is a main component in OLPC, it’s written in Python, so I took it apart.

The result is that I refactored the code to make an order of magnitude fewer function calls, and in the process shaved about 50% of the CPU time off, so far as I can tell, when testing on my mac. I learned how to use hotshot, and have the original profiling data and the profile for my refactor. Getting the new version of the activity on the XO was very satisifying: the gameplay is significantly better, and changes the game from being more like a chore to more like a game.

08182007061
Other things I did today for OLPC include building/installing OGR, and getting FeatureServer set up to run on it with a world borders shapefile. Still got a bit of work to do to build a world map/atlas with click-to-query attributes local on the box, but it’s not too far off.

If you didn’t see them via Slashdot, this set of photos of the OLPC in action is very cute.

MapServer AGG Rendering: Now With Fonts

Posted in Locality and Space, Mapserver, OpenLayers on August 8th, 2007 at 11:55:41

Today, I finally made the switch from the 7 month-running Mapnik based homepage map on the boston freemap to a MapServer 5.0-based AGG rendering.

The new map has had more cartography put into than any existing Boston Freemap to date. Maps like:

Cambridgeport
The state of Massachusetts
Downtown Boston

All demonstrate some of the qualities offered by the new MapServer.

Among other things, the new maps:

  • Have had the labels lowercased, to fit more text in (Python OGR script I wrote, help from #gdal)
  • Have had sortshp run over them, to order them so that you don’t get weird overlaps (help from danmo)
  • Have had additional cartography work done in order to create a better fit for labels
  • Benefit from the excellent AGG rendering work I’ve been describing here, by tbonfort.

In my opinion, the look and feel of these maps really does approach the level of quality that the commercial services have set, as far as rendering goes. MapServer’s leaps and bounds in the past couple weeks in rendering have changed the game from being a “Work on the rendering” game back to a “Work on the cartography” game.

I want to send a special thanks to tbonfort and all the work he’s done recently to make this happen! The rendering is simply incredible in comparison — truly night and day. I’m so happy to be back in MapServer land where the hard work I’ve done on this cartography hasn’t gone to waste. He and the other MapServer developers have really brought me back into the fold with the latest work, and I’m happy to be there.

The font work really doesn’t show up well in a small screenshot — it’s a total affect that makes a difference. Comparing AGG to GD is probably pretty informative though.

Google Projection: 900913

Posted in Locality and Space, OpenLayers on August 6th, 2007 at 20:30:31

So, OpenLayers wants to use a single well-known number to describe the ‘Google Projection’ I talked about earlier. 54004/54005/41001 are all ‘well known’ as being a standard Mercator projection. Which is not the Google Projection.

So, in addition to http://spatialreference.org/ref/user/google-projection/ / http://spatialreference.org/ref/user/6/ , we need something we can use in “SRS” in WMS — an EPSG code, such as it was.

In order to pick one that doesn’t conflict.

It’s the ‘Google’ projection — so we picked 900913. (Google. In 1337-speak.)

Use it. Love it. Promote it.

Rybelsus authorises the Food and Drug Administration (FDA) to treat type 2 diabetes. It functions best when combined with a balanced diet and regular exercise. Rybelsus may help promote weight loss even though it is not FDA-approved as a medication for weight loss. Additionally, individuals with type 1 diabetes are not permitted to use it… read more

MapServer AGG Rendering: Symbols now AGG

Posted in Locality and Space, Mapserver on August 1st, 2007 at 08:02:55

A MapServer developer (Thomas Bonfort) pinged me this morning, using my Boston Freemap as remote testing of a patch for MapServer’s agg rendering. (It was a very minor difference: little rounding errors were causing small black pixels in some places on the map.) In the process of testing a patch for him, he also pointed out that the newest SVN has added AGG symbol support.

The end result is that my comparison from the other day has now gotten even better:

MS 4.10:

SVN Rev 6432 + minor patch:

Now the only thing that’s left is to fix those labels… Wonder if I can learn enough C++ in the next week or two to help get that in. 😉

Nicely done work on the symbols! Better every day.