View Full Version : Convert .GmL to a spatial data type

02-03-2012, 08:44 AM
Good morning, does anyone know of a way that I can convert .GML files to a format that is recognized by SQL spatial? Thanks

Eric Frost
02-03-2012, 10:31 AM

SQL Spatial can import from GML, but it actually only supports a subset of GML ( SQL Server's profile of the GML Schema (http://schemas.microsoft.com/sqlserver/profiles/gml/) ), so you may encounter errors. Have you tried it? If not, do something like this:

DECLARE @g AS geography = geography::GeomFromGml(@x, 4326);

Let us know how it goes.

There are commercial tools like Safe FME that might help, though last time I checked it was pricey?