Skip To Content

Configure boundary layers

Esri provides layers containing boundary and demographic information for different parts of the world. These layers—such as state, province, census area, and ZIP Code boundaries—contain related, local information that portal members can use in their maps, scenes, apps, feature analysis tools, and ArcGIS Insights.

Consider publishing these layers to your portal if you have ArcGIS Insights installed or if your portal does not have access to ArcGIS Living Atlas of the World content from ArcGIS Online.

As the portal administrator, you can download the boundary layer service definition (.sd) files you want from My Esri and use the publishboundarylayers tool to publish hosted feature layers from the files.

Note:

When you run any of the tools described in this topic, you must use a built-in portal administrator account. The URL you use for these tools depends on where you deploy ArcGIS Enterprise.

  • When you run the tools on an on-premises ArcGIS Enterprise deployment, you must access the portal through port 7443 rather than through a web adaptor or load balancer.
  • When you run these tools on an ArcGIS Enterprise deployment in the cloud, you must access the portal through a web adaptor or load balancer; do not use port 7443.

You can publish from a folder containing all the files you want, publish individual files, or provide a list of files in text file format. Be sure the account used to run the Portal for ArcGIS service has read access to this folder.

Publishing these boundary service definition (.sd) files to your portal results in the following:

  • Each .sd is added as a service definition item in the portal. These files must remain in the portal if you want to update the boundary layers when updated content is available.
  • A hosted feature layer is created for each .sd file you publish. Each hosted feature layer contains multiple layers.
  • Both the service definition items and hosted feature layers are owned by an internal portal member named esri_boundaries. Do not change ownership of these items to another user.
  • By default, all members of your portal organization have access to the boundary hosted feature layers in the portal. Portal members can access the boundary layers using the following:
    • Search the portal for boundary layer items from the My Organization tab of the Content page.
    • Add individual boundary layers to feature analysis tools in Map Viewer Classic from the Choose Analysis Layer dialog box.
    • Add boundary layers to Scene Viewer from the Content panel.

Publish boundary layers

These layers are licensed under the Esri Master License Agreement. Read the summary and terms of use before you publish.

Important use requirements

  • These layers are licensed for internal use in ArcGIS Enterprise, including Portal for ArcGIS, ArcGIS Insights, and other connected ArcGIS apps.
    • Users are not permitted to use outside the ArcGIS Enterprise family of products or to export data for disconnected use in ArcGIS or other applications.
    • Users are not permitted to share the layer (publicly or privately) for external use by members of other organizations or the public, without separate written permission from Esri.
  • These layers are licensed for use for two (2) years after download from Esri. You may download the latest data each year to extend the license.
  • Any display of these layers must include the Credits (Attribution) published with each layer.

Follow these steps to obtain boundary files and host them as feature layers on your portal:

  1. Download compressed files containing service definitions (.sd) from My Esri.
  2. Extract the downloaded files and place them in a folder on the Portal for ArcGIS machine.

    File names use a three letter code to indicate the regions to which they apply and have the year the data applies to appended to the end of the name. For example, USA_Boundaries_2015 contains boundaries for the United States of America as they appeared in the year 2015.

    Remove any files you do not want to upload and publish to your portal. Alternatively create a text file containing a list of the file subset you want to upload and publish. Format the text file so there is one file name per line; for example, to upload boundaries for the United States of America or for the world, the text file would contain the following:

    USA_Boundaries_2015
    WOR_Boundaries_2015

  3. Open a command prompt on the Portal for ArcGIS machine.
  4. Change directories to the location of the tool.
  5. Run the publishboundarylayers tool.

    The tool is installed in <Portal installation directory>\tools\publishboundarylayers. Syntax for the tool is as follows: publishboundarylayers --folder <location of sd files> [{--files <file names>|--file <name of text file>}] --url <Portal website URL> --username <portal administrator user name> [--password <portal administrator password>]

    If you do not specify a password when you run the tool, you will be prompted to provide the password for the portal administrator. This user must be a member of the default administrator role in the portal.

    If you use the --files operation, specify a comma separated list of service definition files. If you use the --file option, specify the location and name of a text file containing the list of boundary files you want to publish.

    In this example, all files in the directory boundaryfiles are published to an on-premises portal:

    publishboundarylayers --folder d:\data\boundaryfiles --url https://portal.domain.com:7443/arcgis --username portaladmin

    In this example, files are in the same directory (boundaryfiles), but two files are published:

    publishboundarylayers --folder d:\data\boundaryfiles --files USA_Boundaries_2015,WOR_Boundaries_2015 --url https://portal.domain.com:7443/arcgis --username portaladmin

    In this example, a text file (boundarysubset.txt) was created in the boundaryfiles directory. The tool reads the file list from the text file to publish a subset of the boundary layers.

    publishboundarylayers --folder d:\data\boundaryfiles --file c:\temp\boundarysubset.txt --url https://portal.domain.com:7443/arcgis --username portaladmin

