Solved

Append the information of points for each category into one point

  • 8 October 2019
  • 5 replies
  • 0 views

Badge +1

Hello FME community,

I have points CSV file (POI). Each point includes Category, Name and Homepage attributes as shown in following screenshot:

 

The problem is that, for each Category of points within specific distance I need to create one point in center (center of group) and append the information of original points. The result should be similar to the following screenshot to display it on a website:

 

My idea is to Buffer the points with required distance, followed by Dissolver (Group By: Category) and CenterPointReplacer.

I am stuck on exactly how I would append all information of original points to the new created point to achieve the desired result. For Example the 3 museums should be presented by one point that includes the information of 3 museums.

I attached the workbench for more clarification.

Does anyone have any ideas or other potential solutions to perform that with FME Desktop?

 

Regards,

Afia.

@mark2atsafe @egomm @david_r @jlutherthomas @jdh @takashi @redgeographics @danilo_fme

icon

Best answer by mark2atsafe 8 October 2019, 16:58

View original

5 replies

Userlevel 4
Badge +25

I suspect the ListConcatenator is a better way to go than the ListExploder. I'm guessing you want one attribute value for the group, whereas the ListExploder will create separate features.

Badge +22

After the centerpoint replacer you can use listConcatenator to turn the list into a single attribute, or if you would prefer a more customized html attribute, including bullets and hrefs you can use a XMLTemplater to create it.

Userlevel 4
Badge +25

I suspect the ListConcatenator is a better way to go than the ListExploder. I'm guessing you want one attribute value for the group, whereas the ListExploder will create separate features.

Here's an example workspace. I added a LabelPointReplacer just to get the same looking output (plus a ListElementCounter to set the size of the label)

appendinfoimark.fmwt

Badge +1

I suspect the ListConcatenator is a better way to go than the ListExploder. I'm guessing you want one attribute value for the group, whereas the ListExploder will create separate features.

Thank you @jdh @mark2atsafe , ListConcatenator Transformer is good solution. I i have couple of questions regarding attached workspace and @jdh reply:

  1. What are (CR) and (LF) in ListConcatenator and AttributeManger Transformers? Is there FME link for symbols and signs that used in Text Editor & Arithmetic Editor? For example (^), (\\), (CR) & (LF).
  2. How XMLTemplater works to customize attributes for HTML page like bullets and href?
Badge +22

Thank you @jdh @mark2atsafe , ListConcatenator Transformer is good solution. I i have couple of questions regarding attached workspace and @jdh reply:

  1. What are (CR) and (LF) in ListConcatenator and AttributeManger Transformers? Is there FME link for symbols and signs that used in Text Editor & Arithmetic Editor? For example (^), (\\), (CR) & (LF).
  2. How XMLTemplater works to customize attributes for HTML page like bullets and href?

If you open the text editor on in the separation attribute parameter you can just hit the enter key to get an LF. In the options drop down of the text editor you can turn on show spaces/tabs to actually see the LF marker.

 

Assuming the attributes are in a list, the root template could look something like this

<ol>

{

for $n in fme:get-list-attribute("_list{}._name")

return <li>{$n}</li>

}</ol>,

<ol>

{

for $a in fme:get-list-attribute("_list{}.address")

return <li><a href="{$a}">{$a}</a></li>

}

 

</ol>

Reply