Skip to main content
Question

FME - ST_Intersection Equivalent

  • September 25, 2015
  • 6 replies
  • 131 views

Hey All,

 

 

So I have a pretty intense SQL function which I'm trying to conver into FME (for ease of maintenance). But I'm struggling to find a transformer which performs the same task as PostGIS' ST_Intersection.

 

 

I have a buffered road and I'm trying to overlay a road from a different datasource, and calculate the length of intersection. I've found spatial relator, but this only allows me to test whether or not there was a relationship, not the length of such a relationship.

 

 

Any help would be great.

 

 

Cheers

 

 

Hugh
This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, 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.

6 replies

takashi
Celebrity
  • September 25, 2015
Hi Hugh,

 

 

The Clipper or the LineOnAreaOverlayer might help you.

 

 

Takashi

takashi
Celebrity
  • September 25, 2015
... and see also the LengthCalculator to calculate the length of lines.

  • Author
  • September 28, 2015
Hey Takashi,

 

 

The clipper worked a treat...cheers.

 

 

I have a second related query...I want my clippers to arrive before my clippees, but my clippees are read in to FME via an sql creator, and my clippers via a postgis reader. my clipper data is the first dataset read in, but still my sql creator and clippees are being read first. How can i delay the sql creator until after my clipper reader has finished reading its data?

takashi
Celebrity
  • September 28, 2015
Unfortunately you cannot control the processing order of the reader and the SQLCreator.

 

As a workaround, however, you can use a combination of Creator + SQLExecutor, instead of the SQLCreator.

 

If you set "yes" to the "Create At End" parameter of the Creator, it creates a feature after the reader has finished reading features. Then, the SQLExecutor works after receiving the initiator feature that was created by the Creator. 

takashi
Celebrity
  • September 28, 2015
Alternatively the FeatureHolder can also be a solution. If you insert a FeatureHolder between the SQLCreator and the Clipper's Clippee port, it will hold the clippees until all clippers arrival.

 

But it consumes memory to hold the clippee features. So I think the Creator + SQLExecotor is better, especially in the case where there are many clippees.

  • Author
  • September 28, 2015
Hey Takashi,

 

 

The creator / sqlexecutor combination worked a treat...love it.

 

 

Really appreciate your help...fantasic tip!