LizardTech.com

Archive for the ‘Open Source’ Category

LizardTech Engineering’s introduction to LiDAR Compressor

Monday, July 13th, 2009

This morning, July 13, 2009, LizardTech unveiled LiDAR Compressor. This application allows consumers of LiDAR data the same benefits LT has provided raster consumers for over 10 years. The press release describes some of the product’s overall capabilities and benefits. I was privileged to be the project manager for this effort and in this post will describe the product from an engineering perspective.

At the lowest level, the application leverages our experience doing wavelet-compression. Our specific approach is the subject of a patent application and I won’t attempt to describe it in detail. However, a concise summary is that we do a 1D wavelet transform on each of the channels of interest (x, y, z, intensity, etc) and then use the same compression techniques we use in our MrSID and JP2 implementations (bitplaning, entropy encoding, appropriate quality-weighting of the bitplanes). 

At the SDK implementation level, we depend on several packages from the OSGeo stack. We use liblas to read data out of the LAS files. LT is proud to be the first (to my knowledge) commercial application of this industrial-strength library. (Regular readers of our blog may recall that last March we supported the OSGeo Code Sprint in Toronto; liblas was certainly part of our interest there!). Liblas, in turn, uses libgeotiff to decode the CRS information in the LAS files and the now venerable GDAL to translate that into a WKT that the rest of us can understand. The result is a C++ SDK available to our application … and soon to yours too (decode only).  We’ve got distributions for both Windows and Linux which will be available on our developer’s site any day now.
 
liblas and GDAL in LiDAR Compressor

At the application level, the underlying technology has changed as well. Our flagship product, GeoExpress, is written in managed C++ using the Windows Forms library. Our most recent products (GeoViewer and Lidar Compressor) are built in C# using WPF. Our experience was that this change allowed much greater developer productivity and the creation of more flexible (not to mention prettier) applications. For example, I suspect we would not even have attempted a ListView with dropdown boxes in the header (all dynamically populated based on the selected input text file — see Figure 1 below) if we had to implement it without XAML support:
 
Importing a text file

Figure 1: Importing a text file.

Additionally, the application makes extensive use of the WPF/.NET threading support. This allows the application to achieve two design goals: (a)it provides first class support for text-based LiDAR files and (b) it can run several jobs at once. 

Before we can do any kind of processing (e.g. compressing, viewing) we need to tell the file’s reader how many points there are and what the overall extent is. For LAS files (and MG4 files) this is no big deal because everything we need to know is stored explicitly in a compact header. For text files, it’s not stored at all and must be calculated which involves reading the entire input file. This “initialization” (see figures 2 and 3 below) can take a long time and needs to happen in the background.

Initializing

Figure 2: Text file initializing (in the background, so the application is still responsive.)

A few minutes later …

Extents

Figure 3: We’ve read the 321 Mb text file and now know the extent and number of points.

Running several jobs concurrently in and of itself is not a hard problem. The difficulty comes when we consider how to provide feedback (progress bar, log messages), the ability to cancel and deal with failures. For historical reasons, GeoExpress runs its compression work in a separate process. This provides excellent isolation (uh,… that’s part of the ‘history’) but complicates tight integration with the parent application. This is part of the reason we could not include the ability to run concurrent jobs in GeoExpress 7. Lidar Compressor uses WPF’s built in BackgroundWorker class to manage the worker threads.  This vastly simplifies the integration tasks. The result is an application that leverages the multi-processor capabilities of modern hardware as well as a UI that is simple to understand and use (see Figure 4 below).
 
Five jobs running simultaneously

Figure 4: Five jobs running simultaneously.

Everything the user sees is pure WPF except for one thing:  the viewer. The viewer is a WPF wrapper around DirectX. There’s a lot of math that goes into manipulating 3D objects. DirectX provides an API to do this for us and, very significantly, runs it on the graphics card (i.e. no burden on the CPU). So, the good news is that rendering is blazing fast. The bad news is that DirectX 9 D3D (which is what we use) gets very finicky when it comes to older OSs (that is, XP), drivers and hardware. We were not able to get a really satisfying resolution to when DX would fail and why, but we were able to guard against it so that the application handles the failure gracefully.

