Hi,
I try to integrate two features (shapes) with their ranks using arcpy.
-- arcpy.Integrate_management() --
I don't get a clue from the explanation/example in ArcGIS help. It's straight forward, however, to apply this tool from the graphical dialog. I would appreciate a working example having 2 shapes: a.shp (rank 1), b.shp (rank 2).
I'm using ArcGIS 10.2
Thanks, Torsten
Solved! Go to Solution.
Hi Neil,
thanks a lot - though late - for your hint! It wasn't clear to me that "Value table" really means it's a data type, though the table column states 'data type' in the header. Thought of an explanation like "table of values" - maybe a normal python list.
I couldn't use your example as given, as the "insertRow"-method doesn't exist, but addRow.
vTab = arcpy.ValueTable(2)
vTab.addRow("ShapeA.shp" + " 1")
vTab.addRow("ShapeB.shp" + " 2")
arcpy.Integrate_management(vTab,0.01)
Thanks again,
Torsten
The list of features and their rank is stated to be a Value Table type in the help.
So just create a value table in arcpy.
vTab = arcpy.ValueTable() vTab.insertRow("{} {}".format("ShapeA.shp", 1)) vTab.insertRow("{} {}".format("ShapeB.shp", 2))
Then use the vTab in the Integrate tool.
Hi Neil,
thanks a lot - though late - for your hint! It wasn't clear to me that "Value table" really means it's a data type, though the table column states 'data type' in the header. Thought of an explanation like "table of values" - maybe a normal python list.
I couldn't use your example as given, as the "insertRow"-method doesn't exist, but addRow.
vTab = arcpy.ValueTable(2)
vTab.addRow("ShapeA.shp" + " 1")
vTab.addRow("ShapeB.shp" + " 2")
arcpy.Integrate_management(vTab,0.01)
Thanks again,
Torsten