Configuring and running an MIT Orthophoto Server
NOTE: This page has been updated in
April, 2003 with scripts that add compliance to the OpenGIS
Consortium's WMS 1.1.1 specification!
Once you've preprocessed your image series as described earlier, you're ready to run your MIT OrthoServer on them. This page explains how.
Required external components
Unlike the image-setup tools, which you run once to set up your image
series, the following components will run behind your Web server
many times, every time someone clicks to request things. The image server
requires a Web (httpd) server and a few Perl scripts invoked through the
Web server's Common Gateway Interface (CGI).
a. Apache Web server, v. 1.3 or higher
- We recommend this as a robust, low-cost server option. However, many other
Web servers should function just as well. For setup, refer to the server's
documentation.
- Be sure to configure the server to handle "*.cgi" files as runnable scripts,
as explained in the Apache server documentation (if you're running Apache).
b. Lincoln Stein's CGI module for Perl
- This module is bundled with recent versions of Perl -- so you can probably
skip this step.
- If you're running an old 5.004 version of Perl, install the CGI
module as directed.
Perl scripts for real-time image server
You'll need to install two Perl scripts somewhere in your Web tree,
orthoserver.cgi and orthoclient.cgi. As their names imply,
orthoserver.cgi does the work of handling requests for images and
sending back the appropriate image or error message to the client. The
other script, orthoclient.cgi, creates a simple HTML user interface for
panning, zooming and downloading your imagery.
a. orthoserver.cgi
-
Seamless image server. This script builds an
image mosaic and delivers it in various image formats (GIF, TIFF,
GeoTIFF, PNG, JPEG, or PNM). It uses the image-index you built earlier
to extract portions of the "pyramids" you built for each image tile. This is the only script needed for your server to function as a
Web Map Server as defined by the OpenGIS Consortium's Web Map Server
(WMS) specification.
-
orthoserver.cgi download (works with the new client and complies with WMS versions 1.0.0, 1.1.0 and 1.1.1).
-
orthoserver_classic.cgi "classic" download (works with the old client and complies with WMS version 0.9).
-
Notes:
-
This script needs an ASCII configuration file like orthoserver.cfg that describes your image series and desired server behavior. Adjust orthoserver.cfg and put the result in the same directory as orthoserver.cgi. (See these notes on orthoserver.cfg.)
-
Orthoserver.cgi requires the following binary executables: doqmosaic, tiffmosaic, pnmscale, cjpeg, ppmtogif, pnmtopng, pnmtotiff, geotifcp, and giftoppm. Check that you've either unpacked or compiled these (or that you'll never need the corresponding image formats).
b. orthoclient.cgi
-
HTML viewer-client generator. Builds an HTML form that makes HTTP requests to orthoserver.cgi. Requires a set of scalebars and arrows: use a starter set or create your own. Optionally links to .cgi.
-
Note: You'll
need to edit the first few lines of client.cgi to specify the server
script(s) to use, the layer names, the zoom levels to present to the
user, etc.
-
orthoclient.cgi download.
-
orthoclient_classic.cgi download.
3. Running the imagery server
At this point, you're almost there:
-
Copy the client and server scripts, and the server configuration file,
into your Web tree.
-
Make the client and server scripts executable.
-
From a Web browser, type the URL of the client.cgi script. If you've set
reasonable defaults in your client.cgi script and server.cfg config file,
you should be able to browse your imagery layers from here.
4. Additional optional components
a. Extra Web services
To use these additional server-side scripts, just remove the appropriate
comment tags (<!-- ... -->) from client.cgi.
-
download.cgi
-- Image downloading, by format, size, and header style. Links to server.cgi,
av-header.cgi,
mi-header.cgi,
and piggish.cgi.
-
av-header.cgi,
mi-header.cgi
-- Create the ArcView "World File" and MapInfo "Table" for each image, for
proper georeferencing in these dekstop mapping packages.