Friday, November 22, 2013

X Ray for ArcCatalog - How Does That "Use Spatial Reference" Option Work?

X Ray for ArcCatalog

In my quest to implement the Local Government Information Model, I have struggled with the X Ray for AcrCatalog add-in.  The add-in takes an xml document defining the schema of a geodatabase and applies it to an empty file geodatabase.  It does a bunch of other stuff, but that is the only thing I wanted to use it for.

I got hung up on the needed step of changing the spatial reference before applying the xml schema to my geodatabase.  If I would have followed the steps here I would have not struggled at all.  I also found this video by Heather Eisan from Esri very helpful:

   

For some reason, I got as far as downloading and installing the add-in, but then got stuck because I was using the help document for X Ray under the X Ray Help menu to set the spatial reference:


I followed those steps again and again with no change.  The steps I should have followed are:
  1. Select the Local Government xml file in the contents window of ArcCatalog.
  2. Open the xml document in X Ray by clicking on the folder with an x on it- , or use the Open XML Workspace  choice in the X Ray menu on the X Ray window.
  3. Select a feature dataset or feature class with the desired spatial reference in the contents window in ArcCatalog.
  4. Select the Use Spatial Reference choice in the Options menu on the X Ray window.
  5. Click the save button or the Save choice from the X Ray menu on the X Ray window.
  6. Select the empty file geodatabase you want to apply the schema to in the contents window of ArcCatalog.
  7. Click the Import XML Workspace to selected GDB button, or the Import to Geodatabse choice in the X-Ray menu.
I was missing those two very important steps in bold print above.

You can actually skip X Ray altogether by editing the xml document in Notepad++ or some other xml editor.  You can search for the <WKT> tags and replace the text between them with text from another xml document you create by right clicking on a feature dataset or feature class and choosing Export - XML Workspace Document, making sure you select the schema only option.

After successfully importing the schema into your LGIM geodatabase, you can then use another set of custom tools written in python called Gizinta, (written by the same developer that wrote X-Ray) that also uses xml files to port your existing data into your LGIM geodatabase.  But that is for a future post.

3 comments:

  1. Hey Jeff!

    I'm a county intern also working on implementing the LGIM. I appeared to successfully import the spatial reference and create my LocalGovernment.gdb; however, I found that I could not copy and paste additional feature classes from the county's datasets into any of the feature datasets because the "spatial references do not match."

    This even occurred when I experimentally tried pasting in the same layer which I had originally used when setting the gdb spatial reference! The coordinate systems match, but it appears the Domain, Resolution and Tolerance do not. Is this a shortcoming of X-Ray or did yours work? Have you tried putting any of your layers directly into your gdb, or have you only been appending into the existing feature classes?

    Advice appreciated
    ~Rachel

    ReplyDelete
    Replies
    1. I have encountered the same issue, Rachel. Try to import your feature classes. That is what worked for me.

      Ryan

      Delete
  2. Can you please post the URL of the video? It does not seem to load properly on your webpage.

    ReplyDelete