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?

  • 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 Jan 9 '15 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 Jan 9 '15 at 10:52
12

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.

  • 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 Jan 9 '15 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. – Curious Girl Jan 12 '15 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.
  • 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 Aug 10 '18 at 9:44

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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