These steps demonstrate how to create a new endpoint on the file system. Repeat each section for multiple endpoints.
- Create the endpoint directory and copy files
mkdir -p /usr/share/onearth/demo/wmts/epsg4326
cp -p /usr/share/onearth/apache/wmts.cgi /usr/share/onearth/demo/wmts/epsg4326
cp -p /usr/share/onearth/apache/index.html /usr/share/onearth/demo/wmts/epsg4326
- Check permissions
- Create the endpoint directory and copy files
mkdir -p /usr/share/onearth/demo/twms/epsg4326
cp -r /usr/share/onearth/apache/ /usr/share/onearth/demo/twms/epsg4326
- Check permissions
- Create the endpoint directory and link to mapserv binary
mkdir -p /usr/share/onearth/demo/wms/epsg4326
ln -s /usr/bin/mapserv /usr/share/onearth/demo/wms/epsg4326/index.html
- Check permissions
Note that TWMS endpoints must exist in order to leverage mod_onearth time snapping.
To create the KML endpoint, you'll need to compile the KML CGI script and specify the location of the KML endpoint.
This step requires cgicc to be installed: http://www.gnu.org/software/cgicc.
- Compile the script. The WEB_HOST option must be set to the location of the KML endpoint. Default is 'localhost/twms'.
cd /usr/share/onearth/demo/twms-geo/kml/
make WEB_HOST=<host>:<port>/kml_endpoint
- Copy the binary CGI script to the endpoint directory.
mv kmlgen.cgi ../
The WMTS and TWMS CGI scripts will "fall through" to an empty tile image in the event that an invalid request is received. To support the following files should exist in the endpoint directory:
- black.jpg
- transparent.png
OnEarth installs the following files in the /usr/share/onearth/empty_tiles/ directory for you to choose from. Custom empty tiles may be created if none of the provided ones are suitable.
- Blank_RGB_512.jpg - A 512x512 pixel black JPEG.
- Blank_RGB_256.jpg - A 256x256 pixel black JPEG.
- Blank_RGBA_512.jpg - A 512x512 pixel transparent (0,0,0,0) PNG.
- Blank_RGBA_256.jpg - A 256x256 pixel transparent (0,0,0,0) PNG.
To complete configuration of the a WMTS endpoint, you would copy or link these empty tiles as shown below:
cp -p /usr/share/onearth/empty_tiles/Blank_RGB_512.jpg /usr/share/onearth/demo/wmts-geo/black.jpg
cp -p /usr/share/onearth/empty_tiles/Blank_RGBA_512.png /usr/share/onearth/demo/wmts-geo/transparent.png
- or -
ln -s /usr/share/onearth/empty_tiles/Blank_RGB_512.jpg /usr/share/onearth/demo/wmts-geo/black.jpg
cp -p /usr/share/onearth/empty_tiles/Blank_RGBA_512.png /usr/share/onearth/demo/wmts-geo/transparent.png