[GIS] Change feature class from ESRI native geometry to SQL Server geography

arcgis-10.3geometrypolygonsqlsql server

Original question:
I have found a lot of documentation on importing and using query layers from SQL Server into ArcCatalog/ArcMap/etc. However, when you change the projection of a feature class or use the editor tool in ArcMap (say to break up or split a polygon) then try to export it back into SQL Server, you cannot visualize the geometry when querying the table in sql server anymore.

I was wondering if anyone knew why this happened, and if there was a way to fix this either before you export into sql server or within sql server itself.

***************update*****************

I now know why I cannot see the spatial results in sql server; when exporting it is giving my feature class ESRI's default native geometry type, which SQL Server cannot visualize without conversion. From what I can find online, the "Migrate Storage" processing tool in ArcMap 10.3 should be able to fix this issue. However, after I ran the tool (and got a "succeeded" message in the results) it still does not show the shape column as a "geography" data type.

Best Answer

The workaround I figured out I still don't think is the ideal way to do it, but for now will work.

Instead of using the Migrate Storage process in ArcMap, I simply opened up the catalog, right-clicked on my edited feature class/table in my connected db and selected "export" --> "to geodatabase (single)". In the export window, I was able open the optional geodatabase settings and select "Geography" for the configuration keyword (optional)

enter image description here

Now when I open SQL Server and query from the edited feature class I exported with type GEOGRAPHY, it will show the spatial results as well as the attributes, which is what I wanted.

I feel like this is a workaround and not a true solution/way of altering a feature class's data type, but I still wanted to post it in case others have the same question I did.

Related Question