14

My organization uses *.lyr files consistently as a means for our users to view the data and build their mxds.

It works great for our purposes, but we have run into an issue where we don't think the users actually understand what a .lyr file does or why its used, and we spend a lot of time dancing around an issue because of miscommunication in definition/terms.

How do you explain what a .lyr file is? Assume the user has light/moderate GIS knowledge?

4
  • Something that isn't very clear from the answers below is that a .lyr file can store symbology for Group Layers as well. Not just from single feature classes.
    – Fezter
    Mar 11, 2013 at 23:26
  • That is true, but a group layer is just another type of layer that happens to be able to contain multiple sub-layers.
    – blah238
    Mar 12, 2013 at 8:51
  • well... it brings more questions than answers to me... we do provide .tif files (rasters) for forest information. Problem is; users will have to apply a symbology to any of these unless they want a grey scale color for all those tif files. Now, if we export a lyr file after applying a specific symbology, can we provide them with only the lyr file ? will they have the same thing as they do with tif files plus the symbology ? Oct 25, 2017 at 17:53
  • If you have a new question, please ask it by clicking the Ask Question button. Include a link to this question if it helps provide context. - From Review
    – Dan C
    Oct 25, 2017 at 18:18

4 Answers 4

21

Geographic data tell you how to paint by numbers:

Figure 1

A layer file tells what colors (etc.) go with the numbers:

Figure 2

When both are available, the GIS puts them together into a map:

FoxTrot panel

5
  • 1
    The panel is from Bill Amend's Foxtrot (but I could not find it by searching that site).
    – whuber
    Mar 11, 2013 at 21:11
  • 4
    I think it is important to include the details others wrote about, which is that a layer file contains more than just colors. It also includes details like pointers to the original data source, definition queries, labeling characteristics, visible scale thresholds, transparency, visible fields, value classification breaks, joins to other data, and more. Mar 12, 2013 at 18:43
  • But it has pretty pictures :)
    – blah238
    Mar 12, 2013 at 18:56
  • 6
    @Ryan That's what the "etc" covers. :-) I am making a point: since the OP has had difficulty communicating the idea, it is important to start somewhere that is at once (a) simple, (b) connects with the experiences of non-GIS professionals, and (c) correct insofar as it goes. Once the basic idea is grasped, it's a relatively simple task to add details. But if you begin the explanation with words and phrases like "definition query," "persistent representation," "pointer," and so on, then you have already lost your audience and it doesn't matter any longer how complete or accurate you may be.
    – whuber
    Mar 12, 2013 at 20:24
  • 2
    @whuber, I totally agree with everything you said, and think your answer is great for the "technically challenged". I didn't want the other fundamental ideas of layer files to be lost by someone else who reads this down the road. Mar 12, 2013 at 20:53
8

To understand what a layer file is, you need to understand what a layer is (this discussion is very relevant for that: What's the difference between feature class and feature layer?).

A layer (.lyr) file is simply a persistent (file-based) representation of a layer.

Neither contain any actual geographic data, only a reference to the data along with some properties about how to render it (properties for symbology, labeling, etc.).

One thing to be aware of is that if your layer references a database connection that that connection information is stored in the layer file. This can be a very bad thing from a security standpoint. Passing user login credentials around in layer files should be avoided. To avoid storing user names and passwords in layer files, the "Save username and password" box should be unchecked before using an SDE database connection file. See "Connecting to a database" for more information.

8

A layer (.lyr) file has mainly two important functions:

  1. It contains a link or a pointer to the location of the Data.

  2. It contains information on how to render or draw the Data.

One of my colleague always explained it as follws: A .lyr file is like a Business/Visiting Card. It tells you (or rather ArcGIS) where to find the Data. And how to Address and interact (in this case Render) with it.

2

In the most basic of explanations, I'd say a Layer file is a way to render (draw) features, rasters and a few other data types. A layer file usually provides a pointer to data but has information about how that data should be symbolized. Of course you can "apply symbology from layer", in that case you're using the drawing information from the layer file to update the symbology of a new layer.

While this topic doesn't explain explicitly what a layer file is, it provides good reading: http://resources.arcgis.com/en/help/main/10.1/index.html#/Creating_a_layer_symbology_file/002w00000048000000/

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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