[GIS] Importing XML document to file geodatabase

arcgis-10.2arcgis-desktopfile-geodatabasefmexml

enter image description here

I have never used xml data imports.

I am working with ArcGIS desktop 10.2

One of our major data supplier started data delivery using XML format using FTP. Packets of data updates are coming every day through FTP and stored in SQL.

I am looking for best practice to import data into geodatabases.

I have already used FME which has many shortcomings and I am not satisfied as its a lengthy process to write geometries. Also Importing XML to ArcMAP endup with error (AdvanceToElement: Unable to find xml element (workspaceDefinition not found in xml doc))

Best Answer

You can certainly use FME to wrangle the XML and write it to a database.

Something for you to understand first is that GIS like flat data with rows and columns, including geometry. XML is not flat, it is a (maybe big) hierarchical tree, which is a fundamentally different data model than most GIS formats. That said, you can parse the XML and extract all the bits you want.

Here's what I suggest you do:

  1. Open the XML file that was delivered in a good text editor, like Notepad++, and inspect the structure. Ensure that you can identify the attributes you want and the geometry
  2. Read up on some kind of help document that tells you how to use FME to wrangle XML files, maybe this one, or this one, or this video.
  3. Now get FME to read that file, use the inspector to ensure you're reading it properly, and when it's right, write it our to file.

If you like programming, you could do the above with Python, and then you could make and ArcGIS tool to import the data for you.

This task that you have, although frustrating at first, is one of the most important parts of doing GIS! You need to get data from somewhere to somewhere else, and getting it out of some weird arbitrary format is normal.

Edit: use a GeometryReplacer in FME to make the attribute with WKT or GML or whatever into a proper geometry.

Geometry Replacer

Related Question