Publish the World Elevation services

The World Elevation services, Terrain and Terrain 3D image services, are available with most product options on Collections 1, 2, 3, 4, and 5. If you want to use the Terrain and Terrain 3D services, you need to publish the services on ArcGIS Desktop and ArcGIS Server 10.8.1 or later with ArcGIS Image Server.

Terrain

The components for setting up the Terrain image service are organized under the WorldElevation folder at \\<server-ip>\CollectionX_source_documents\data, where <server-ip> is the network IP or server name of the data appliance, and CollectionX is the collection where the Terrain image service is located: Collection2 (World Standard), Collection3 (World Advanced), Collection4 (North America Standard), or Collection5 (North America Advanced).

Note:

The Terrain service is not included with Collection 1.

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>\CollectionX_source_documents\data as V: drive, where <server-ip> is the network IP or server name of the data appliance, and CollectionX is the collection where the Terrain image service is located. If your system does not allow mapping the network location as V:, perform the following steps to repair the paths for mosaic datasets located under \\<server-ip>\CollectionX_source_documents\data\WorldElevation\MD\:
    1. Click Open to open the Catalog window in ArcMap and browse to \\<server-ip>\CollectionX_source_documents\data\WorldElevation\scripts\, where <server-ip> is the network IP or server name of the data appliance, and CollectionX is the collection where the Terrain image service is located.
    2. In the Catalog Tree window, expand WorldElevation.tbx and double-click the Repair mosaic dataset paths tool.

      Catalog Tree window with WorldElevation.tbx expanded

      The Repair mosaic dataset paths dialog box appears.

    3. In the GDB Full Path field, insert the UNC path, for example \\<server-ip>\CollectionX_source_documents\data\WorldElevation\MD\WorldElevation.gdb, where <server-ip> is the network IP or server name of the data appliance, and CollectionX is the collection where the Terrain image service is located.
    4. In the Old Path field, insert V:. For the New Path, insert the UNC path, for example, \\<server-ip>\CollectionX_source_documents\data, where <server-ip> is the network IP or server name of the data appliance, and CollectionX is the collection where the Terrain image service is located.

      Repair mosaic dataset paths window showing GDB Full Path, Old Path, and New Path

    5. Click OK to apply the changes.

      The tool repairs paths for the S_EGM2008, D_HollandFix, R_WorldDTMHillshade and D_WorldDTM mosaic datasets.

    6. In a text editor, open Terrain_ElevationTintedHillshade_HollandFix.rft.xml, located under .\WorldElevation\Parameter\RasterFunctionTemplates. Find and replace all occurrences of V:\WorldElevation with the new path location, for example, \\<server-ip>\CollectionX_source_documents\data\WorldElevation, where <server-ip> is the network IP or server name of the data appliance, and CollectionX is the collection where the Terrain image service is located.
    7. In a text editor, open OrthometricToEllipsoidalHeightEGM2008.rft.xml, located under .\WorldElevation\Parameter\RasterFunctionTemplates. Find and replace all occurrences of V:\WorldElevation with the new path location, for example, \\<server-ip>\CollectionX_source_documents\data\WorldElevation, where <server-ip> is the network IP or server name of the data appliance, and CollectionX is the collection where the Terrain image service is located.
  2. Open the Catalog window, browse to .\WorldElevation\MD\WorldElevation.gdb and expand the geodatabase. Drag the D_WorldDTM mosaic dataset to the ArcMap window. It should draw as elevation (DTM) for the whole world.

    Elevation (DTM) for the world

  3. As a quick check, drag the R_WorldDTMHillshade mosaic 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 to ArcGIS Server using the publishing script provided.

  1. Open the Catalog window and make the ArcGIS Server connection to localhost with publisher or administrator credentials.
  2. Make sure ArcGIS Server has read permission on the WorldElevation folder and register the V:\WorldElevation folder as Data Store.
    1. Open ArcGIS Server Manager and sign in.
    2. Click Site > GIS Server > Data Stores.

      Data Stores dialog box

    3. Click the Register drop-down arrow and choose Folder.
    4. In the Edit Folder window, fill out the Name and Publisher Folder Path. Then 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>\CollectionX_source_documents\data\WorldElevation, where <server-ip> is the network IP or server name of the data appliance, and CollectionX is the collection where the Terrain image service is located.
      Note:

      If you repaired the paths for the mosaic datasets in step 1 of Prepare the terrain image service above, both the publisher and server folders will point to the UNC location, for example, \\<server-ip>\CollectionX_source_documents\data\WorldElevation, where <server-ip> is the network IP or server name of the data appliance, and CollectionX is the collection where the Terrain image service is located.

      Edit Folder window

    5. Click Save.
  3. In a text editor, browse to .\WorldElevation\Parameter\json and open Terrain.txt.

    Note:

    If you plan to publish to ArcGIS Server 11.0, browse to .\WorldElevation\Parameter\json_11 and open Terrain.txt. In addition, skip steps 4 and 5 and complete the steps to publish the .json file on ArcGIS Server 11.0 using ArcGIS REST admin toward the end of this topic instead.

    1. Find and replace \\\\server-ip\\source_documents\\data with \\\\user-server-ip\\CollectionX_source_documents\\data, where user-server-ip is the network IP or server name of the data appliance, and CollectionX is the collection where the Terrain image service is located.

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

      Note:

      Ensure that the paths contain double backslashes (\\\\).

    2. Save the changes.
      Note:

      Default paths in JSON are UNC (\\\\server-ip\\source_documents\\data), and you need to replace this path with the path to the location of the WorldElevation folder on your server.

  4. In a text editor, browse to .\WorldElevation\batchfiles, and open Publish_Services.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.x\python.exe V:\WorldElevation\scripts\PublishService.py localhost username password V:\WorldElevation\Parameter\json\Terrain.txt

      Note:

      SERVICENAME, SOURCE_MD, and SERVERFOLDER are optional parameters. Location for the source mosaic dataset (SOURCE_MD) and service name (SERVICENAME) is defined using the Terrain.txt "path": and "serviceName": variables, respectively, when not provided in syntax.

    2. Make necessary path changes to PublishService.py and Terrain.txt. If Python is installed at a location other than C:\Python27\ArcGIS10.x\python.exe, edit the path to reflect the change.
      Note:

      The .bat file contains example syntax for mapped network drive and UNC path options.

  5. Run the .bat file from the command window, and the terrain image service will be published under the root folder.
    Note:

    HTTP access must be enabled on your ArcGIS Server installation to publish the terrain imagery service.

  6. Open ArcMap and click Add to add the terrain service.

    By default, the service renders 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 Online Map Viewer.

    The Terrain service opens in Map Viewer Classic 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

Publish the .json file on ArcGIS Server 11.0 using ArcGIS REST admin

If you're using ArcGIS Server 11.0, follow the steps below to publish the .\WorldElevation\Parameter\json_11\Terrain.txt file using ArcGIS REST admin.

  1. Sign in to the ArcGIS Server Administrator Directory using the URL https://<server name>:6443/arcgis/admin.

    ArcGIS Server Administrator Directory

  2. Click services to view the available services under the root folder.
  3. Click CreateService.

    ArcGIS Server Administrator Directory Services

    The Create Service page appears.

  4. Copy and paste the contents of .\WorldElevation\Parameter\json_11\Terrain.txt into the Service (in JSON format) field.

    ArcGIS Server Administrator Directory Create Service page

  5. Click Create to complete the publishing of the Terrain service.

    The Terrain service is ready to use.

Publish the Terrain 3D service

Follow the steps detailed under Publish basemap and reference layer services to publish the Terrain3D service on your ArcGIS Server installation.