1

I have downloaded the geology data from the USGS website (http://pubs.usgs.gov/ds/781/OffshoreSantaBarbara/data_catalog_OffshoreSantaBarbara.html) and the .zip file comes with a .lyr file.

I have tried everything in my power to open this file on Google Earth - tried to convert it to .shp and .kml file using ArcToolbox - and nothing worked.

How can I use the style information contained in the .lyr file to visualize it on GE?

Edit: The problem I get when trying to convert to .kml is that I cannot find the saved file anywhere. It says that it was created, but I simply cannot find it.

When I first open the layer file it shows the red exclamation mark, but then I just add the .shp file and the image appears with the correct colors and symbols.

Then I try to convert using the ArcToolbox:

enter image description here

And I cannot find the file anywhere afterwards, although it says everything worked.

  • 2
    As long as you can see the data with that Layer file when you add it to ArcMap I think you should be able to export it to KML. What precisely did you try and where are you stuck? I think including a picture might help. – PolyGeo Aug 16 '16 at 20:21
  • 1
    I think @PolyGeo's comment covers the correct answer to great extent. As long as you can open/see lyr correctly in ArcMap or Catalog, the next step is conversion to KML. – fatih_dur Aug 17 '16 at 10:19
  • My problem is that when I try to convert to .kml, I cannot find the file anywhere. – Rachel Aug 26 '16 at 21:03
  • I figured out what I was doing wrong. I was only opening the .lyr file, and when I got the red exclamation mark I was uploading the .shp file apparently "inside" the .lyr file (or something like it, idk). I had to also upload the .shp file in the program and convert this one, and not the .lyr. Well, super silly, but I got it! Thanks for all the help. – Rachel Oct 15 '16 at 2:01
1

Which file did you download? I downloaded the Geology_OffshoreSantaBarbara .zip file and it came with a shapefile and a layer file. The layer file only holds the symbology while the shapefile holds the actual data. You can add the symbology to the shapefile by using the import button in the Symbology tab of the Layer Properties. enter image description here

From there you can create your KML.

| improve this answer | |
  • My problem is that when I try to convert to .kml, I cannot find the file anywhere. – Rachel Aug 26 '16 at 21:06
  • You input the file path as part of the Layer to KML tool. Just save it somewhere you know where to look. – Stephen Ruhl Aug 29 '16 at 13:24
0

Lyr file is a binary ESRI format containing the style, not the data. This format can be opened via ArcMap, ArcCatalog, etc. If you need the data, see the table in your link. In column named "File format" you can find needed raster or vector data. All of this data can be opened in most of GIS programs. Also I can see the link to OGC WMS service which is useful too.

| improve this answer | |
  • I'm interested in importing all the symbology information stored on .lyr so I can visualize it on Google Earth. When I open the .sph, it only gives me polygons with the same colors. – Rachel Aug 26 '16 at 21:02
0

As long as you can see the data with that Layer file when you add it to ArcMap I think you should be able to export it to KML using Layer to KML:

This tool converts a feature or raster layer into a KML file containing a translation of Esri geometries and symbology. This file is compressed using ZIP compression, has a .kmz extension, and can be read by any KML client including ArcGIS Explorer, ArcGlobe, and Google Earth.

If the layer in your map, from adding the layer file to it, has a red exclamation mark next to it then that says that the layer can no longer find its data so use its Properties to relocate that data.

| improve this answer | |
  • When I open the .lyr file I get the red exclamation mark, but then I just add the .shp file and I can see everything perfectly. When I try to convert it to .kml, though, I simply cannot find it anywhere. – Rachel Aug 26 '16 at 21:05
0

@Stephen Ruhl is correct about finding the KMZ/KML file. You simply need to take note of the folder you have specified in the Layer to KML tool.

Keep in mind the the word "Layer" in this context is generic. A "Layer" can essentially be any dataset you are using in a GIS. As @Dmitry Baryshnikov mentions, ArcGIS Desktop also has a proprietary file type called a "Layer File" (.lyr). A layer file essentially stores a reference link to the source dataset and is typically used to retain symbology settings.

When you load a .lyr in ArcMap and there is a red exclamation mark, that means the source dataset can no longer be found at the same location on your disk as when the .lyr was originally created. This frequently happens when users rename the source dataset, delete it, move it, or rename a directory.

When you click to turn on the layer in the table of contents in ArcMap, an interface will pop-up asking you to re-path to the source data. When you do this and the red exclamation mark goes away, you are not "opening the dataset inside the .lyr," you are simply re-pointing to the source data.

If you want this change to be retained with your .lyr, simply right click on the layer in the table of contents, save as layer file, and over-write the .lyr that is saved on disk.

Lastly, you do not need a .lyr to use the Layer to KML tool, but I have encountered times when the tool worked better from a .lyr than from simply selecting the "layer" (that is in the table of contents) from the drop-down in the tool.

| improve this answer | |

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.