Skip to main content
Question

Best strategy for removing self-intersections created by the LineBuilder?

  • February 25, 2025
  • 2 replies
  • 45 views

peteratqfes
Contributor
Forum|alt.badge.img+6

Hi,

I have a point dataset of vehicle locations being turned into lines using the LineBuilder and self-intersections are being created. 

While I can write successfully to the MSSQL SDE using the SDE writer, I’d prefer to use the SQLSpatial writer (due to speed and licencing). SQLSpatial fails due to what looks like the self-intersections.  GeometryValidator can’t seem to fix the issues, with the repair failing.

The source points are the last hour of locations so they’re continuous being added and removed per vehicle.

I thought this would a common situation for FME users to be in.  Processing tracking data.

Also, would it make more sense to add the line segments on to the end of the line rather than rebuild the line?  I’m not sure how to go about that in FME.

Thanks

 

2 replies

bwn
Evangelist
Forum|alt.badge.img+26
  • Evangelist
  • February 26, 2025

Both SDE and SQL Server accept self-intersecting lines, and I have written these before with both Writers.

I suspect Peter your problem is somewhere else.   What errors are you getting in the Output log?

Separately you can use VertexCreator and VertexRemover to Add or Remove Vertices, but I would normally think this is more painful since you would need to first build the vertex index list of all the start vertices that were outside the last hour or data, and figure out which points were the vertices not already in the existing line.  So rebuilding the line in the workspace is fine, and the Writers won’t care how you got the line in the workspace as in the backend they are doing an Insert or Update against the DB with the geometry.

Edit: I will note that if INSERTing new Features to SQL Server to a table hosting ArcGIS services, would generally recommend writing with the SDE Writer in order to trigger related system function and table updates, Eg. generating a new OBJECTID.

I will by default only use SQL Server Writer in this situation for UPDATE DB operations,


hkingsbury
Celebrity
Forum|alt.badge.img+51
  • Celebrity
  • March 2, 2025
bwn wrote:

Edit: I will note that if INSERTing new Features to SQL Server to a table hosting ArcGIS services, would generally recommend writing with the SDE Writer in order to trigger related system function and table updates, Eg. generating a new OBJECTID.

I will by default only use SQL Server Writer in this situation for UPDATE DB operations,

Seconding this, writing to SDE via SQL can (and will) cause issues. Reading from SDE via SQL is generally okay.


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