Skip to main content

Folks,

I'm finally making some headway with a Mapinfo to GML writer. Table to GML output is working fine.

The requirement is to inspect the start and end point of a polyline and see if a point from another table exists. I then need to take the ID of the polyline and the ID of the point and write those value out to GML

I now have a challenge with two options. I could create a dataset in Mapinfo where I do the geographic intersection using Mapinfo

OR

There may be some magic way to create this data in FME. I suspect a combination of a CoordinateExtractor and PointonLineOverlayer might be what I'm after but my novice skills are letting me down. I don't know how to join these two things together.

I should add I need to identify the start as "1" and the end as "2" as part of the GML writing.

Hi @andyew, two Snipper transformers can be used to transform each polyline into its start and end points. You can then filter the points read from another source dataset by the start/end points with the SpatialFilter. Here, the Merge Attributes option in the SpatialFilter is checked by default, so all attributes of a Filter feature will be merged to spatially related Candidate features. e.g.

 

In addition, if the spatial relations could be N:1, consider using the SpatialRelator instead of the SpatialFilter.


Hi @andyew, two Snipper transformers can be used to transform each polyline into its start and end points. You can then filter the points read from another source dataset by the start/end points with the SpatialFilter. Here, the Merge Attributes option in the SpatialFilter is checked by default, so all attributes of a Filter feature will be merged to spatially related Candidate features. e.g.

 

In addition, if the spatial relations could be N:1, consider using the SpatialRelator instead of the SpatialFilter.

Worked like a charm @takashi. Thank you so much.

 

 


Hi @andyew, two Snipper transformers can be used to transform each polyline into its start and end points. You can then filter the points read from another source dataset by the start/end points with the SpatialFilter. Here, the Merge Attributes option in the SpatialFilter is checked by default, so all attributes of a Filter feature will be merged to spatially related Candidate features. e.g.

 

In addition, if the spatial relations could be N:1, consider using the SpatialRelator instead of the SpatialFilter.

@takashi I spoke too soon. It's almost working. It seems I'm only getting a match on one end of the polyline (index -1) so I'm getting a set of data where the flag = 2, but none where the flag = 1. I used an Inspector to look at what's coming out of the Snippers and I get a whole bunch of points. It seems to all come undone at the Spatialfilter. Any thoughts?

 

 


@takashi I spoke too soon. It's almost working. It seems I'm only getting a match on one end of the polyline (index -1) so I'm getting a set of data where the flag = 2, but none where the flag = 1. I used an Inspector to look at what's coming out of the Snippers and I get a whole bunch of points. It seems to all come undone at the Spatialfilter. Any thoughts?

 

 

Perhaps the source polylines are edges of a network - i.e. the start node of each line matches the end node of other line?

 


Perhaps the source polylines are edges of a network - i.e. the start node of each line matches the end node of other line?

 

I did some more investigation. If I break the link between one or the other of the the AttributeCreator and the SpatialFilter the remaining connected AttributeCreator works. When they are both connected only one of the results from the AttributeCreator. It's like some sort of cancelling out. However to solve my problem I swapped the Filter to be the Points and the Candidiate to be the combined polyline end points and that solved the problem. I'm sure once I get a hang of these elemenst these silly little idiosyncracies will diminish. Thanks once again @takashi.

 


Reply