Skip to main content
Question

XY Coordinate


bayram
Contributor
Forum|alt.badge.img+5

 

hello everyone

 

I want to produce a point from this data in text format and the XY values ​​I need are in a single stub. The FME dataset area is common for x and Y. I will bring these XY values ​​side by side and produce a point from the vertex creator, but I did not know how to do this.

4 replies

daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • January 5, 2024

Hi @bayram​,

You can use an Aggregator transformer to group the records by fme_dataset, creating a list of the fme_text_string values. Then you can search that list with ListSearchers, using regular expressions to extract the x (1[0-9]+[.]*[0-9]*m) and y (3[0-9]+[.]*[0-9]*m) coordinates. Remove the 'm' from the coordinates using a StringReplacer, then create points using a VertexCreator.

Screen Shot 2024-01-05 at 9.40.02 AMI am attaching a workspace stub to illustrate.


bayram
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • January 8, 2024
daveatsafe wrote:

Hi @bayram​,

You can use an Aggregator transformer to group the records by fme_dataset, creating a list of the fme_text_string values. Then you can search that list with ListSearchers, using regular expressions to extract the x (1[0-9]+[.]*[0-9]*m) and y (3[0-9]+[.]*[0-9]*m) coordinates. Remove the 'm' from the coordinates using a StringReplacer, then create points using a VertexCreator.

Screen Shot 2024-01-05 at 9.40.02 AMI am attaching a workspace stub to illustrate.

 

Hello @daveatsafe​ 

 

Thank you very much for the answer, but I could not remove the values ​​from the list. I uploaded the excel data here. Can you help me if you have time?

 

1) xy values ​​in text string field

 

2) fme dataset field common field

 

I marked the xy values ​​with yellow color in Excel.


daveatsafe
Safer
Forum|alt.badge.img+19
  • Safer
  • January 9, 2024
bayram wrote:

 

Hello @daveatsafe​ 

 

Thank you very much for the answer, but I could not remove the values ​​from the list. I uploaded the excel data here. Can you help me if you have time?

 

1) xy values ​​in text string field

 

2) fme dataset field common field

 

I marked the xy values ​​with yellow color in Excel.

OK, you have some other values in there that aren't coordinates, but are caught by the ListSearchers. We can tighten up on the regular expressions to solve this, changing them to 1[0-9]{5}[.][0-9]{3}m and 3[0-9]{5}[.][0-9]{3}m. This will only extract the true coordinate values.

I am attaching an updated workspace that incorporates your dataset.


bayram
Contributor
Forum|alt.badge.img+5
  • Author
  • Contributor
  • January 9, 2024
bayram wrote:

 

Hello @daveatsafe​ 

 

Thank you very much for the answer, but I could not remove the values ​​from the list. I uploaded the excel data here. Can you help me if you have time?

 

1) xy values ​​in text string field

 

2) fme dataset field common field

 

I marked the xy values ​​with yellow color in Excel.

Thank you very much for your answer, it is very successful.


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings