I’m working on a project that would like to use spatialite as a go-between for field edits using QGIS/IntramapsRoam and then loading the data to a file geodatabase.
The workflow is as follows
Spatialite (created in ArcGIS using ‘SPATIALITE’ geometry) -> QGIS -> ArcGIS 10.2
I’m running in to a compatibility issue with arcpy and spatialite that renders my workflow impossible and am wondering if this has been encountered before and if there are any known solutions/workarounds.
#Create the database
sqllite_database = r'.test.sqlite'
arcpy.gp.CreateSQLiteDatabase(sqlite_database, “SPATIALITE”)
arcpy.CreateFeatureclass_management(r'.test.sqlite',
'points', "POINT")
arcpy.AddField_management(r'.test.sqlitemain.points',
"num_field", "TEXT")
After creating the database, I can access it with arcpy.
I then add a point in QGIS and save edits.
I can no longer access the layer with arcpy.
Oddly enough, I can still access the table from ArcMap, but arcpy is the functionality that I really need.
Given the lack of informative error messages and documentation for arcpy with spatialite, does anyone know what might be causing this? Any suggestions for solutions or workarounds?
Update: Here is a screen showing the layer drawing in ArcMap and returning False in arcpy. This seems like errant behavior.
Update 2: I tested again using ArcGIS10.3.1 and it still failed. Apparently you cannot edit sqlite databases in QGIS and retain arcpy functionality.