Preparing Layer Files for Publication
While optional, publishing layer files (for ArcMap, ArcGIS Pro, or QGIS) with your data is beneficial. They enable the user to easily add the data to a project, and provide optimal symbology, dataset groupings, titles, or usage tips. For state agency users with access to a GDRS, layer files allow the data to be included in the DNR's "Quick Layers" tool for ArcGIS Desktop and ArcGIS Pro. For these reasons, we strongly encourage publishers to include layer files within their resource. This document provides tips and guidelines for creating those files.
Guidelines for Creating Layer Files
- Since Quick Layers will display the layer file name exactly as written, use plain English in the file name, with mixed case and spaces between the words. For example: "Minnesota County Boundaries.lyr".
- Layer files will only work with the data formats you provide; they will not be created for additional formats that the Commons automatically generates. For example, if you provide your dataset in file geodatabase format with a layer file, the Commons will automatically generate and publish a shapefile version of the data, but the shapefile version will not include a layer file.
- Layer files should be placed at the top of the directory of the native publishing format; for example, at the top of the "fgdb" directory, alongside the .gdb folder of the dataset.
- Both ArcMap layer files (.lyr), and ArcGIS Pro layer files (.lyrx) can be included in the resource.
- .lyr files can be read by both ArcMap and ArcGIS Pro.
- .lyrx files can only be read by ArcGIS Pro.
- .lyrx files created in version 3.x will not work in ArcGIS Pro 2.x.
- Layer files must have relative paths to work when publishing to the Commons.
- Once the layer file has been saved, the relative positions of the layer file and source data must remain the same, and the source data (and file geodatabase if applicable) cannot change names.
- To ensure that layer files are prepared correctly, follow the workflow provided in methods for relative paths in layer files.