laptop and a wrench

漏洞

In ArcGIS Pro, when opening a layer file (.lyrx) from a network drive and uploading it as an item to Portal for ArcGIS, an error message is returned, "Need to Repair data source of layer."

上次发布: July 13, 2021 Portal for ArcGIS
漏洞 ID 编号 BUG-000140521
已提交June 7, 2021
上次修改时间June 5, 2024
适用范围Portal for ArcGIS
找到的版本10.6.1
操作系统Windows OS
操作系统版本10.0
状态As Designed

附加信息

The behavior described is correct based on how ArcGIS Pro is designed. If the workflow described and care has not been taken to access data in the original map via UNC paths, it is expected that the map layers break when the layer file (.lyrx) is added to map after sharing it to a portal. In an ArcGIS Pro project, paths to datasets are handled as either relative paths or as absolute paths depending on where the project and the data are stored. Data stored on the same disk as the project are referenced by relative paths. Data stored on other disks or in a network location are referenced using absolute paths. This same method of accessing data applies when a map or a layer is saved to an external map file (.mapx) or layer file (.lyrx) in this scenario. For example, if the project is stored at C:\Data\MyProject and the data is stored elsewhere on the C:\ drive, the project accesses the data on C:\ by relative path and any data stored on a T:\ drive is accessed by absolute path. When the definition of a map layer to a layer file (.lyrx) is saved, if the layer file (.lyrx) is stored to the same C:\Data\MyProject location as the project, it uses the same relative path as the project. However, if the layer file (.lyrx) is stored in C:\Test instead, the relative path is recalculated and the layer file (.lyrx) uses a different relative path to access the data than the project. Similarly, if the layer file (.lyrx) is saved to the T:\ drive, then any data stored on the C:\ drive is accessed by absolute path and data stored on the T:\ drive is then accessed by a path relative to the storage location of the output layer file (.lyrx). After creating a layer file (.lyrx), the layer file (.lyrx) is uploaded as-is to the portal. When 'Open in ArcGIS Pro' is clicked from the item details page in a browser, the layer file (.lyrx) ends up being downloaded to the local machine in the {userName}\Documents\ArcGIS\Packages folder by default, or some other location designated on the local machine. This process merely downloads the file. These paths in the layer file (.lyrx) remain exactly as they were at the time in which the original layer file (.lyrx) is created. However, the location in which the layer file (.lyrx) is stored is not the same as its original location even if both locations are on the same computer. Any relative paths that are originally calculated for the original location are broken because they are not calculated for the layer file's (.lyrx) current location. To share the map layer with other people without having to repair the broken map later, there are two options: 1) Create a layer package and upload the layer package to the portal instead of sharing a layer file (.lyrx). 2) Take care when building the original map in ArcGIS Pro to access all data using a UNC path that can be accessed from any computer used by anyone who has access to the portal item. Data from mapped network drive is accessible if everyone in the organization uses the same drive letter to access the same data on the network. Save the output layer file (.lyrx) to the local machine and upload the local file to the portal. This ensures all network data is accessed via absolute paths. There are other existing enhancements in the backlog requesting more information about how data is accessed in projects, and to provide other capabilities to better assess the data referenced by a project so people can make better decisions about how to build, move, and share their projects. See ENH-000137919 and ENH-000084097.

解决办法

Repair the layer manually by pointing it to the correct data location.

重现步骤

漏洞 ID: BUG-000140521

软件:

  • Portal for ArcGIS

当漏洞状态发生变化时获得通知

下载 Esri 支持应用程序

发现关于本主题的更多内容

获取来自 ArcGIS 专家的帮助

联系技术支持部门

下载 Esri 支持应用程序

转至下载选项