Skip to main content

Hello,

I have been trying to solve this issue for several days now and I can't get a result.

 

I have a set of points within the database that I am sending against the polygon of interest . To clarify to which category each point belongs, points inside the polygon are known points without a question tag (?). Points out of the polygon are unknown points; therefore, a question tag exists before the point name (?). There is a track formed of these points that variously goes into the polygon, from the polygon, and it creates the definition of points within the track, which can look like this:

 

1. ?APKO ?DANKO POPKO FERI LAKO POKO ARN DAN

2. APKO DANKO POPKO FERI LAKO ?POKO ?ARN ?DAN

3. ?APKO ?DANKO POPKO FERI LAKO POKO ?ARN ?DAN

 

4. ?APKO ?DANKO POPKO FERI LAKO ?POKO ?ARN ?DAN JAKO DMZ POPO

5. APKO DANKO POPKO ?FERI ?LAKO POKO ARN DAN

 

The aim is to remap the points with question tag (?) into the value without the question tag - to create known points out of unknown points for the target system if the track behaves specifically (I will explain the conditions below)

 

  1. The case defines the track this way for me:
  • The track begins out of the polygon of interest and ends inside the polygon - this is a permitted state, the point names will not be changed.

 

2. The case defines the track this way for me:

  • The track begins inside the polygon (known point without the question tag (?) ) and ends out of the polygon (the last three points with question tags (?) - ?POKO ?ARN ?DAN) - this is also a permitted state in the course of the track, so the points remain as they are.

 

3. The case defines the track this way for me:

  • The track begins out of the polygon (points with the question tags (?), continues inside the polygon (points without question tags (?)), ends out of the polygon (points with the question tags (?) ) - it is permitted state in the course of the track, so the points remain as they are.

 

4. The case defines the track this way for me:

  • The track begins out of the polygon (points with the question tags), continues inside the polygon (points without question tags), then continues out of the polygon (points with the question tags) and here comes the limiting condition that the track continues back to polygon (As DMZ POPO) - this is forbidden state and system requires all the points to be known ones (without question tags) with this kind of track. That means I need to delete question tags with the points (?POKO ?ARN ?DAN). The result should be ?APKO ?DANKO POPKO FERI LAKO POKO ARN DAN JAKO DMZ POPO (the question tags will be deleted only if the points are out of the polygon after the sequence of known points (points inside the polygon) when the unknown points follow (the track continues out of polygon) a then it returns into the polygon, where the track ends (known points).

 

5. The case defines the track this way for me:

  • The track begins in the polygon, continues out of the polygon and returns into the polygon - this is a forbidden state, so I need to change points with question tags (?FERI ?LAKO) into points without question tags. The result should look like this: APKO DANKO POPKO FERI LAKO POKO ARN DAN

 

The number of points out of the polygon or inside the polygon is unimportant. It is important not to have any specific sequences of points with question tags or without them repeated. For instance, if I would repeat examples 4 and 5, the state forbidden the same way can look like this:

 

4. ?APKO DANKO POPKO FERI LAKO ?POKO ARN DAN JAKO DMZ POPO - I need to change the point ?POKO into POKO (without the question tag ) - The result looks like this, and it is permitted ?APKO DANKO POPKO FERI LAKO POKO ARN DAN JAKO DMZ POPO

 

5. APKO ?DANKO POPKO - I need to change the point ?DANKO into DANKO

 

In conclusion, the word definition of forbidden state number 4 and 5:

 

4. If the track begins out of the polygon, that defines me any number of points with question tags (?), continues into the polygon (any number of points without question tags), continues out of the polygon (any number of points with question tags (?), it cannot continue back to polygon (points without question tags (?). This is why I will change points with question tags (The second group in the sequence - ?POKO ?ARN ?DAN) into the points without the question tags, which changes the points according to example 1, and that is the permitted state.

 

5. If the track begins inside the polygon, leaves the polygon and returns into the polygon again, the part that is out of the polygon needs to be changed into known points, therefore points without question tags (?). 

The record APKO DANKO POPKO ?FERI ?LAKO POKO ARN DAN creates APKO DANKO POPKO FERI LAKO POKO ARN DAN (This case was not mentioned above, but it is permitted as well - again, an unimportant number of points inside the polygon or outside the polygon, it is a forbidden sequence: known - unknown - known

 

Therefore there are two forbidden sequences:

known - unknown - known

unknown - known - unknown - known

 

There is also a graphic representation of the situation on the original question link below

Feed Detail (safe.com)

 

Another question is how to apply this adjustment in the current workspace, where the points of each track are defined within one column as a string (see Annex points).

 

I hope that makes it clearer. I understand that it is still quite complicated.

 

Thank you very much

@fmesafe.podpora​ As suggested before, I think  I'd make a list attribute using AttributeSplitter and then a small python script (PythonCaller) to process the list. Examples of list attributes and PythonCaller are at the end of the article Transformers for Working with List Attributes


@fmesafe.podpora​ As suggested before, I think  I'd make a list attribute using AttributeSplitter and then a small python script (PythonCaller) to process the list. Examples of list attributes and PythonCaller are at the end of the article Transformers for Working with List Attributes

Hello,

i know, thanks for the answer, but i'm afraid python is a programming language for me that i don't know. I'll try to go through the whole documentation again, but probably I don't get the correct result.

 

Thank you for the shared option on how to solve the problem.


Hello,

today I started to deal with the options regarding the definition of the conditions see above and in the tutorial I found this, I quote: "There are numerous FME transformers for performing almost every task you can think of without resorting to scripting. If you are thinking about writing a Python script to do something in FME you should make absolutely sure there is not an existing transformer available already" I'll probably have to continue with python, but I want to ask one last question, isn't there a solution without scripting? Thank you


Reply