Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I wrote a little tool in ArcObjects/C# for planarizing a line feature class. I am using IFeatureConstruction::PlanarizeLinesFromCursor because I need to apply a query filter.
Now, I figured out a bug: when executing the operation on ArcSDE featureclass the method adds the planarized version of the geometries, but does not delete the origin (unsplitted) features. The effect only appears on ArcSDE feature classes when the filter contains more than 1000 features.

Does anyone know about this bug? Is there any workaround?

I am using ArcGIS 9.3.1 SP 2 and .Net 3.5 on Win7.

share|improve this question
How does your query filter's WHERE look like? Can it be related to… ? – Petr Krebs Sep 7 '11 at 13:32
What happens if you select the features first using your query filter then use Planarizelines on that selection (by passing IEditor.EditSelection)? – Kirk Kuykendall Sep 7 '11 at 15:16
Thanks for reply. Kirk, it's a standalone tool, so i do not use the editor. Maybe the planarize function internally produces a query using "IN" for deletion of the origin features. I'm gonna check this today. – Jolly Roger Sep 8 '11 at 7:06
Planarizelines just needs an IEnumFeature, so you should be able to implement that and pass that without needing the editor. Your implementation of IEnumFeature could use IFeatureClass.GetFeatures which overcomes the 1000 feature limit. – Kirk Kuykendall Sep 8 '11 at 14:55
@Kirk Works perfectly! Many Thanks for your help! – Jolly Roger Sep 8 '11 at 16:23
up vote 2 down vote accepted

Instead of using PlanarizeLinesFromCursor, try using PlanarizeLines, passing it a class that implements IEnumFeature by calling IGeodatabaseBridge.GetFeatures - which overcomes the 1000 feature limitation.

share|improve this answer
I created a class implementing IEnumFeature. I used IFeatureClass.Select to perform the selection. Finally I got ISelectionSet.IDs as IEnumIds for implementing the Next() and Reset() methods. This way the 1000 feature limitation is no problem, although it is a little loss of performance. – Jolly Roger Sep 9 '11 at 14:54

I had a look into the SDE log file. Indeed the reason is ORA-1795 (maximum number of expressions in a list is 1000):

db_array_fetch_attrs OCI Fetch Error (1795)  
load_buffer error -51 on MYFEATURECLASS, rowid -1  

The query causing the error is created by the planarize-funktion internally. So I have no control to this. Unfortunately the function throws no exception or something like that.

I'm going to open an ESRI call. I will post the reply here.

share|improve this answer
This is a problem with Oracle, not ESRI IMHO. Change the query to use OR's. I know it's innefective, but maybe the bug will dissapear? – George Sep 8 '11 at 14:16
@George My query I give to the filter is very simple, e.g. "OBJECTID < 1200" (or even empty to process the whole featureclass). The problem is that obviously the planarize function internally creates a query using "IN" for deletion of the origin features (I could see that in the Oracle trace). So the planarize function will always raise an error on a SDE/Oracle featureclass (or filter) with more than 1000 features. – Jolly Roger Sep 8 '11 at 14:35
Humn interesting. Nice debugging. Kirks suggestions are good, they might help you out. I've never used planarize, so... – George Sep 8 '11 at 17:38

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.