Skip to main content

HI Stefen,

 

 

SpatialRelator: When I put the line.shp into the Base port and the polygon.shp into the Candidate port. In the transformer properties I set 'Tests to perform to TOUCHES'.  Result is all the line.shp?? Allowed Geometries for line is "Shape_polyline" and for Polygon is "shape_polygon"?  

 

And if the Result is one spot where the line intersects the polygon I can put outpout point.shp?? But Output is a line...

 

 

I'm new user without formation on FME...

 

 

hello

 SpatialRelator only outputs all line.shp.  And if you want to get the point where the line  and the polygon intersect. I think you can do it like this:

1. use GeometryConercer , turn Polygon into line.

2. use Intersector / LineonLineoverlayer to get the intersection point.

but you should notice:

If there's some intersection points in line.shp ,they will also be output.

 


Hi Katy,

 

 

in my testscenario I have a line feature and a polygon feature. They both go into the Intersector and leave the intersector via NODE port. Result in my case are three point features (start point, end point and the point wher the line hits the polygon).

 

 

Then I put the Points in the Base Port of the SpatialRelator and the poligon feature from the start into the Candidate Port. Test to perform here is TOUCHES.

 

 

Next I use a Tester and test the following: _related_candidates = 1

 

 

If you want to store your point features in a new point feature type, then you can add a new feature type to your dataset -> menu bar -> writers -> add feature type. When you ad a new feature type you can set the allowed gemetries to point.

 

 

Hope it works,

 

best regards,

 

Stefan

 


Using spatialrelator

 

 

U can set calculate cardinality of intersections and then expose a number of cardinalties.

 

Then u can test weither intersections are lines or points.

 

As those are the only possibilies when relating linse with polygons.

 

 

U have to maunally expose thos in fme 2012. (i'm not running 2013 yet).

 

So ofcousre related-candidates>1 and carindalty 

 

_relationships{0}.card_point =1 for point relation.

 

_relationships{0}.card_line = 1 for line-relation

 

There can be more then 1 element in the list.

 

 

Or use the infamous de9im wich u als need to expose.

Reply