Skip to main content

Hello,

I am starting using FME Workbench and it's amazing!

A quick question as I can't manage to achieve what I would like.

Basically I am starting with 2 features, Airports and Runaways. I have a OneToMany relations between those 2 features.

What I would like to do is in that my final GEOJson looks like bellow, meaning that the list of my runaways with their properties + geometry if needed are nested into the Airport feature.

I managed well using InlineQuerier to have the data I need and execute the join I need the thing I don't know is what is the flow to build properly the GEOJson as I want.

 

{
"type" : "FeatureCollection",
"name" : "Airports",
"features" : /
{
"type" : "Feature",
"geometry" : null,
"properties" : {
"someAirportProperty" : "someAirportValue",
"runaways": o
{
"someRunawayProperty": "someRunawayValue"
}
]
}
},
]
}

Hi @jacquint, the JSONTemplater might help you. To make a template expression, requires to know what attributes the input features have.

[Addition] If you want to get a more specific answer, clarify the structure of attributes in the input features corresponding to desired GeoJSON schema you have posted, using tables like this example.

Attributes of Airport Feature (example)

Attribute NameAttribute Value (exmaple)NoteairportId1unique IDsomeAirportPropertysomeAirportValue
Attributes of Runway Feature (example)Attribute NameAttribute Value (example)NoteairportId1specify an airport which this runway belongs tosomeRunwayPropertysomeRunwayValue

 


Hi @takashi !

Thank you very much for your answer!

I am gonna dig into the JSONTemplater component and let you know.

Best regards,

Thomas.


Hi @takashi !

I finally managed to achieve what I wanted! This tool is just amazing!

I used JSONTemplater + sub template + fme:process-features and IDs of relation between my 2 features.

I will probably come back with other questions as much as I will dig into the tool but from now we can consider this question solved!

Thank you again.


Reply