WebGL: 4.2 Million Swiss Addresses Vizualized
Want to fly over all Switzerland addresses? Just launch your favorite WebGL browser (Chrome for me) and jump to this url: Swiss Address Cloud.
If you can’t run the demo, there is the youtube version:
What you see is all swiss geocoded addresses (around 4 million) in 3D(data comes from local.ch). Addresses are rendered with a big array of point sprites using gl.drawArrays(gl.POINTS, …):
The points are encoded in a Float32Array, then sorted and gziped using a python script. Sorting the data improves the compression ratio by over 200% so it’s well worth the effort. This brings the original 100mb file down to 7mb.
The file is then loaded using XHR level 2, which supports binary files and progress events. The points are then rendered using WebGL as GL_POINTS and additive blending is used to give it a glow effect. In the future I might add HDR rendering and blooming.
There is no level of detail or culling performed so this will require a relatively powerful rig. Also note that for some reason Firefox Aurora (9) seems to be quicker than Chrome Dev (16) for some mysterious reason. I would expect all of the work to be done by OpenGL so I’m not sure about where this comes from. It could be chromes process isolation.
La ville du bout du lac (Geneva…)
Complete source code is available HERE.
[ Subscribe to Geeks3D latest news by email ]