Setting up an image series for the MIT OrthoServer
This webpage describes how to set up your imagery series for online
access. (If you've already done that, go on to configuring
your server.)
1. Server setup: required components
Before you can serve the images online, you'll need to (i) create
image
pyramids for the image tiles you want to serve up, and (ii) build
an
image
index listing basic facts about the image tiles. A set of Perl
scripts
performs these tasks by invoking several (binary) executables, compiled
from C source code (for image manipulations). Here's what you'll need
for
this.
a. Perl
interpreter, version 5.004 or higher
- Perl
for
Unix (all variants): Perl may already be bundled with your Unix
distribution -- if so, check that the version is at least 5.004.
Installing
Perl generally requires an ANSI C/C++ compiler such as gcc.
Unpack these and install as directed.
- Perl for
Windows
(ActiveState version); usually comes precompiled.
b. GCC or another ANSI C/C++ compiler
- NOTE: you may not need to perform this step at all -- read on.
- On our current "native" platforms (Sun/Solaris, Intel/WinNT,
Alpha/OSF1),
you don't need a compiler -- just use the precompiled executables
listed
next.
- On other platforms, or if you wish to modify the existing
image-processing
utilities, you'll need a compiler to build executable programs from the
source code.
- If you're running Unix, remember that most Unix distributions
include
GCC
or some other ANSI C/C++ compiler.
- If you do need a compiler, we recommend GCC, freely available
for Unix
(all variants) and 32-bit Windows
c. Image-processing tools
- For the current "native" platforms, you can just use
precompiled executables. Unpack these into a directory listed in your
PATH.
- For other platforms, or if you wish to modify these utilities,
you'll need to compile a few C source-code files against the NetPBM,
GeoTIFF,
TIFF, and/or JPEG image libraries. Build the
libraries as directed, then, unpack the source code into the netpbm/pnm
subdirectory and type "make" to compile. Then copy the executables into
a directory listed in your PATH.
-
Platform |
Executable |
Source Code |
Notes |
Sun/Solaris |
GZipped tar |
Zip |
Tested on SunOS 5.8 |
Intel/Linux |
GZipped tar
Zip |
GZipped tar
Zip |
Tested on RedHat 7. All libraries should
already be installed. No image libraries need to be built, so no need
to build src from with the netpbm/pnm subdirectory. |
Intel/Linux, RedHat 8 |
GZipped tar
Zip |
|
untested |
Intel/WinNT |
Zip |
Zip |
Tested on WinNT |
Alpha/OSF1 |
GZipped tar |
Zip |
|
d. Perl scripts for server setup
- Image indexer - this script extracts the
georeferencing information for each tile, and creates a simple index
file (one line per tile) used by the server. This information is stored
in some sort of "header" -- either embedded in the image itself
(GeoTIFF, DOQQ) or a separate file associated with the image
(ESRI/SPOT).
- Some of these scripts require binary executables, which you
obtained earlier.
- Pick the indexer corresponding to your image header format:
- Before running this script, you may need to adjust the first
line to reflect your Perl interpreter's actual location.
- To run this script, just specify the image tiles to be
indexed, and redirect the output into an index file of your choosing.
For example:
hdr-index.pl image1.hdr
/u8/data/fa*.HDR > index.txt
or at the Windows Command Prompt:
perl hdr-index.pl image1.hdr
/u8/data/fa*.HDR > index.txt
- Image pyramid builder - This script resamples each
image tile you specify into smaller and smaller TIFF versions,
producing a multi-resolution "pyramid" for each tile. Later, this
pyramid will let the server pick the best resolution for a map request,
and to zoom in and out (that is, up and down the image pyramids).
- Pick the pyramid builder corresponding to the format of your
images:
* Requires a companion "HDR" file
(SPOT/ESRI) to define rows, columns, bands, and header size.
- Before running this script, you may need to adjust the first
line to reflect your Perl interpreter's actual location. You'll also
want to adjust a few lines near the top of the script, as indicated, to
specify where you want your image pyramid stored, and what zoom levels
(meters/pixel) you wish to create.
- To run this script, just specify the image tiles to be
resampled. For example:
tif-pyramid.pl image1.tif
/u8/data/fa*.TIF ...
Congratulations! You've prepared your image series for online
access.