i have a map and it has too many devices and lines and lines connected to different devices and i want to know for specific lines ,which lines connected to which device and show me the ID of this device ( i mean at end of the line or start from this line should be connected to device )i want to know exactly which device is it ? and how many lines get in and out from each device . how can i write function for this line .Thanks
Hi @zoro40
There are so many transformers for Spatial Relator that you can use.
What kind of geometry are devices? If are Polygons I suggest you to use transformers for Overlayer - for example LineOnAreaOverlayer.
Is possible with these transformers to get all attributes that were spatial detected.
Thanks,
Danilo
Hi @zoro40
There are so many transformers for Spatial Relator that you can use.
What kind of geometry are devices? If are Polygons I suggest you to use transformers for Overlayer - for example LineOnAreaOverlayer.
Is possible with these transformers to get all attributes that were spatial detected.
Thanks,
Danilo
they are polygons , but how can I know ,how many lines get in or out from polygon and give each line id.Thanks for ur answer
Excellent.
You can use the transformer LineonAreaOverlayer :
The yellow attribute ( Overlap Count Attribute ) show how many interactions that have between the geometries.
In the Attribute Accumulation you set the Option Merge Attributes.
If you want to share the Readers lines and polygons.
Thanks,
Danilo
Hello, if your polygons are not overlapping, you can have the number of lines being on the polygon with the overlap_count_attribute that will be created using the lineoverarea transformer.
According to FME Help for this transformer :
"The Overlap Count Attribute added to output area features holds the number of linear features that they contained."
But you will not be able to separate between the lines getting in and out.
If your input line got ID, you can use the "Attribute Acccumulation" parametre in the lineoverarea transformer and merge the attributes. This will add the attribute of the line on the area. But be careful because if your area has already attribute named ID, the attribute ID from the line will not be written. Use a list or bulkrename the attribut of the line with a prefix.
If you need to separate the lines getting IN from the line getting OUT, it is another matter.
Hope this help you a bit
V.