# How do I convert GML to ESRI featureclasses?

I have a series of xml files containing gml tags such as :

<gml:posList srsDimension="2">454780.3125 525867.9375 454762.0625 525994.5625


and I need to convert these into esri featureclasses.

How would I start to import them?

Thanks

-
You can convert your XML to Shapefiles with FME Desktop. Or you copy/paste a gml line in notepad and import the file in ArcMap. –  user3120 Mar 2 '12 at 12:15
@Alex Oulton I have the same problem converting XML's which contain GML tags, did you work out an open source solution? –  Matt Feb 22 '13 at 19:49

If you have ArcGIS and if you have also installed the Data Interoperability Extension (ArcGIS-integrated version of FME by Safe Software), you can read simple GML and WFS data sources without a license for the extension (source).

As long as your GML data sticks to the GML Simple Features profile, you do not need to enable the Data Interoperability Extension, it needs only be installed. Then, follow the instructions in this help topic to create an interoperability connection for your GML data: Using the GML simple features profile

Once you have set up the interoperability connection, you can export it to a shapefile or feature class using the usual Export Data command or geoprocessing tools such as Copy Features (Data Management).

See this help topic for more information: An overview of GML support in ArcGIS

-

You could give the GDAL/OGR utility ogr2ogr a try. It has to capability to convert between many formats of vector spatial data.

Depending on the flavor of your XML/GML it may be able to extract the spatial components straight away, and be as simple as:

ogr2ogr -f "esri shapefile" path\to\outputdir source\input.gml

-
Here's an ogr2ogr batch file I've used to convert GML to shapefiles: code.google.com/p/maphew/source/browse/gis/geobase/…, see the :gml2shp section at bottom. –  matt wilkie Apr 13 '12 at 19:47