Once publishing completes, a service definition item and hosted feature layer exist for each .sd file you published.

To confirm the items exist, you can search the portal for all items owned by an internal portal member named esri_boundaries. Type owner:esri_boundaries in the portal search field and Search All Content.

Update boundary layers

In most cases, updates to a boundary layer are provided as a new service definition file that you publish to your portal using the publishboundarylayers utility. This allows you to use the layers independently and analyze the two versions of the data. For example, there could be a 2015 and a 2017 version of the world boundaries file. On rare occasions, though, the service definition files provided on My Esri are updated to correct content. In those cases, you can download the update file and publish them using the updateboundarylayers tool. Doing so overwrites the existing hosted feature layer in your portal.

As noted in the introduction, you can only update boundary layers if the layer's service definition item still exists in the portal.

Follow these steps to update boundary feature layers on your portal:

  1. Download compressed files containing updated service definition files (.sd) from My Esri.
  2. Extract the files and place them in a folder on the Portal for ArcGIS machine.

    Remove any files you do not want to upload and publish to your portal. Alternatively create a text file containing a list of the file subset you want to upload and publish. Format the text file so there is one file name per line; for example, to upload boundaries for the United States of America and the world, the text file would contain the following:

    USA_Boundaries_2015
    WOR_Boundaries_2015

  3. Open a command prompt on the Portal for ArcGIS machine.
  4. Change directories to the location of the tool.
  5. Run the updateboundarylayers tool.

    The tool is installed in <Portal installation directory>\tools\publishboundarylayers. Syntax for the tool is as follows: updateboundarylayers --folder <location of files> [{--files <file names>|--file <name of text file>}] --url <Portal home page URL> --username <portal administrator user name> [--password <portal administrator password>]

    If you do not specify a password when you run the tool, you will be prompted to provide the password for the portal administrator. This user must be a member of the default administrator role in the portal.

    If you use the --files operation, specify a comma separated list of service definition files. If you use the --file option, specify the name of a text file containing the list of boundary files you want to publish.

    In this example, the updateboundarylayers tool publishes all files in the directory boundaryfiles, overwriting the existing layers:

    updateboundarylayers --folder d:\data\boundaryfiles --url https://portal.domain.com:7443/arcgis --username portaladmin

    In this example, files are in the same directory (boundaryfiles), but only one file is republished:

    updateboundarylayers --folder d:\data\boundaryfiles --files WOR_Boundaries --url https://portal.domain.com:7443/arcgis --username portaladmin

    In this example, a text file (boundaryupdatesubset.txt) was created in the boundaryfiles directory. The tool reads the file list from the text file to republish a subset of the boundary layers.

    updateboundarylayers --folder d:\data\boundaryfiles --file c:\temp\boundaryupdatesubset.txt --url https://portal.domain.com:7443/arcgis --username portaladmin

Once publishing completes, the existing hosted feature layers contain updated data or metadata.

Delete boundary layers

If you decide a boundary layer is not needed in your portal, you can delete it. You can either search for the layer in the portal website and delete it there, or run the deleteboundarylayers tool. If you want to delete multiple boundary layers, use the deleteboundarylayers tool.

The deleteboundarylayers tool does not delete layers that have delete protection enabled.

Caution:

If you delete a boundary layer that is currently used in a map, app, or scene, the layer will no longer appear in the map, app, or scene. Republishing will not replace the layer in the map, app, or scene because republishing creates a new item with a new ID in the portal.

You can provide a comma-separated list of layers to delete using the --files operation, or provide a text file containing a list of layers to delete using the --file operation.

Syntax for providing a comma-separated list of layers is as follows: deleteboundarylayers {--files <layer_name_list> | --file <location_of_text_file>} --url <portalURL> --username <portal_admin> [--password password]

For example, to delete the USA_Boundaries_2015 and WOR_Boundaries_2015 layers from portal https://portal.domain.com:7443/arcgis as a portal administrator named portaladmin, type the following:

deleteboundarylayers --files USA_Boundaries_2015,WOR_Boundaries_2015 --url https://portal.domain.com:7443/arcgis --username portaladmin

Syntax to provide a text file containing a list of layers to delete is as follows: deleteboundarylayers --file <location_of_text_file> --url <portalURL> --username <portal_admin> [--password password]

For example, to delete the same layers using a file, create a text file containing one layer name per line (as shown here) and provide the location and name of the text file when you run the tool:

USA_Boundaries_2015
WOR_Boundaries_2015

In the following example, the boundarylist.txt file is in c:\data\boundaries. It contains a list of layers to be deleted from the portal, https://portal.domain.com:7443/arcgis.

deleteboundarylayers --file c:\data\boundaries\boundarylist.txt --url https://portal.domain.com:7443/arcgis --username portaladmin