SlideShare a Scribd company logo
9
Most read
11
Most read
19
Most read
List Manipulation in FME
Joanna Hobbins
JOANNA HOBBINS
Subject Matter Expert: Content Creation
Global Engineering, Immersive Environment
UNMATCHED ON A GLOBAL SCALE
COUNTRIES
35+
TRAINING CENTRES
65+
LOCATIONS
160
EMPLOYEES
8,000+
Lists
Lists are everywhere in FME:
• 15 transformers are
dedicated to list manipulation
• Over 80 transformers can
produce lists
But there’s no such thing as a
list data type in FME
Working with
Wait…
What?
With a specific naming convention
Lists are simply attributes
As long as the attribute name
contains {#} FME will treat it as a list.
You can use regular attribute
manipulators to create a list.
Vocabulary
A Little
Basic listSimple
Complex
Nested
List with
sub-elements
_animals{0}			Cat
_animals{1}			Dog
_pets{0}.Name			Felix
_pets{0}.Type					Cat
_pets{1}.Name			Fido
_pets{1}.Type					Dog
Multi-level list _relationships{0}.pass{0}	Contains
_relationships{0}.pass{1}	Intersects
_relationships{1}.pass{0}	Intersects
_relationships{2}.pass{0}	Intersects
Processing Every
List Element
There are lots of situations
where you might want to
process every list element
individually.
We’re going to examine
three different methods of
doing so.
The	Classic
The	Loop
The	Python
The Classic
Pros
• Easy to setup
• Access to all transformers
Cons
• Loss of geometry (ListBuilder) or
duplication of geometry (Aggregator)
• Special handling required for non-list
attributes
• Does not scale well
The Classic
Methodology
1. Create unique ID
2. Explode the list: ListExploder
3. Perform the manipulation(s) on each feature
4. Recombine the list: ListBuilder or Aggregator
Grouping by unique ID
5. Restore geometry/non-list attributes
The Loop
Pros
• No issues with
geometry or non list
attributes
• More efficient than
classic method for
shorter lists
Cons
• Requires a linked
custom transformer if
element manipulation
involves blocking
transformers
• Inefficient with large
lists
The Loop
Methodology
1. Create a Custom Transformer
2. Create an attribute to hold the current index
3. Check the index is less than the length of the list
4. Perform the manipulation(s) using the current index
5. Increment the index
6. Loop to Step 3
Place your screenshot here
The Python
Pros
• Extremely efficient
• No attribute or
geometry issues
Cons
• Requires coding
skills
• Not all
transformers have
an equivalent
python method
Place your screenshot here
The Python
Methodology
1. Get the list
attribute
2. Perform the
manipulations
3. Set the list
attribute
4. Expose the
list attribute if
creating a
new list
Is	it	really	that	
simple?
Place your screenshot here
Gotchas: Types
feature.getAttribute()
will often return
numbers as strings.
You may have to
explicitly cast
variables back and
forth between types.
Place your screenshot here
Gotchas: Types
feature.setAttribute()
will not work directly
on numeric lists.
You can either cast
the list to string or
use a for loop.
Place your screenshot here
Gotchas: Nested List
Nested lists cannot be
accessed directly.
You can retrieve the
sublist for a specific
element of the main
list, or a specific
element of the sublist
for all elements of the
main list.
To use all elements of
both lists,you need to
loop through the main
list.
But the length of the
list cannot be accessed
directly.
Place your screenshot here
Gotchas: Nested List
Hybrid
Solution
• Use a
ListElementCounter
prior to the
PythonCaller
• Use a “for i in
range” loop to
retrieve the subList
Benchmarks
Features List	Items
Processing	Time	in	Seconds
ListBuilder Aggregator Loop Python
10 10 1.5 0.5 0.5 0.6
10 100 1.5 0.6 0.6 0.6
10 1000 2.8 1.8 2.1 1.0
100 10 2.3 0.7 0.7 0.6
100 100 3.1 1.5 1.7 0.7
100 1000 12.2 9.9 12.8 1.5
1000 10 8.5 2.7 1.8 0.8
1000 100 17.8 12.6 12.3 1.2
1000 1000 101.2 91.5 120.5 6.4
10000 10 73.5 22.8 13.2 1.9
10000 100 156.0 102.4 119.2 6.2
10000 1000 1001.9 916.7 1199.0 53.6
Custom Transformers involving lists
• ListAppender
• ListComparer
• ListElementRemover
• ListExpressionEvaluator
• HistogramSummer
• AngularLineJoiner*
• FeatureSegmentator*
• LongestEdgeCalculator*
• OverlapPercentList*
• VisvalinghamSimplifier*
• ListElementFilter
• ListSlicer
• ListStatisticsCalculator
• ListStringReplacer
• ListSubsetEnumerator
• ListZipper
• ListCombiner
• ListElementExtractor
• ListMerger
• ListMissingElementFiller
• ListSampler
• AttributeListExploder
• AttributeListPopulator
But	when	you	look	at	the	
vertices,	the	left	edge	has	the	
longest	segment.
Longest Edge Calculator
One	might	reasonably	assume	
the	bottom	edge	is	the	longest.
Longest Edge Calculator
Uses	a	variation	of	the	
HistogramSummer to	get	the	
longest	cumulative	edge	
within	the	Angle	Tolerance.
VisvalingamSimplifier
Uses a list to store the triplet
triangle areas of
the feature, and the
ListElementRemover to
iteratively reduce vertices.
THANK YOU!
www.cae.com |
joanna.hobbins@cae.com

More Related Content

PDF
To Loop or Not to Loop: Overcoming Roadblocks with FME
PPTX
Exploring Raster with FME
PDF
Data to the Masses: Automated Word Document Creation with FME
PDF
Gitflow with FME and Autobuilding a Project with the Gitlab Build Pipeline
PDF
MNE-Python Coregistration
PDF
FME in Action to Support Pharma Giant Roche
PPTX
A successful Git branching model
PDF
Design Patterns in React
To Loop or Not to Loop: Overcoming Roadblocks with FME
Exploring Raster with FME
Data to the Masses: Automated Word Document Creation with FME
Gitflow with FME and Autobuilding a Project with the Gitlab Build Pipeline
MNE-Python Coregistration
FME in Action to Support Pharma Giant Roche
A successful Git branching model
Design Patterns in React

What's hot (20)

PDF
Quality Assurance of FME Scripts
PDF
Subversion to Git Migration
PDF
The Secrets of Hexagonal Architecture
PDF
JavaScript for ABAP Programmers - 3/7 Syntax
PDF
Quarkus による超音速な Spring アプリケーション開発
PPTX
Msを16倍出し抜くwpf開発1回目
PDF
MarkdownをBacklogのwikiに変換するPWA
PPTX
Javascript this keyword
PDF
잘 키운 모노리스 하나 열 마이크로서비스 안 부럽다
PDF
Bundling Packages and Deploying Applications with RPM
PPTX
로그 기깔나게 잘 디자인하는 법
PPTX
Spring 5に備えるリアクティブプログラミング入門
PPTX
Type Driven Development with TypeScript
PDF
Netflix conductor
PDF
Javaで作る超簡易x86エミュレータ
PDF
Rust製の全文検索エンジンライブラリ(tantivy bayard)を試してみた
PPTX
DOCX
Unit iv-syntax-directed-translation
PDF
Smart Things + Home Assistant: build your own smart home
PDF
【15-A-1】ドラゴンクエストXを支える失敗事例
Quality Assurance of FME Scripts
Subversion to Git Migration
The Secrets of Hexagonal Architecture
JavaScript for ABAP Programmers - 3/7 Syntax
Quarkus による超音速な Spring アプリケーション開発
Msを16倍出し抜くwpf開発1回目
MarkdownをBacklogのwikiに変換するPWA
Javascript this keyword
잘 키운 모노리스 하나 열 마이크로서비스 안 부럽다
Bundling Packages and Deploying Applications with RPM
로그 기깔나게 잘 디자인하는 법
Spring 5に備えるリアクティブプログラミング入門
Type Driven Development with TypeScript
Netflix conductor
Javaで作る超簡易x86エミュレータ
Rust製の全文検索エンジンライブラリ(tantivy bayard)を試してみた
Unit iv-syntax-directed-translation
Smart Things + Home Assistant: build your own smart home
【15-A-1】ドラゴンクエストXを支える失敗事例
Ad

Similar to List Manipulation in FME (20)

PPTX
MODULE-2.pptx
PPTX
Python Dynamic Data type List & Dictionaries
PPTX
Lists on the pyhton to learn the children more easily on easy codes.pptx
PPTX
PYTHON LISTsjnjsnljnsjnosojnosojnsojnsjsn.pptx
PDF
FINAL revised LIST in Python.pdf
PPTX
Brief Explanation On List and Dictionaries of Python
PDF
Python list functions
PDF
Anton Kasyanov, Introduction to Python, Lecture4
PPTX
fundamental of python --- vivek singh shekawat
DOCX
Assg 07 Templates and Operator OverloadingCOSC 2336 Sprin.docx
PPTX
tupple.pptx
PDF
List in Python Using Back Developers in Using More Use.
PDF
beginners_python_cheat_sheet_pcc_all_bw.pdf
PPTX
Collections123456789009876543211234567.pptx
PPTX
Python programming
PDF
List , tuples, dictionaries and regular expressions in python
PPTX
Chapter - 2.pptx
PPT
White paper on tuples
PDF
Lists and its functions in python for beginners
PPTX
Brixton Library Technology Initiative
MODULE-2.pptx
Python Dynamic Data type List & Dictionaries
Lists on the pyhton to learn the children more easily on easy codes.pptx
PYTHON LISTsjnjsnljnsjnosojnosojnsojnsjsn.pptx
FINAL revised LIST in Python.pdf
Brief Explanation On List and Dictionaries of Python
Python list functions
Anton Kasyanov, Introduction to Python, Lecture4
fundamental of python --- vivek singh shekawat
Assg 07 Templates and Operator OverloadingCOSC 2336 Sprin.docx
tupple.pptx
List in Python Using Back Developers in Using More Use.
beginners_python_cheat_sheet_pcc_all_bw.pdf
Collections123456789009876543211234567.pptx
Python programming
List , tuples, dictionaries and regular expressions in python
Chapter - 2.pptx
White paper on tuples
Lists and its functions in python for beginners
Brixton Library Technology Initiative
Ad

More from Safe Software (20)

PDF
Getting Started with Data Integration: FME Form 101
PDF
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
PDF
Automating ArcGIS Content Discovery with FME: A Real World Use Case
PDF
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
PDF
Infrastructure planning and resilience - Keith Hastings.pptx.pdf
PDF
Notification System for Construction Logistics Application
PDF
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
PDF
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
PDF
Transforming Utility Networks: Large-scale Data Migrations with FME
PDF
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
PDF
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
PDF
FME in Overdrive - Peak of Data & AI 2025
PDF
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
PDF
Pipeline Industry IoT - Real Time Data Monitoring
PDF
FME in Overdrive: Unleashing the Power of Parallel Processing
PDF
Fiber to the People! By Deutsche Telekom
PDF
Governing Geospatial Data at Scale: Optimizing ArcGIS Online with FME in Envi...
PDF
Enhancing Environmental Monitoring with Real-Time Data Integration: Leveragin...
PDF
Introducing and Operating FME Flow for Kubernetes in a Large Enterprise: Expe...
PDF
5 Things to Consider When Deploying AI in Your Enterprise
Getting Started with Data Integration: FME Form 101
Peak of Data & AI Encore- AI for Metadata and Smarter Workflows
Automating ArcGIS Content Discovery with FME: A Real World Use Case
Peak of Data & AI Encore - Real-Time Insights & Scalable Editing with ArcGIS
Infrastructure planning and resilience - Keith Hastings.pptx.pdf
Notification System for Construction Logistics Application
Building Real-Time Digital Twins with IBM Maximo & ArcGIS Indoors
Using FME to Develop Self-Service CAD Applications for a Major UK Police Force
Transforming Utility Networks: Large-scale Data Migrations with FME
Peak of Data & AI Encore AI-Enhanced Workflows for the Real World
Automating Feature Enrichment and Station Creation in Natural Gas Utility Net...
FME in Overdrive - Peak of Data & AI 2025
Powering GIS with FME and VertiGIS - Peak of Data & AI 2025
Pipeline Industry IoT - Real Time Data Monitoring
FME in Overdrive: Unleashing the Power of Parallel Processing
Fiber to the People! By Deutsche Telekom
Governing Geospatial Data at Scale: Optimizing ArcGIS Online with FME in Envi...
Enhancing Environmental Monitoring with Real-Time Data Integration: Leveragin...
Introducing and Operating FME Flow for Kubernetes in a Large Enterprise: Expe...
5 Things to Consider When Deploying AI in Your Enterprise

Recently uploaded (20)

PPTX
Spectroscopy.pptx food analysis technology
PPTX
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
PDF
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
PPTX
MYSQL Presentation for SQL database connectivity
PDF
Spectral efficient network and resource selection model in 5G networks
PDF
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
PDF
Unlocking AI with Model Context Protocol (MCP)
PDF
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
PDF
Per capita expenditure prediction using model stacking based on satellite ima...
PDF
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
PDF
Building Integrated photovoltaic BIPV_UPV.pdf
PDF
KodekX | Application Modernization Development
PDF
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
PPTX
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
PPT
Teaching material agriculture food technology
PDF
NewMind AI Weekly Chronicles - August'25 Week I
PDF
Electronic commerce courselecture one. Pdf
PDF
Review of recent advances in non-invasive hemoglobin estimation
PDF
Reach Out and Touch Someone: Haptics and Empathic Computing
PPTX
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx
Spectroscopy.pptx food analysis technology
VMware vSphere Foundation How to Sell Presentation-Ver1.4-2-14-2024.pptx
Architecting across the Boundaries of two Complex Domains - Healthcare & Tech...
MYSQL Presentation for SQL database connectivity
Spectral efficient network and resource selection model in 5G networks
7 ChatGPT Prompts to Help You Define Your Ideal Customer Profile.pdf
Unlocking AI with Model Context Protocol (MCP)
Blue Purple Modern Animated Computer Science Presentation.pdf.pdf
Per capita expenditure prediction using model stacking based on satellite ima...
Build a system with the filesystem maintained by OSTree @ COSCUP 2025
Building Integrated photovoltaic BIPV_UPV.pdf
KodekX | Application Modernization Development
Profit Center Accounting in SAP S/4HANA, S4F28 Col11
Detection-First SIEM: Rule Types, Dashboards, and Threat-Informed Strategy
Teaching material agriculture food technology
NewMind AI Weekly Chronicles - August'25 Week I
Electronic commerce courselecture one. Pdf
Review of recent advances in non-invasive hemoglobin estimation
Reach Out and Touch Someone: Haptics and Empathic Computing
KOM of Painting work and Equipment Insulation REV00 update 25-dec.pptx

List Manipulation in FME

  • 1. List Manipulation in FME Joanna Hobbins
  • 2. JOANNA HOBBINS Subject Matter Expert: Content Creation Global Engineering, Immersive Environment
  • 3. UNMATCHED ON A GLOBAL SCALE COUNTRIES 35+ TRAINING CENTRES 65+ LOCATIONS 160 EMPLOYEES 8,000+
  • 4. Lists Lists are everywhere in FME: • 15 transformers are dedicated to list manipulation • Over 80 transformers can produce lists But there’s no such thing as a list data type in FME Working with Wait… What?
  • 5. With a specific naming convention Lists are simply attributes As long as the attribute name contains {#} FME will treat it as a list. You can use regular attribute manipulators to create a list.
  • 6. Vocabulary A Little Basic listSimple Complex Nested List with sub-elements _animals{0} Cat _animals{1} Dog _pets{0}.Name Felix _pets{0}.Type Cat _pets{1}.Name Fido _pets{1}.Type Dog Multi-level list _relationships{0}.pass{0} Contains _relationships{0}.pass{1} Intersects _relationships{1}.pass{0} Intersects _relationships{2}.pass{0} Intersects
  • 7. Processing Every List Element There are lots of situations where you might want to process every list element individually. We’re going to examine three different methods of doing so. The Classic The Loop The Python
  • 8. The Classic Pros • Easy to setup • Access to all transformers Cons • Loss of geometry (ListBuilder) or duplication of geometry (Aggregator) • Special handling required for non-list attributes • Does not scale well
  • 9. The Classic Methodology 1. Create unique ID 2. Explode the list: ListExploder 3. Perform the manipulation(s) on each feature 4. Recombine the list: ListBuilder or Aggregator Grouping by unique ID 5. Restore geometry/non-list attributes
  • 10. The Loop Pros • No issues with geometry or non list attributes • More efficient than classic method for shorter lists Cons • Requires a linked custom transformer if element manipulation involves blocking transformers • Inefficient with large lists
  • 11. The Loop Methodology 1. Create a Custom Transformer 2. Create an attribute to hold the current index 3. Check the index is less than the length of the list 4. Perform the manipulation(s) using the current index 5. Increment the index 6. Loop to Step 3
  • 12. Place your screenshot here The Python Pros • Extremely efficient • No attribute or geometry issues Cons • Requires coding skills • Not all transformers have an equivalent python method
  • 13. Place your screenshot here The Python Methodology 1. Get the list attribute 2. Perform the manipulations 3. Set the list attribute 4. Expose the list attribute if creating a new list Is it really that simple?
  • 14. Place your screenshot here Gotchas: Types feature.getAttribute() will often return numbers as strings. You may have to explicitly cast variables back and forth between types.
  • 15. Place your screenshot here Gotchas: Types feature.setAttribute() will not work directly on numeric lists. You can either cast the list to string or use a for loop.
  • 16. Place your screenshot here Gotchas: Nested List Nested lists cannot be accessed directly. You can retrieve the sublist for a specific element of the main list, or a specific element of the sublist for all elements of the main list. To use all elements of both lists,you need to loop through the main list. But the length of the list cannot be accessed directly.
  • 17. Place your screenshot here Gotchas: Nested List Hybrid Solution • Use a ListElementCounter prior to the PythonCaller • Use a “for i in range” loop to retrieve the subList
  • 18. Benchmarks Features List Items Processing Time in Seconds ListBuilder Aggregator Loop Python 10 10 1.5 0.5 0.5 0.6 10 100 1.5 0.6 0.6 0.6 10 1000 2.8 1.8 2.1 1.0 100 10 2.3 0.7 0.7 0.6 100 100 3.1 1.5 1.7 0.7 100 1000 12.2 9.9 12.8 1.5 1000 10 8.5 2.7 1.8 0.8 1000 100 17.8 12.6 12.3 1.2 1000 1000 101.2 91.5 120.5 6.4 10000 10 73.5 22.8 13.2 1.9 10000 100 156.0 102.4 119.2 6.2 10000 1000 1001.9 916.7 1199.0 53.6
  • 19. Custom Transformers involving lists • ListAppender • ListComparer • ListElementRemover • ListExpressionEvaluator • HistogramSummer • AngularLineJoiner* • FeatureSegmentator* • LongestEdgeCalculator* • OverlapPercentList* • VisvalinghamSimplifier* • ListElementFilter • ListSlicer • ListStatisticsCalculator • ListStringReplacer • ListSubsetEnumerator • ListZipper • ListCombiner • ListElementExtractor • ListMerger • ListMissingElementFiller • ListSampler • AttributeListExploder • AttributeListPopulator
  • 21. Longest Edge Calculator Uses a variation of the HistogramSummer to get the longest cumulative edge within the Angle Tolerance.
  • 22. VisvalingamSimplifier Uses a list to store the triplet triangle areas of the feature, and the ListElementRemover to iteratively reduce vertices.