ESRI released a beta version of their ArcGIS API for Silverlight/WPF some time ago. The may version does not support WMS out of the box but posted some code on their Code Gallery.

Unfortunately this code will not work for WPF (and I doubt that it will even work for Silverlight, considering the strange GetCapabilities parsing and the missing formatter information when parsing floating values). Anyway, I had some time at work and fixed the code for WMS version 1.1.1 and 1.3.0 (I didn’t test other versions, but will do so along the way to some fancy, internal prototype).

Have a look at the code on Github.

But then I turned on the radio and Sunny Side Up was on, and everything was fine again. (I noticed only later that Sunny Side Up is part of the program on Sundays and Holidays).

I got something like 400 unread news items in my Google Reader account, which is quite a horrible number. The easiest thing would be to delete some news feeds but actually I’ve already reduced the number to something like 20. Some sites, like Apartment Therapy or Unplugged publish dozens of stories per day. Usually I quickly skip through them, star the most important posts for later reading (haha) and add the really, really great posts to my delicious account.

But: Couldn’t Google, the great data and information cruncher, tell me which items are of greater interest to me than others? I starred some 100 items so it should be fairly easy for them to find a general pattern. Would you do that for me, Google?

Heatmap generated from AIS data, showing UK and northern Europe

Heatmap generated from AIS data, showing UK and northern Europe

What do you do with more than 25 gigabyte of compressed AIS data? You play around with it, load it into databases (and wait over a day for an index to get generated), do some funky .kmz files or you generate heatmaps, like this one to the right.

It shows AIS traffic for the UK and northern Europe during 24 hours. You can clearly see the high traffic zones. The original algorithm is not by me (and unfortunately the whole code is in the office, so the attribution will follow tomorrow) but I tweaked it a little bit.

The whole thing is quite memory consuming (the original rendering size was 4000×2000 pixels) and at the moment the .NET Garbage Collector and I are not a good team. I would re-implement it in C (maybe even with proj4 support?) but I first need to read about some drawing algorithms.

A short list of things I accomplished in 2008

  • Take more photos
    No. In fact I think I took even less photos than in 2007. But I’m looking forward to spring and some holidays!
  • Launch at least the two projects I’m working on
    No, although I invested some time into some pretty cool thing, it never went live. But I will restart it in 2009.
  • Spend a few days at the seaside with my girlfriend
    No, space for improvements.
  • Get my degree
    Yes, with distinction.
  • Spend a weekend in at least one European capital
    Only one capital and no weekend, but I’ve been to Madrid, Hamburg and Bergen.
  • Move to Vienna
    Yes.
  • Go to the theatre, at least once twice
    No, not a single time. Shame on me.
  • Go running, two times a week minimum
    Went running quite often during the summer (4 to 5 times a week) but only once a week or two since I’m living in Vienna.
  • Get a job (in the web industry)
    Not in the web industry, but a cool job.
  • Plant herbs
    Not until now but will do it tomorrow.
  • Do a painting together with my girlfriend
    There are still three days left, right?
  • Contribute to some Open Source projects
    If two lame bugfixes count, then yes.
  • Learn another programming language
    Got pretty fluent in Python, yes.
  • Learn Cocoa
    No.
  • Find a flat without a pre-installed kitchen
    No, the kitchen was pre-installed, but is nevertheless quite cool.
  • Learn Swedish again
    No.
  • Spend more time cooking and baking
    Yes, your own flat really helps!
  • Watch ARTE more often (or quit my subscription)
    No, but I won’t quit my subscription.

Google Vienne

Is there any reason why Google names Vienna, the captial of Austria, Vienne? May I suggest an adjustment?

Post.at error message

So I ordered that 24 inch Samsung monitor a few weeks ago. Amazon said that they shipped it but never arrived here. I called the Austrian Post, which is the contractor for Amazon here in Austria. A lady told me that the monitor was received at my place last Thursday.

Well, the only problem is that I wasn’t at home last Thursday because I was on a business trip in Hamburg. After some calls to Amazon and the Post it was pretty clear to me that they gave the parcel to some stranger and I will most likely never see it again (they even told me that it’s not the job of the Austrian Post to look for parcels they did not deliver to the correct address because they simple refuse to admit that I did not get the monitor).

The whole thing is now at Amazon again, they’ve sent me a new monitor which is at the post office right now and which I will pick up tomorrow (just to make sure that it’s really there, I wanted to check the Tracking & Tracing status of the parcel and I got this nice looking error message at the right: “The creator of this fault did not specify a regionreason”).

Politics

I really don’t understand how Austrian politicians can smile during all those press conferences and media events. They built up the same coalition like in 2006 and they gonna have the same problems like in the last two years. The questionnaire which appeared last week was a bad joke and whole thing looks to me that they just wanna make fun of us.

My advice for a better way? Get some pros for each field, build them up and maybe even introduce a dedicated program for politicians. Get them to know their ressorts, put somebody with a deep knowledge of the subject in the position of secretary. For me the future of a country is too important to put somebody on top of the state who has no clue about what’s going on.

And finally, hope that it gets better.

I was the need of a flip effect for scriptaculous and came up with this solution:

Effect.Flip = Class.create();
Object.extend(Object.extend(Effect.Flip.prototype,
  Effect.Base.prototype), {
 
    initialize: function(element, flip_graphic, original_graphic) {
      var options = arguments[3] || {};
 
      this.element = $(element);
      this.flip_graphic = flip_graphic;
      this.original_graphic = original_graphic;
 
      if (this.element.getAttribute('src') == this.flip_graphic) {
        this.flip_graphic = this.original_graphic;
        this.original_graphic = this.element.getAttribute('src');
      }
 
      this.width = options.width || this.element.getWidth();
      this.delta = this.width * 2;
      this.flip = 1;
 
      this.start(options);
    },
 
    update: function(position) {    
 
      var change = this.flip * (0.5 - position) * this.delta;
      var padding = this.width / 2 - change / 2;
 
      this.element.setStyle({
        width: change + 'px',
        padding: '0 0 0 ' + padding + 'px'
      });
 
      if (change < 0)
      {
        this.element.writeAttribute({ src: this.flip_graphic });
        this.flip = -1;
      }
    },
  });

You can use it like that:

new Effect.Flip(element, 'graphics/original.jpg', 'graphics/flip.png', { width: 120 });

I will post a demo tomorrow – I promise, it looks cool!

I’m really thinking about getting the new 24″ LED Cinema Display from Apple. Comparable devices from Dell, for example, are a bit cheaper but I really like the idea of connecting my MacBook with the display and getting a MagSafe and USB connection, too. The only question I have is: Is there a Mini DVI to Mini DisplayPort adapter available from Apple? If not, do I need to get a new MacBook to use the new display? Sounds bizarre.

« Older entries