Skip to main content
Solved

List attribute for CtyJSON

  • November 20, 2025
  • 6 replies
  • 49 views

cwisse
Contributor
Forum|alt.badge.img+4

I'm trying to setup the children and parents list attribute for export to CityJSON. Therefore I thought to use the listbuilder, but I get a different result than it should be. This example is how it should be:

 

And this one is my result. It looks like there is an extra layer in it.

How can I solve this?

Best answer by daveatsafe

Hi ​@cwisse,

Most of the list collector tools in FME are designed to work with multiple sub-attributes on a list, instead of the very simple list you require. However, you can generate the simple list with an Aggregator and an AttributeSplitter:

  • aggregate the input features in Attributes Only mode, setting Attributes to Concatenate to the desired parent id attribute, this will create a single attribute containing delimited values 

 

  • split the delimited attribute into a simple list

I am attaching a workspace to illustrate.

6 replies

redgeographics
Celebrity
Forum|alt.badge.img+62

Can you share your ListBuilder setup?


cwisse
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • November 21, 2025

Hi ​@redgeographics,

 

Here is just a very simple example, but with the same result.


redgeographics
Celebrity
Forum|alt.badge.img+62

Okay, I think what's happening here is not so much that there's an extra layer to it, but that FME 2024 displays lists in a different way than previous versions. There have been some changes to the Feature Information panel around that time.

 

When you write this out to CityJSON, do you get the correct result?


cwisse
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • November 21, 2025

No, I don't get the correct result.

The cityjson format attribute must be cityjson.children{}, but when I sent it to the writer I get cityjson.children{}.cityjson.children.

If I plot that on the example, it should be _list{}, but I get _list{}._creation_instance.


daveatsafe
Safer
Forum|alt.badge.img+20
  • Safer
  • Best Answer
  • November 24, 2025

Hi ​@cwisse,

Most of the list collector tools in FME are designed to work with multiple sub-attributes on a list, instead of the very simple list you require. However, you can generate the simple list with an Aggregator and an AttributeSplitter:

  • aggregate the input features in Attributes Only mode, setting Attributes to Concatenate to the desired parent id attribute, this will create a single attribute containing delimited values 

 

  • split the delimited attribute into a simple list

I am attaching a workspace to illustrate.


cwisse
Contributor
Forum|alt.badge.img+4
  • Author
  • Contributor
  • November 25, 2025

Hi ​@daveatsafe,

 

Yes! This is the trick I needed. Thank you very much.