Hi Vince,Thanks for your reply.
- I have tried both with and without data => same problem
- As I understand a spatial index is automatically added. I do not add a spatial index explicitly. (also see console output below)
- My parameters are spatial_grid_1=0, spatial_grid_2=0, and spatial_grid_3=0, so I leave it to ArcGIS to determine the values.
If I run the python code below:
deconn = "c:\\arcgisconfig\\oracle.sde"
prj_file_path = "c:/Program Files (x86)/ArcGIS/Desktop10.1/Reference Systems/World Time Zones.prj"
fc = arcpy.CreateFeatureclass_management(sdeconn, "MYFEATURECLASS", "POLYGON", spatial_reference=prj_file_path, spatial_grid_1=0, spatial_grid_2=0, spatial_grid_3=0)
array = arcpy.Array([arcpy.Point(45, 50), arcpy.Point(47, 50), arcpy.Point(47, 49), arcpy.Point(45, 50)])
polygon = arcpy.Polygon(array)
cursor = arcpy.da.InsertCursor(fc, ("SHAPE@"))
cursor.insertRow((polygon,))
del cursor
desc = arcpy.Describe(fc)
print "Feature Type: " + desc.featureType
print "Shape Type : " + desc.shapeType
print "Spatial Index: " + str(desc.hasSpatialIndex)
The output from my console is:
Feature Type: Simple
Shape Type : Polygon
Spatial Index: True
And I still get the error from my SQL Query.- Morten