Skip to main content
Error: “The spatial comparator received a feature with invalid geometry”

 

 

I have two CAD layers: Boundary (hatch type) and Roads (lines type). I wanted to clip the roads that are located outside the boundary.

 

 

http://www.mediafire.com/download/6md00ozcmk0w7dx/AlSawahra_Jerusalem_UrbanMasterPlan_04_X_04.dwg

 

 

 

 

I applied the workbench below but I got the message “The spatial comparator received a feature with invalid geometry”

 

 

 

 

What might be the issue here?

 

 

 

Thank you

 

 

Best

 

 

Jamal
Hi,

 

 

it is probably what the error message says: one or more geometries are invalid and thus not accepted by your output format.

 

 

For ESRI Geodatabase-based writers, you have the option of sending invalid features to a separate FFS file. You can then inspect these features separately in the Inspector later.

 

 

See here (http://docs.safe.com/fme/html/FME_ReadersWriters/Default.htm#geodatabase/Writer_Overview.htm) for more info:

 

 

Ignoring Failed Features: The Geodatabase writer allows the user to continue with a translation, even when a feature would normally cause the translation to fail. The user is given the ability to choose how many failed features are allowed to fail before deciding to halt the translation altogether. Additionally, the user can specify a directory in which to store failed features, which will be stored in the FME Feature Store format.

 

 

David
Thanks David,

 

 

This error is introduced even in case the output is not written in ESRI feature class. In the workbench below, I used the inspector to show the output but it fails

 

 

 

 

 

 

What might be the issue? All what I wanted is to clip the roads according to a given boundary.

 

 

 


Hi Jamal,

 

 

The error seems to have occurred at the Clipper rather than the writer. I guess the clipper polygon (boundary) has a self-intersection. How did you set parameter of the GeometryValidator_6?

 

 

Takashi
Thanks Takashi,

 

 

 

The boundary is fine. It contains only one feature.

 

 

 

I check nothing in the “GeometryValidator”. I got the error:

 

 

“A 2D feature was encountered in the feature class 'RoadsLines_Outside_FME', which is defined as containing 3D features. The feature, and any other applicable features in the same feature class, will be modified so that it has the same dimension as the feature class. The spatial comparator received a feature with invalid geometry”

 

 

 

 

 

 

If I check the “self-intersect” then no output is generated for the boundary

 

 

 

 

 

 

 

what might be the issue?

 

 


If the boundary had a self-intersection and the GeometryValidator was able to repair it, the repaired boundary will go to Repaired port.
This is my test result.

 

 


Perfect. It works as a charm.

 

 

Very much appreciated Takashi

 

 

 

 

 

Best

 

 

Jamal

Reply