I am using a "select by location" operation on a large route dataset (1.3 mio lines). I would like to select all lines outside of a polygon and get the ERROR 000520: Unexpected TopoEngine Error. The operation works fine on a subset of the route data (260,000 lines). I have tried around a lot but could not find any solution to the problem.
I have read that this problem occurs on large dataset with "select by location" and I was wondering if there are any work arounds or solutions known.
Jorg, The first step is to run the Check Geometry tool on the routes feature class and see if it reports any error. If there are errors, run Repair Geometry tool to correct them. Then try running the Select by Location tool.
thank you for the quick response. I have tried that already. The Check Geometry tool does not report any geometry errors.
The Unexpected TopoEngine Error occurs only if I do the operation on a large dataset. If I first select a subset of this dataset and then perfom the operation it works well. But as soon as I want to perfom the select by location on more then around 150000 routes I get the error.
Jorg, Looking at the details about the bug report that you mentioned, this issue has been fixed in version 10.0. So If possible, upgrade the ArcGIS version and try it. Other possible workarounds if you cannot upgrade your software version are 1) Process smaller chunks of data (as you have been doing) 2) The Spatial Join or Intersect tool can also perform similar operations as Select Layer by Location. So try to complete your workflow using these two tools.
I am getting this error running the select layer by attribute in a python script. I cannot upgrade to 10 and I do not think I can nor do I want to use either of the suggested workarounds as it would greatly increase the size of hte script and the processing time.
What I am doing is selecting a boundary layer that meets certain criteria using the code below. The code selects line segments with a certain codes and flags a polygon layer three different times with different code types. The spatial join and the intersect would not cleanly do this for me.
Thanks, Tim S.
gp.selectlayerbyattribute_management(bndryLyr, oprtr["new"], tdlShr); showGpMessage() #including showGpMessage() after every gp tool will write the gp messages to the log file message = "attributes selected"; showPyMessage()
gp.selectlayerbylocation_management(bndryLyr,"SHARE_A_LINE_SEGMENT_WITH", plnrLyr); showGpMessage() #including showGpMessage() after every gp tool will write the gp messages to the log file message = "select by location!"; showPyMessage()