5

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 feature classes.

How would I start to import them?

2
  • 1
    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
    Commented Mar 2, 2012 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
    Commented Feb 22, 2013 at 19:49

2 Answers 2

9

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

6

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
1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.