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 organization members can use in their maps, scenes, apps, and feature analysis tools.
Consider publishing these layers if your organization does not have access to ArcGIS Living Atlas of the World content from ArcGIS Online.
As an 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 install Portal for ArcGIS has read access to this directory.
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 organization results in the following:
Each
.sdis added as a service definition item. These files must remain in the organization if you want to update the boundary layers when updated content is available.A hosted feature layer is created for each
.sdfile you publish. Each hosted feature layer contains multiple layers.Both the service definition items and hosted feature layers are owned by an internal organization member named esri_boundaries. Do not change ownership of these items to another user.
By default, all organization members have access to the boundary hosted feature layers. Members can access the boundary layers using the following:
Search the organization for boundary layer items from the My Organization tab of the Content page.
Add individual boundary layers to feature analysis tools in Map Viewer.
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.
The following are important use requirements:
These layers are licensed for internal use in ArcGIS Enterprise and 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:
Download compressed files containing service definitions (
.sd) from My Esri.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 organization. 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_2015Open a command terminal on the Portal for ArcGIS machine.
Open a command prompt on the Portal for ArcGIS machine.
Change directories to the location of the tool.
Run the
publishboundarylayerstool.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>]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 an administrator account. This user must be a member of the default administrator role in the organization.
If you use the
--filesoperation, specify a comma separated list of service definition files. If you use the--fileoption, 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
boundaryfilesare published to an on-premises organization:./publishboundarylayers --folder /usr/data/boundaryfiles --url https://portal.example.com:7443/arcgis --username portaladminpublishboundarylayers --folder d:\data\boundaryfiles --url https://portal.example.com:7443/arcgis --username portaladminIn this example, files are in the same directory (
boundaryfiles), but two files are published:./publishboundarylayers --folder /usr/data/boundaryfiles --files USA_Boundaries,WOR_Boundaries --url https://portal.example.com:7443/arcgis --username portaladminpublishboundarylayers --folder d:\data\boundaryfiles --files USA_Boundaries_2015,WOR_Boundaries_2015 --url https://portal.example.com:7443/arcgis --username portaladminIn this example, a text file (
boundarysubset.vi) was created in theboundaryfilesdirectory. The tool reads the file list from the text file to publish a subset of the boundary layers.In this example, a text file (
boundarysubset.txt) was created in theboundaryfilesdirectory. The tool reads the file list from the text file to publish a subset of the boundary layers../publishboundarylayers --folder /usr/data/boundaryfiles --file /usr/tmp/boundarysubset.vi --url https://portal.example.com:7443/arcgis --username portaladminpublishboundarylayers --folder d:\data\boundaryfiles --file c:\temp\boundarysubset.txt --url https://portal.example.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 organization for all items owned by an internal member named esri_boundaries. Type owner:esri_boundaries in the 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 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.
As noted in the introduction, you can only update boundary layers if the layer's service definition item still exists.
Follow these steps to update boundary feature layers:
Download compressed files containing updated service definition files (
.sd) from My Esri.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. 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_2015Open a command terminal on the Portal for ArcGIS machine.
Open a command prompt on the Portal for ArcGIS machine.
Change directories to the location of the tool.
Run the
updateboundarylayerstool.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>]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 an administrator account. This user must be a member of the default administrator role.
If you use the
--filesoperation, specify a comma separated list of service definition files. If you use the--fileoption, 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 /usr/data/boundaryfiles --url https://portal.example.com:7443/arcgis --username portaladminupdateboundarylayers --folder d:\data\boundaryfiles --url https://portal.example.com:7443/arcgis --username portaladminIn this example, files are in the same directory (
boundaryfiles), but only one file is republished:./updateboundarylayers --folder /usr/data/boundaryfiles --files WOR_Boundaries --url https://portal.example.com:7443/arcgis --username portaladminupdateboundarylayers --folder d:\data\boundaryfiles --files WOR_Boundaries --url https://portal.example.com:7443/arcgis --username portaladminIn this example, a text file (
boundaryupdatesubset.vi) was created in theboundaryfilesdirectory. The tool reads the file list from the text file to republish a subset of the boundary layers.In this example, a text file (
boundaryupdatesubset.txt) was created in theboundaryfilesdirectory. The tool reads the file list from the text file to republish a subset of the boundary layers../updateboundarylayers --folder /usr/data/boundaryfiles --file /usr/tmp/boundaryupdatesubset.vi --url https://portal.example.com:7443/arcgis --username portaladminupdateboundarylayers --folder d:\data\boundaryfiles --file c:\temp\boundaryupdatesubset.txt --url https://portal.example.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, you can delete it. You can either search for the layer in the organization 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.
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 https://portal.example.com:7443/arcgis as an organization administrator named portaladmin, type the following:
./deleteboundarylayers --files USA_Boundaries_2015,WOR_Boundaries_2015 --url https://portal.example.com:7443/arcgis --username portaladmin
deleteboundarylayers --files USA_Boundaries_2015,WOR_Boundaries_2015 --url https://portal.example.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 file is in /usr/data/boundaries. It contains a list of layers to be deleted from the organization with the url https://portal.example.com/portal.
In the following example, the boundarylist.txt file is in c:\data\boundaries. It contains a list of layers to be deleted from the organization with the url https://portal.example.com/portal.
./deleteboundarylayers --file /usr/data/boundaries/boundarylist --url https://portal.example.com/portal --username portaladmin
deleteboundarylayers --file c:\data\boundaries\boundarylist.txt --url https://portal.example.com/portal --username portaladmin