1

Does anyone know how to convert a .lyr to .shp format in ArcMap 10.2?

I had a look at different forums on the internet and most people suggest that it works by right clicking on the layer in the TOC and export the data as shp, but apparently this is not true because the file extension is *. lyr .

The layer I want to export is a web map.

Does anyone have any suggestions?

2
  • 7
    You can't. A lyr contains only style information, and a reference to a data file, such as a shapefile. Right-clicking and exporting will export that referenced data, not the lyr file.
    – Berend
    Commented Jan 9, 2015 at 10:09
  • 4
    To expand with an analogy on @Berend's comment, look at the .lyr file as the specific font that you want, and the shapefile as the text. Given only the font, you can't recreate the text from it. However, you can view the text in an other font if you like.
    – Martin
    Commented Jan 9, 2015 at 10:52

3 Answers 3

13

A shapefile (.shp) is a vector data storage format for storing the location, shape, and attributes of geographic features. A shapefile is stored in a set of related files and contains one feature class.

A layer file (.lyr) is a file that stores the path to a source dataset and other layer properties, including symbology.

In comparison to a shapefile, a layer file is a just a link\reference to actual data, such as a shapefile, feature class, etc. It is not actual data because it does not store the data's attributes or geometry. A layer file primarily stores the symbology for a feature and other layer properties related to what is seen when the data is viewed in a GIS application.

For example, if a layer file is sent to a user on another machine without the data it was created from, it does not display on the map because it does not contain the source data. To get the data to display properly, the user must have the layer file and the shapefile it references.

This is where utilizing layer packages eases the processing of migrating data, because layer packages store both the layer file and source data. For more information about layer packages, see the Web help topic. (http://support.esri.com/es/knowledgebase/techarticles/detail/40057)

Basically your layer is already a shapefile.

2
  • 6
    It should be mentioned that a .lyr could also be representing a personal/file geodatabase feature class, or a web map service, etc. In the case of the latter, there will be no Data > Export Data... option.
    – mr.adam
    Commented Jan 9, 2015 at 15:16
  • Thank you for your reply mr.adam, I had this kind of issue, since the layer I was going to export was a web map. Commented Jan 12, 2015 at 11:56
1

This Esri support document details how to do this, edited slightly below for clarification:

  1. Start ArcMap and add data to the Data Frame, if needed.
  2. Right-click the layer and select Data > Export Data.
  3. Select what you want to export (“All Features” or “All features in View Extent”).
  4. Select “this layer’s source data”.
  5. Click the Browse button.
  6. Navigate to the location where you want to store the shapefile.
  7. Type a name for the new shapefile and select shapefile from the “Save as type” drop down menu. “File and personal geodatabase feature classes” may be selected by default.
  8. Click the Save button.
  9. Click OK.
2
  • 1
    Just recently this got a downvote.. It would be helpful if the person who did that commented to say way. This is from the ESRI documents on how to do exacally what the OP asked. What is wrong with it?
    – Morvael
    Commented Aug 10, 2018 at 9:44
  • I did not down vote but, this answer is not correct. Your interpretation from ESRI assumes that you have both the layer and shape file. The layer file only provides symbology for the shape file but, no actual spatial data so, there is nothing to export. If in the ArcMap TOC, sitting on top of data, then you can export a lyr file. Unfortunately, you cannot even export style elements like color. Commented Feb 25, 2022 at 2:54
0

just founded this trick, the web map recommend me to use arcmap, but i cant make it into .shp there, then i tried QGIS (i'm using 3.10), you can export .lyr from web map to .shp in QGIS!

Not the answer you're looking for? Browse other questions tagged or ask your own question.