Skip to main content
Solved

Error: “The spatial comparator received a feature with invalid geometry”


jamal
Forum|alt.badge.img+5
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

Best answer by takashi

If the boundary had a self-intersection and the GeometryValidator was able to repair it, the repaired boundary will go to Repaired port.
View original
Did this help you find an answer to your question?
This post is closed to further activity.
It may be a question with a best answer, an implemented idea, or just a post needing no comment.
If you have a follow-up or related question, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

7 replies

david_r
Celebrity
  • May 5, 2014
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

jamal
Forum|alt.badge.img+5
  • Author
  • May 6, 2014
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.

 

 

 


takashi
Influencer
  • May 8, 2014
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

jamal
Forum|alt.badge.img+5
  • Author
  • May 8, 2014
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?

 

 


takashi
Influencer
  • Best Answer
  • May 8, 2014
If the boundary had a self-intersection and the GeometryValidator was able to repair it, the repaired boundary will go to Repaired port.

takashi
Influencer
  • May 8, 2014
This is my test result.

 

 


jamal
Forum|alt.badge.img+5
  • Author
  • May 8, 2014
Perfect. It works as a charm.

 

 

Very much appreciated Takashi

 

 

 

 

 

Best

 

 

Jamal

Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings