Publish the World Elevation image service on ArcGIS for Server

If you want to use the World Elevation image service, you need to publish the service on ArcGIS 10.3 for Server or later with the ArcGIS Image Extension for Server. The components for setting up the World Elevation image service are organized under the WorldElevation folder located at \\<server-ip>\source_documents\data, where <server-ip> is the network IP or server name of the data appliance.

Prepare the terrain image service

The mosaic datasets and auxiliary files are prepared using the default path V:\WorldElevation. Follow the preparation steps below before you publish the service.

  1. Map the network location \\<server-ip>\source_documents\data as V: drive. By following this structure, you can complete the rest of the steps quickly.

    If your system does not allow mapping the network location as V:, follow the steps below to repair the paths for mosaic datasets located under \\<server-ip>\source_documents\data\WorldElevation\MD\:

    1. Click Open to open the Catalog window in ArcMap and browse to \\<server-ip>\source_documents\data\WorldElevation\MD\.
    2. In the Catalog window, right-click D_WorldDTM and click Modify > Repair.
    3. Click Cancel to cancel the search operation. The Repair Mosaic Dataset dialog box appears.
    4. Change the Folder Paths Depth setting to 1 and press Enter.
    5. In the Paths List pane, the Old Path column shows V:. For the New Path, insert the UNC path, for example, \\<server-ip>\<source_documents>\data, where <server-ip> is the network IP or server name of the data appliance.

      Repair Mosaic Dataset window showing Folder Paths Depth, Old Path, and New Path

    6. Click OK to apply the changes.
    7. Right-click D_HollandFix, click Modify > Repair, and then repeat steps c through f.
    8. Right-click S_EGM2008, click Repair, and then repeat steps c through f.
    9. Right-click R_WorldDTMHillshade and click Modify > Repair. The Repair Mosaic Dataset Paths GP tool dialog box opens. The Original Path is automatically populated as V:\WorldElevation\MD\WorldElevation.gdb\D_WorldDTM. This is a reference mosaic dataset that points to the D_WorldDTM mosaic dataset. Copy the path from Original Path and paste it to New Path, and then replace the V: drive letter using \\<server-ip>\<source_documents>\data in New Path, where <server-ip> is the network IP or server name of the data appliance. For example: \\<server-ip>\source_documents\data\WorldElevation\MD\WorldElevation.gdb\D_WorldDTM.
    10. In a text editor, open Terrain_ElevationTintedHillshade_HollandFix.rft, located under .\WorldElevation\Parameter\RasterFunctionTemplates. Find and replace all occurrences of V:\WorldElevation with the new path location, for example, \\<server-ip>\source_documents\data\WorldElevation\.
  2. Open ArcCatalog, browse to .\WorldElevation\MD\WorldElevation.gdb, and click Add to add the D_WorldDTM mosaic dataset to ArcMap. It should draw as elevation (DTM) for the whole world.

    Elevation (DTM) for the world

  3. As a quick check, click Add to add the R_WorldDTMHillshade dataset to ArcMap. You should see the hillshade visualization of elevation.

    Hillshade visualization of elevation

Publish the terrain image service

The terrain image service is created by publishing the JSON file toArcGIS for Server using the publishing script provided.

  1. Click Open to open the Catalog window and make the ArcGIS Server connection to localhost with publisher or administrator credentials.
  2. Make sure ArcGIS for Server has read permission on the WorldElevation folder and register the V:\WorldElevation folder as Data Store. In the Register Folder window, uncheck the Same as publisher folder path check box and type the UNC path of the WorldElevation folder for the server folder path, for example, \\<server-ip>\source_documents\data\WorldElevation.

    Register Folder window

  3. In a text editor, browse to .\WorldElevation\Parameter\json, and open Terrain.txt.
    1. Find and replace \\\\server-ip\\source_documents\\data with \\\\user-server-ip\\source_documents\\data.

      The paths for the mosaic dataset in "path": and the raster function templates in "rasterFunctions": update to the new path.

    2. Save the changes.
  4. In a text editor, browse to .\WorldElevation\batchfiles, and open PublishServices.bat.
    1. Syntax for publishing the script is PYTHON.EXE SCRIPTNAME HOSTNAME USERNAME PWD JSON_DEFN.TXT SERVICENAME SOURCE_MD SERVERFOLDER.

      For example: C:\PYTHON27\ArcGIS10.3\python.exe V:\WorldElevation\scripts\PublishService.py localhost username password V:\WorldElevation\Parameter\json\Terrain.txt

    2. Make necessary path changes to PublishService.py and Terrain.txt. If Python is installed at a different location than C:\Python27\ArcGIS10.3\python.exe, edit the path to reflect the change.
  5. Run the .bat file from the command window and the terrain image service will be published under the root folder.
  6. Open ArcMap and click Add to add the terrain service. By default, the service will render as an elevation (DTM) raster.
  7. Right-click Terrain and click Properties > Processing Templates.
  8. From the Function drop-down list, choose one of the functions defined on the service.
  9. Click OK.

    Layer Properties window

    The Raster function will dynamically render the elevation derivative selected from the drop-down list.

  10. Go to the REST endpoint of the Terrain service. For example: http://localhost:6080/arcgis/rest/services/Terrain/ImageServer.
  11. Click ArcGIS.com Map. The Terrain service opens in the map viewer in a browser. By default, it will render as elevation (DTM).
  12. Click Terrain > More Options > Image Display> Renderer to choose from the server functions defined on the service.

    Image Display option

Add the Multi-Directional Hillshade raster function

Multi-Directional Hillshade (http://esriurl.com/NextGenHillshade), available from the ArcGIS Online World Elevation services, is a custom raster function. If you would like to add it as a server function on the terrain service that you just published on your local server, it is available to install on your server. You can download the function from http://esriurl.com/MultidirHillshadeFunction, which contains all setup files with installation documentation. Follow the instructions carefully after unzipping the ZIP file. Once installed, you can add the raster function template (refer to the documentation on saving as a raster function template) to the terrain service. Follow the instructions on how to save a raster function template (RFT) in the installation document. You can save the .rft file at the same location where other RFTs reside, for example, \WorldElevation\Parameter\RasterFunctionTemplates.