Discussion:
Thumbnails in OAM server: requires newer gdal
Christopher Schmidt
2011-06-05 15:57:41 UTC
Permalink
Hi,

I see that migurski added support for image thumbnails in the OAM server
in a branch; unfortunately, it's impractical to use this on the current
server, since installing a GDAL which supports /vsicurl/ into the system
Python path is ... problematic.

One route that I was considering suggesting to get around this is to
simply have this as an external service -- presumably one that also
used (for example) some caching to make it so that it wasn't required
to load the image every time.

This seems like one of those things that I should be able to solve using
'the cloud', but I can't think of a trivial way to get GDAL into the
cloud on any of the cloudy things that I can think of -- like Google
App Engine, etc.

Anyone have a thought as to how they would set this up? Maybe spinning
up an EC2 AMI for this is not so totally unreasonable...

-- Chris
Christopher Schmidt
2011-06-05 23:16:19 UTC
Permalink
Post by Christopher Schmidt
Hi,
I see that migurski added support for image thumbnails in the OAM server
in a branch; unfortunately, it's impractical to use this on the current
server, since installing a GDAL which supports /vsicurl/ into the system
Python path is ... problematic.
One route that I was considering suggesting to get around this is to
simply have this as an external service -- presumably one that also
used (for example) some caching to make it so that it wasn't required
to load the image every time.
This seems like one of those things that I should be able to solve using
'the cloud', but I can't think of a trivial way to get GDAL into the
cloud on any of the cloudy things that I can think of -- like Google
App Engine, etc.
Okay, so:

1. I pulled in this code, so by default, you get this functionality
locally in the OAM imageryindex.
2. I coded up a service which does this remotely, using DotCloud,
partly cause I wanted to try out dotcloud.
3. I added the ability to add a setting to your settings.py file to
point to a remote service to do thumbnailing; I use this setting
on the live site, since it doesn't have support for /vsicurl/

http://www.pepperoni.dotcloud.com/?id=37362&size=large is an example image
from my service on dotcloud; I'll be pushing this code somewhere tonight
or tomorrow. (It uses redis + a simple wsgi server, nothing particularly
fancy, so it could be replicated on anyone's personal setup pretty easily.)

Since the service is slow, I didn't turn on the homepage images; I need
to refactor it so the slow loading images don't delay the loading of the
map first, but once that's done, I'll turn them on there too.

Thanks to Mr. Migurski for the image code! I used his code wholesale for
my service, nothing special; it works great with no complaints or problems.

Regards,
--
Christopher Schmidt
Web Developer
Loading...