3D_sid_o

Checkout the free trial and let us know what you think.

Reminiscences of Spring Break at the ESRI Dev Summit

Monday, May 4th, 2009

Glen Thompson and I were fortunate to attend the ESRI Developer’s Summit in Palm Springs last month. In addition to being a great excuse to get out of the rain here in Seattle, the Dev Summit provides a great opportunity to catch up with our friends from Redlands and see what’s new with ArcGIS.

Those who missed it can look over the presentations.

One way to think about an event like this is in terms of what’s cool and exciting and what’s getting the “business as usual” treatment. This year what’s cool and exciting is most definitely client-side web mapping. We’re talking Flex, Javascript and the newly released Silverlight API for ArcGIS Server. These were accompanied by cheering, contests, prizes and “Playful” (?) references to glitzy, “silverlighty” (get it?) applications.

Glen and Mike at ESRI

There were no contests or prizes for the backend stuff on which Glen and I spent most of our time. Of particular note, GDAL is definitely on the rise here. GDAL is the open source project that (among other things) provides the ability to convert between raster formats. Principal maintainer Frank Warmerdam presented a technical session on “Custom Raster Format Support in ArcGIS through GDAL”. Guys, start thinking about migrating those Erdas Imagine / RDO extensions to GDAL. The writing is on the wall.

And, speaking of items that will eventually need migrating, I gave a short talk on “Implementing a Custom Image Server Raster Format.” It describes the technical architecture of the project and includes some server benchmarking work that we did in Seattle highlighting the impact of using Express Server with ArcGIS Image Server Extension.

ESRI is even hosting a video of the presentation.

Thanks, guys!

Post-sprint reflections

Tuesday, March 17th, 2009

LizardTech was one of the sponsors of an OSGeo code sprint in Toronto last week. Mike Rosen and I were both fortunate enough to attend and spend some quality time with twenty of the brightest minds of the open source geo world, folks working on everything from GDAL to MapServer to PostGIS to OpenLayers.

Sprinters in Toronto

Perhaps the most visible result from the LizardTech side of things was some performance analysis that Frank Warmerdam, Chris Schmidt, and I did on GDAL’s use of MrSID – which should eventually help everyone downstream of GDAL, notably MapServer.

Paul Ramsey (mine host) and Chris both blogged daily about the event. Perry Nacionales and Paul have also posted some pix on flickr, including some of us all unwinding at Le Hockey (Hey, look! Real live Canadians, in their natural habitat!).

And, though we might have the grace to blush just a little, we’re not too modest to nonetheless link to Chris’ stirring post on using GDAL with our D-SDK.

Update: 13 July 2009. Read an article about the OSGeo code sprint in Toronto by Michael Gerlek here. – mdf

Image courtesy of Perry Nacionales

Toronto open source code sprint in March

Thursday, January 8th, 2009

Lechuguilla CaveIt is an oft-invoked stereotype that engineers prefer to work alone in dark caves, and there’s certainly some truth there. Here at LizardTech, for example, each development team member works in a well-ventillated but cozy and earthy burrow that our ops team constructed to individual specifications out of papier-mache. Some of these workspaces have convincing stalactites, or narrow entrances lined with lichens. A few are strewn with bones.*

But in mass emergences similar to those of the 13- and 17-year cicada, engineers periodically gather together in high-energy events called “code sprints”, which last several days and whose purpose is to resolve bugs, churn out new code, share information and ideas, and dispatch untold wedges of pizza. Ethnologists now suspect that a form of socialization is also carried on.

In March, LizardTech will be cosponsoring such an event in Toronto hosted by OSGeo. A couple of lizards will be attending and will work on GDAL/MrSID performance issues. Please consider joining us there!

*By contrast, our sales team is housed in a single, large spherical room partially filled with rubber balls and water toys.

Seriously, image of New Mexico’s Lechuguilla Cave courtesy of Wikipedia.

