Tuesday, July 7, 2009

Image compression for Ortho map cache

I took a minute today to analyze how much JPEG compression is appropriate for cached map services (ArcGIS Server) that are displaying an aerial photo. With JPEG compression you can set the quality between 1 and 100. 100 is more quality but less compression. Wikipedia actually has a great example of this. All of this stuff also applies to creating a map cache for imagery. So I set up a little test to see what the difference is between JPEG 90 and JPEG 55. I used 2008 orthophotography imagery for Hamilton county Indiana. I cached the map using the Bing Maps / Google Maps tiling scheme. Then I added a scale (1:575) on the bottom to build the cache down to the resolution of the 6 inch imagery. I figure this is what most people would do to get their full raster resolution in the map cache. The cache took a little over 9 hours to create for both services (2x3.59 Ghz CPU's). The first big difference was the size:
  • JPEG 90: 32.8 GB
  • JPEG 55: 15.1 GB
So JPEG 55 is about half the size of JPEG 90. That means that it will download about twice as fast in a web browser. Of course this is only part of the overall performance of the application but still it is pretty significant. Now what about the quality?

JPEG 90 at small scale




JPEG 55 at small scale




JPEG 90 at medium scale




JPEG 55 at medium scale




JPEG 90 at large scale




JPEG 55 at large scale




For my money the decision is pretty easy. JPEG 55 is half the size and very close on quality. You should certainly test this out when building your own cache though. Also, this is assuming there is no vector data in the map. When you have vectors in your map you need to go with JPEG 90 to keep the lines crisp. Or a better option would be to seperate the vectors into their own service and draw them on top of the ortho. This way you could use PNG 8 for the vector and JPEG 55 for the raster and get the best of both worlds. You can see that google maps is even doing this with their image service.

2 comments:

  1. Your blog is knowledgeable i am impressed . Wall mounted tv service All of our television installation service provided will be installed to the highest quality standards in the industry.

    ReplyDelete
  2. This is a precious information and really a helpful post too. Thanks to share a useful information. There are some interesting aspects in your article and I learned lot of things, thank you. May field gun Mayfield Gun shop specializing in the classics. Full range of new firearms by the latest and greatest manufactures, also find firearms from the great wars.

    ReplyDelete