Home

Awesome

mod_reproject

An apache module that converts a geospatial tile service from one projection and tiling grid to another

Building

Requires apache httpd, libapr-1, libjpeg, libpng and zlib to be available for linking and at runtime. In linux this means the runtime and the development packages have to be installed. In Windows, the header files are expected to be in the zlib, png and jpeg subfolders in the same directory as the project files, and the httpd and apr in \Apache24\include. The libraries for all the above packages should be available in \Apache24\lib and \Apache24\bin

Usage

When reprojecting from GCS to WM or backwards, the input level gets chosen based on the relative resolution of the output tile and the input levels. There are two such values, calculated on the two axis. The lowest output resolution axis figure is chosen, it will fall between two input levels. By default, the slightly lower resolution input level is chosen, which will lead to the minimum number of input tiles, thus maximum performance. When the Oversample parameter is on, it chooses the next higher resolution input level, which in general will improve the output image sharpness, while degrading the performance slightly. At hight latitudes, for GCS to WM reprojection it might be necessary to use an even higher input resolution level. This can be done by using the ExtraLevels parameter, which takes a positive numerical value (defaults to 0). The allowed extra levels are only used when needed (at high latitudes). Use this setting with care, as it decreases performance considerably and increasing latency, processing and memory usage per request. The Oversample and ExtraLevels have slightly different purpose and can be combined, for example having oversample off while allowing one or two extra levels. They do interact however, the extra level implicit in the Oversample is added to the ones provided by ExtraLevels.

Implements two apache configuration directives:

Reproject_RegExp pattern

Can be present more than once, one of the existing regular expressions has to match the request URL for the request to be considered

Reproject_ConfigurationFiles source_configuration_file configuration_file

The first file contains the source raster information, while the second the desired configuration for the output

Directives in both source and reproject configuration files

Size X Y Z C

PageSize X Y 1 C

Projection prj

DataType type

SkippedLevels N

BoundingBox xmin,ymin,xmax,ymax

Directives only in the reproject configuration file

SourcePath filepath

SourcePostfix string

EmptyTile size offset filename

MimeType mtype

ETagSeed value

InputBufferSize size

OutputBufferSize size

Quality Q

Oversample On

ExtraLevels N

Nearest On

Radius value

Ways to use

If the input and output size and alignment match, it can be used to change quality or the format