Select to view content in your preferred language

Please explain Layer Packages (.lpkx)

13001
5
01-31-2019 07:01 AM
JoeBorgione
MVP Emeritus

I requested some data from an agency and received a layer package in return.  Okay, that's cool; I can use the .lpkx as provided in an ArcGIS Pro map, but I need the data as an actual feature class.  The layer package has 8 layers to it, all representing land use of some sort or another.  I can save off each of the layers to a new geodatabase, and then merge them all together into one feature class, but if there is a better, more efficient means to do so, I'm all ears.

Bottom line: where is the actual data in a layer package?

That should just about do it....
0 Kudos
5 Replies
JoeBorgione
MVP Emeritus

Hmmm....  Look what I just found:  Package Layer—Data Management toolbox | ArcGIS Desktop 

eta:  this appears to be how to create a layer package with a file geodatabase option; I need to go the other way....

That should just about do it....
0 Kudos
Scott_Harris
Esri Regular Contributor

I think Extract Package should work:

Extract Package—Data Management toolbox | ArcGIS Desktop 

JoeBorgione
MVP Emeritus

Thanks Scott; I also tried Consolidate tool, which works much in the same fashion.  I ended up just manually exporting the features to my own file gdb since that allowed me a little more control and wasn't as messy.

That should just about do it....
0 Kudos
JoshuaBixby
MVP Esteemed Contributor

Map and Layer packages have to be unpacked before their contents are actually used by the application.  If you check the data source of a layer from a layer package, it will show you the temporary location where the FGDB resides with the data.

Does your layer package really have 8 feature classes or just 1 feature class with 8 layers referencing it?

Alex_at_Exprodat
Occasional Contributor

I'm a few years too late, but just in case anyone comes across this post looking for an explanation, here's a bit more.

Layer packages are essentially a ZIP file containing the layer's data source and a layer file for displaying the layer. If you have multiple layers or group layers included, it consolidates the data and creates layer files for the layers.

Unpacked layer package (.lpkx) contentsUnpacked layer package (.lpkx) contents

Depending on the compatibility of your source data with ArcGIS Pro 2.x or 3.x, you'll get a few items included. 

The p20 folder contains data and layer files compatible with Pro 2.x and p30 contains copies compatible with Pro 3.x. The commondata folder contains data for both Pro 2.x and 3.x but often you'll find a copy of a file geodatabase in the p20 and p30 folders instead.

When you open a layer package or add it to an existing map, ArcGIS Pro unzips or "unpacks" the included data into a folder. By default, it will go into your user folder Documents\ArcGIS\Packages as shown in the screenshot above. In the Project > Options > Share and Download menu, you can also set a different folder, automatically unpack to the current project's home folder, or ask you each time to select a location.

Unpacking options on the Share and Download section.Unpacking options on the Share and Download section.

Wherever it unpacks the folder, it will add the compatible layer file(s) to your map. They will point to the applicable data source from the unzipped package. In the case of Enterprise (SDE) or UNC (\\local.network\shared\) paths, users have the option when creating the package to create layer files which point to the original source data or instead create a copy of the data inside the package.

You can check the layer properties in the map to see the data source for each layer, or change the options above to choose something more convenient for you to find. I personally like the "Unpack to the project's home folder" option as it saves the data and layer files neatly within the project where I'm using them and I don't have to manually browse to the folder each time. The example I've used in the screenshot is saved at the default "Packages" folder location.

example_data_source.jpg

Hope this helps!