ArcGIS lyr files and QGIS qlr files

Apr 12, 2015 | arcgis, Cartography, GIS, QGIS

I spend a ton of time talking about QGIS up here. I like QGIS. I like GIS in general and there are some days I wonder if I’m unintentionally ignoring the ESRI side of life. Actually I don’t for clients – 20+ years of Using ESRI software leaves me in a good spot to answer all sorts of questions.

So I went to visit a potential client this last week. It’s funny how a 20 minute visit can turn into a 3 hour discussion of GIS. Short story – we covered two pieces of software: ArcGIS, and QGIS. Shorter story – they are moving from ArcGIS to QGIS.  It nice getting the view of someone casually using GIS (both packages) software who doesn’t do this day in and day out.

The conversation covered a lot of ground. One of things we talked about was lyr files. As a former instructor in the dark arts of ArcGIS, lyr files were one of those things everyone seemed to know something about and no one was entirely sure what to do with them. You see a lot of “Can I use LYR files in QGIS?” Well – no but here is a story on lyr and qlr files.

The short story on lyr files:

1. Symbolize your data layer in ArcGIS.

arcgis_lyr

2. You can even set up a definition query to single out a particular feature in your layer. In this case I’ve singled out a tract of land a client works.

3. Right click your layer in the table of contents and save a lyr file.

Lyr files are super handy. You can symbolize data. You can label. You can set definition queries and save it all to a lyr file. ArcGIS treats an lyr like data (BUT IT’S NOT). You can add them by hitting the add data button so a lot of times people can and will get confused and think an lyr is data. So you will get emails from people going “Here I sent you some data” and it’s a bunch of lyr files. I generally make it a point to tell people to name them and make a different folder and keep them all there. Treat them as part of your project. Treat them as important. Don’t think they are data though.

BUT – What about QGIS?

1. Symbolize your data in QGIS

qgis_lyr

 

2. You can even set up a feature subset (definition query) to single out a particular feature in your layer. In this case I’ve singled out a tract of land a client works.

3. Right click your layer Layer Panel and save a layer definition file (a qlr).

Notice I tried to give this an identical three step description. You can’t add qlr files with an “add data” button in QGIS. You can drag and drop it onto your map canvas or use Layer -> Add from Layer Definition File to use it. No data is saved. This is just a pointer back to your data with symbology and other info saved.

Quickly…….

  • So can you use a lyr with QGIS? Nope.
  • Can you use a qlr with ArcGIS? Nope.
  • Can you define symbology in ArcGIS from a lyr file? Yes! Just import your symbology and choose your lyr and if the attribution matches you are good.
  • Can you define symbology in QGIS from a qlr file? No – but that is what qml and sld files are for. Save those from your property menu and you can use those to symbolize other data.
  • Can you open a lyr in a text editor and see how it works? NO…I think the greatest shortcoming of lyr is this.
  • Can you open a qlr in a text editor and see how it works? YES…it’s an XML based file.

So as always make your life easier. Save lyr and qlr files with your data because you don’t want to spent tons of time symbolizing it over and over. Remember – neither qlr or lyr hold any data – just symbology and data queries. So don’t email your friends or consultants lyr or glr files.

Explore more here and here!

**Update

 

You may also like

Paper Maps or Something close

In case you haven't seen the news - we had a lot of rain Last Friday. A hurricane hit Florida and then proceeded to drench a large portion of the world I Inhabit I was fine. Chattanooga was fine. North East Tennessee and Western North Carolina aren't. The more I read...

QGIS US User Group

QGIS US User Group

I've been too busy to write anything as of late. I have a lot to talk about - just not much time to do it. So FOSS4GNA happened on Sept 9-11 2024. Probably the biggest thing for me during the conference was we had two BOFs on QGIS. Granted - I think it was supposed to...

Watershed Geo Part 2

Watershed Geo Part 2

Part 1 This is part 2 which will be pretty simple. This is more of the "get organized" part. In part 1 I was able to generate a watershed boundary from LIDAR Elevation Data. After it was generated I went back and checked the watershed line and really only found one...