GeoWeb 2008 trip report (or, What I did on my summer vacation)

Friday, August 1st, 2008

Last week I had the pleasure of attending GeoWeb 2008 on behalf of both LizardTech and OSGeo. The conference was once again in Vancouver BC, at my favorite business hotel and conference venue. I’ve attended this conference for a number of years now, and it gets better every passing year.

Just a few highlights:

  • The underlying theme running through the week was the integration (confluence? convergence?) of the GIS world with the worlds of CAD and BIM (building information model). Architects typically operate at a different scale than we’re used to, but increasingly they want to be able to envision and model their buildings in the larger urban landscape that we can provide for them. Kimon Onuma and his BIMStorm work demonstrated this integration very well. Going the other direction, traditional GIS folks are looking to things like CityGML to be able to improve the fidelity and add that 3rd dimension to their own models.

panelists

  • I moderated a one hour discussion on Open Source Servers, ably assisted by panelists Paul Ramsey of Clever Elephant, Justin Deoliveira of OpenGeo, and Bob Bray of Autodesk. The attendance was good, and we had some good questions and discussions about the pros (and sometimes cons) of working in and with open source software.
  • On behalf of Cody Benkelman of Mission Mountain Technology, I also presented a cool paper on using Amazon’s Mechanical Turk web service and Google Earth to solve a real problem for a real customer. I tried to get across two main ideas. First, Turks and Turk-like things can be seen as “outsourcing for the Web 2.0 generation”. Secondly, and possibly disconcertingly to some, complete “automation” is not always the best answer – us geeks think of it first, and yes, it’s usually the right move – but not always. Contact us for reprints.

Mechanical Turk

  • Dr. Michael Goodchild gave a great workshop on Data Quality – a topic which quite honestly sounded pretty dry and uninspiring, but which turned out to be both educational and interesting. He convinced me that LizardTech’s viewers are displaying lat/long incorrectly, at least from a data quality perspective.
  • Michael Jones of Google keynoted again this year, and he once again made everyone stop and think deeply about the human impact the geo community can – and does – have on the world. Not the kind of talk you can summarize easily, you just had to be there.
  • This year the conference held its first Student Competition. The competition required use of open source software for the projects; OSGeo was one of the sponsors and as such I was one of the judges. First prize went to Tobias Fleischmann (Paris Lodron University Salzburg, Germany) for “Web Processing Service for Moving Objects Analysis”, which was built using deegree. Second prize went to Tran Tho Ha and Nguyen Thi Thanh Thuy (Politecnico di Milano, Italy) for “e-Collaboration for DGPS/GPS data distribution and receiver device evaluation”, which used PostGIS, MapScript, and OpenLayers. Congratulations to both winners!
  • GeoWeb is also famous for being scheduled during Vancouver’s annual “Celebration of Light“, an international

    Shipmates

    fireworks competition held several evenings high above English Bay. As in previous years, the conference’s evening reception was turned into a sunset dinner cruise, after which we all went up on deck to oooh and aaah at the pyrotechnic ballet.

Finally, just for kicks, I’ll offer the following bits of geotrivia I collected during the conference:

  • “A GPS with a bullet hole in it is a paperweight. A paper map with a bullet hole in it is a paper map with a bullet hole in it.” (attributed to the US Marine Corps)
  • Tobler’s First Law of Geography: “Nearby things are more similar than distant things.”
  • city furniture (noun): features of the urban landscape such as park benches, bus shelters, street lamps, etc
  • “The amount of metadata needed for a piece of data varies with the ’social distance’ from me to my data consumer.” (Michael Goodchild)
  • For Amazon’s web services, 85% use the REST API and 15% use the SOAP API. (quoted by Satish Sankaran, ESRI)
  • On the Vancouver transit system today, 100 of 144 bus routes are under detours, due to 2010 Olympics work. (Peter Ladner, Vancouver deputy mayor)
  • Thirty percent of all 911 calls are not associated with a street address. (Talbot Brooks)

GeoWeb 2009 is already being planned, and will include special emphasis on both cityscapes and 3-D modeling.