SlideShare a Scribd company logo
1 of 23
Download to read offline
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

What's hot

Modelling Trees with FME
Modelling Trees with FMEModelling Trees with FME
Modelling Trees with FMESafe Software
 
Introdução ao GeoServer 2.0
Introdução ao GeoServer 2.0Introdução ao GeoServer 2.0
Introdução ao GeoServer 2.0Fernando Quadro
 
Data Transformation Powerpoint Presentation Slides
Data Transformation Powerpoint Presentation SlidesData Transformation Powerpoint Presentation Slides
Data Transformation Powerpoint Presentation SlidesSlideTeam
 
POO - Unidade 2 (parte 2) - Classe de Associação, Agregação, Composição (ver...
POO - Unidade 2 (parte 2) - Classe de Associação, Agregação, Composição  (ver...POO - Unidade 2 (parte 2) - Classe de Associação, Agregação, Composição  (ver...
POO - Unidade 2 (parte 2) - Classe de Associação, Agregação, Composição (ver...Marcello Thiry
 
Resumo diagramas de classes
Resumo diagramas de classesResumo diagramas de classes
Resumo diagramas de classesMarco Coelho
 
System Integration PowerPoint Presentation Slides
System Integration PowerPoint Presentation Slides System Integration PowerPoint Presentation Slides
System Integration PowerPoint Presentation Slides SlideTeam
 
Dell Boomi Integration with Salesforce
Dell Boomi Integration with SalesforceDell Boomi Integration with Salesforce
Dell Boomi Integration with SalesforceNagarjuna Kaipu
 
C++ - Funções e Switch Case
C++ - Funções e Switch CaseC++ - Funções e Switch Case
C++ - Funções e Switch Caseprofjr
 
La définition du management
La définition du managementLa définition du management
La définition du managementNegro Franck
 

What's hot (13)

Bancodedados
BancodedadosBancodedados
Bancodedados
 
Modelling Trees with FME
Modelling Trees with FMEModelling Trees with FME
Modelling Trees with FME
 
Datomic&datalog紹介
Datomic&datalog紹介Datomic&datalog紹介
Datomic&datalog紹介
 
Introdução ao GeoServer 2.0
Introdução ao GeoServer 2.0Introdução ao GeoServer 2.0
Introdução ao GeoServer 2.0
 
Data Transformation Powerpoint Presentation Slides
Data Transformation Powerpoint Presentation SlidesData Transformation Powerpoint Presentation Slides
Data Transformation Powerpoint Presentation Slides
 
POO - 17 - Interfaces
POO - 17 - InterfacesPOO - 17 - Interfaces
POO - 17 - Interfaces
 
POO - Unidade 2 (parte 2) - Classe de Associação, Agregação, Composição (ver...
POO - Unidade 2 (parte 2) - Classe de Associação, Agregação, Composição  (ver...POO - Unidade 2 (parte 2) - Classe de Associação, Agregação, Composição  (ver...
POO - Unidade 2 (parte 2) - Classe de Associação, Agregação, Composição (ver...
 
Resumo diagramas de classes
Resumo diagramas de classesResumo diagramas de classes
Resumo diagramas de classes
 
System Integration PowerPoint Presentation Slides
System Integration PowerPoint Presentation Slides System Integration PowerPoint Presentation Slides
System Integration PowerPoint Presentation Slides
 
Dell Boomi Integration with Salesforce
Dell Boomi Integration with SalesforceDell Boomi Integration with Salesforce
Dell Boomi Integration with Salesforce
 
Manual de portugol
Manual de portugolManual de portugol
Manual de portugol
 
C++ - Funções e Switch Case
C++ - Funções e Switch CaseC++ - Funções e Switch Case
C++ - Funções e Switch Case
 
La définition du management
La définition du managementLa définition du management
La définition du management
 

Similar to List Manipulation in FME

MODULE-2.pptx
MODULE-2.pptxMODULE-2.pptx
MODULE-2.pptxASRPANDEY
 
PYTHON LISTsjnjsnljnsjnosojnosojnsojnsjsn.pptx
PYTHON LISTsjnjsnljnsjnosojnosojnsojnsjsn.pptxPYTHON LISTsjnjsnljnsjnosojnosojnsojnsjsn.pptx
PYTHON LISTsjnjsnljnsjnosojnosojnsojnsjsn.pptxsurajnath20
 
Anton Kasyanov, Introduction to Python, Lecture4
Anton Kasyanov, Introduction to Python, Lecture4Anton Kasyanov, Introduction to Python, Lecture4
Anton Kasyanov, Introduction to Python, Lecture4Anton Kasyanov
 
Built-in Data Structures in python 3.pdf
Built-in Data Structures in python 3.pdfBuilt-in Data Structures in python 3.pdf
Built-in Data Structures in python 3.pdfalivaisi1
 
Assg 07 Templates and Operator OverloadingCOSC 2336 Sprin.docx
Assg 07 Templates and Operator OverloadingCOSC 2336 Sprin.docxAssg 07 Templates and Operator OverloadingCOSC 2336 Sprin.docx
Assg 07 Templates and Operator OverloadingCOSC 2336 Sprin.docxfestockton
 
Python programming
Python programmingPython programming
Python programmingsirikeshava
 
List , tuples, dictionaries and regular expressions in python
List , tuples, dictionaries and regular expressions in pythonList , tuples, dictionaries and regular expressions in python
List , tuples, dictionaries and regular expressions in pythonchanna basava
 
White paper on tuples
White paper on tuplesWhite paper on tuples
White paper on tuplesArehoYoutuber
 
Brixton Library Technology Initiative
Brixton Library Technology InitiativeBrixton Library Technology Initiative
Brixton Library Technology InitiativeBasil Bibi
 
Mastering Python lesson 5a_lists_list_operations
Mastering Python lesson 5a_lists_list_operationsMastering Python lesson 5a_lists_list_operations
Mastering Python lesson 5a_lists_list_operationsRuth Marvin
 
Basic controls in asp
Basic controls in aspBasic controls in asp
Basic controls in aspSireesh K
 
Introduction to Python - Part Two
Introduction to Python - Part TwoIntroduction to Python - Part Two
Introduction to Python - Part Twoamiable_indian
 
Brixon Library Technology Initiative
Brixon Library Technology InitiativeBrixon Library Technology Initiative
Brixon Library Technology InitiativeBasil Bibi
 

Similar to List Manipulation in FME (20)

MODULE-2.pptx
MODULE-2.pptxMODULE-2.pptx
MODULE-2.pptx
 
PYTHON LISTsjnjsnljnsjnosojnosojnsojnsjsn.pptx
PYTHON LISTsjnjsnljnsjnosojnosojnsojnsjsn.pptxPYTHON LISTsjnjsnljnsjnosojnosojnsojnsjsn.pptx
PYTHON LISTsjnjsnljnsjnosojnosojnsojnsjsn.pptx
 
FINAL revised LIST in Python.pdf
FINAL revised LIST in Python.pdfFINAL revised LIST in Python.pdf
FINAL revised LIST in Python.pdf
 
Python list functions
Python list functionsPython list functions
Python list functions
 
Anton Kasyanov, Introduction to Python, Lecture4
Anton Kasyanov, Introduction to Python, Lecture4Anton Kasyanov, Introduction to Python, Lecture4
Anton Kasyanov, Introduction to Python, Lecture4
 
Built-in Data Structures in python 3.pdf
Built-in Data Structures in python 3.pdfBuilt-in Data Structures in python 3.pdf
Built-in Data Structures in python 3.pdf
 
Assg 07 Templates and Operator OverloadingCOSC 2336 Sprin.docx
Assg 07 Templates and Operator OverloadingCOSC 2336 Sprin.docxAssg 07 Templates and Operator OverloadingCOSC 2336 Sprin.docx
Assg 07 Templates and Operator OverloadingCOSC 2336 Sprin.docx
 
tupple.pptx
tupple.pptxtupple.pptx
tupple.pptx
 
Python programming
Python programmingPython programming
Python programming
 
List , tuples, dictionaries and regular expressions in python
List , tuples, dictionaries and regular expressions in pythonList , tuples, dictionaries and regular expressions in python
List , tuples, dictionaries and regular expressions in python
 
Chapter - 2.pptx
Chapter - 2.pptxChapter - 2.pptx
Chapter - 2.pptx
 
White paper on tuples
White paper on tuplesWhite paper on tuples
White paper on tuples
 
Brixton Library Technology Initiative
Brixton Library Technology InitiativeBrixton Library Technology Initiative
Brixton Library Technology Initiative
 
Lecture 09.pptx
Lecture 09.pptxLecture 09.pptx
Lecture 09.pptx
 
Mastering Python lesson 5a_lists_list_operations
Mastering Python lesson 5a_lists_list_operationsMastering Python lesson 5a_lists_list_operations
Mastering Python lesson 5a_lists_list_operations
 
Linked lists
Linked listsLinked lists
Linked lists
 
Basic controls in asp
Basic controls in aspBasic controls in asp
Basic controls in asp
 
set.pptx
set.pptxset.pptx
set.pptx
 
Introduction to Python - Part Two
Introduction to Python - Part TwoIntroduction to Python - Part Two
Introduction to Python - Part Two
 
Brixon Library Technology Initiative
Brixon Library Technology InitiativeBrixon Library Technology Initiative
Brixon Library Technology Initiative
 

More from Safe Software

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FMESafe Software
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action:  Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action:  Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationSafe Software
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationSafe Software
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsSafe Software
 
The Critical Role of Spatial Data in Today's Data Ecosystem
The Critical Role of Spatial Data in Today's Data EcosystemThe Critical Role of Spatial Data in Today's Data Ecosystem
The Critical Role of Spatial Data in Today's Data EcosystemSafe Software
 
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial DataCloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial DataSafe Software
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsSafe Software
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightSafe Software
 
Mastering MicroStation DGN: How to Integrate CAD and GIS
Mastering MicroStation DGN: How to Integrate CAD and GISMastering MicroStation DGN: How to Integrate CAD and GIS
Mastering MicroStation DGN: How to Integrate CAD and GISSafe Software
 
Geospatial Synergy: Amplifying Efficiency with FME & Esri
Geospatial Synergy: Amplifying Efficiency with FME & EsriGeospatial Synergy: Amplifying Efficiency with FME & Esri
Geospatial Synergy: Amplifying Efficiency with FME & EsriSafe Software
 
Introducing the New FME Community Webinar - Feb 21, 2024 (2).pdf
Introducing the New FME Community Webinar - Feb 21, 2024 (2).pdfIntroducing the New FME Community Webinar - Feb 21, 2024 (2).pdf
Introducing the New FME Community Webinar - Feb 21, 2024 (2).pdfSafe Software
 
Breaking Barriers & Leveraging the Latest Developments in AI Technology
Breaking Barriers & Leveraging the Latest Developments in AI TechnologyBreaking Barriers & Leveraging the Latest Developments in AI Technology
Breaking Barriers & Leveraging the Latest Developments in AI TechnologySafe Software
 
Best Practices to Navigating Data and Application Integration for the Enterpr...
Best Practices to Navigating Data and Application Integration for the Enterpr...Best Practices to Navigating Data and Application Integration for the Enterpr...
Best Practices to Navigating Data and Application Integration for the Enterpr...Safe Software
 
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial DataCloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial DataSafe Software
 
New Year's Fireside Chat with Safe Software’s Founders
New Year's Fireside Chat with Safe Software’s FoundersNew Year's Fireside Chat with Safe Software’s Founders
New Year's Fireside Chat with Safe Software’s FoundersSafe Software
 
Taking Off with FME: Elevating Airport Operations to New Heights
Taking Off with FME: Elevating Airport Operations to New HeightsTaking Off with FME: Elevating Airport Operations to New Heights
Taking Off with FME: Elevating Airport Operations to New HeightsSafe Software
 
Initiating and Advancing Your Strategic GIS Governance Strategy
Initiating and Advancing Your Strategic GIS Governance StrategyInitiating and Advancing Your Strategic GIS Governance Strategy
Initiating and Advancing Your Strategic GIS Governance StrategySafe Software
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Safe Software
 

More from Safe Software (20)

Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers:  A Deep Dive into Serverless Spatial Data and FMECloud Frontiers:  A Deep Dive into Serverless Spatial Data and FME
Cloud Frontiers: A Deep Dive into Serverless Spatial Data and FME
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
From Event to Action:  Accelerate Your Decision Making with Real-Time AutomationFrom Event to Action:  Accelerate Your Decision Making with Real-Time Automation
From Event to Action: Accelerate Your Decision Making with Real-Time Automation
 
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry InnovationBeyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
Beyond Boundaries: Leveraging No-Code Solutions for Industry Innovation
 
Powering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data StreamsPowering Real-Time Decisions with Continuous Data Streams
Powering Real-Time Decisions with Continuous Data Streams
 
The Critical Role of Spatial Data in Today's Data Ecosystem
The Critical Role of Spatial Data in Today's Data EcosystemThe Critical Role of Spatial Data in Today's Data Ecosystem
The Critical Role of Spatial Data in Today's Data Ecosystem
 
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial DataCloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration WorkflowsIgniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
 
The Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and InsightThe Zero-ETL Approach: Enhancing Data Agility and Insight
The Zero-ETL Approach: Enhancing Data Agility and Insight
 
Mastering MicroStation DGN: How to Integrate CAD and GIS
Mastering MicroStation DGN: How to Integrate CAD and GISMastering MicroStation DGN: How to Integrate CAD and GIS
Mastering MicroStation DGN: How to Integrate CAD and GIS
 
Geospatial Synergy: Amplifying Efficiency with FME & Esri
Geospatial Synergy: Amplifying Efficiency with FME & EsriGeospatial Synergy: Amplifying Efficiency with FME & Esri
Geospatial Synergy: Amplifying Efficiency with FME & Esri
 
Introducing the New FME Community Webinar - Feb 21, 2024 (2).pdf
Introducing the New FME Community Webinar - Feb 21, 2024 (2).pdfIntroducing the New FME Community Webinar - Feb 21, 2024 (2).pdf
Introducing the New FME Community Webinar - Feb 21, 2024 (2).pdf
 
Breaking Barriers & Leveraging the Latest Developments in AI Technology
Breaking Barriers & Leveraging the Latest Developments in AI TechnologyBreaking Barriers & Leveraging the Latest Developments in AI Technology
Breaking Barriers & Leveraging the Latest Developments in AI Technology
 
Best Practices to Navigating Data and Application Integration for the Enterpr...
Best Practices to Navigating Data and Application Integration for the Enterpr...Best Practices to Navigating Data and Application Integration for the Enterpr...
Best Practices to Navigating Data and Application Integration for the Enterpr...
 
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial DataCloud Revolution: Exploring the New Wave of Serverless Spatial Data
Cloud Revolution: Exploring the New Wave of Serverless Spatial Data
 
New Year's Fireside Chat with Safe Software’s Founders
New Year's Fireside Chat with Safe Software’s FoundersNew Year's Fireside Chat with Safe Software’s Founders
New Year's Fireside Chat with Safe Software’s Founders
 
Taking Off with FME: Elevating Airport Operations to New Heights
Taking Off with FME: Elevating Airport Operations to New HeightsTaking Off with FME: Elevating Airport Operations to New Heights
Taking Off with FME: Elevating Airport Operations to New Heights
 
Initiating and Advancing Your Strategic GIS Governance Strategy
Initiating and Advancing Your Strategic GIS Governance StrategyInitiating and Advancing Your Strategic GIS Governance Strategy
Initiating and Advancing Your Strategic GIS Governance Strategy
 
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows Igniting Next Level Productivity with AI-Infused Data Integration Workflows
Igniting Next Level Productivity with AI-Infused Data Integration Workflows
 

Recently uploaded

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsJoaquim Jorge
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingEdi Saputra
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodJuan lago vázquez
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024The Digital Insurer
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationRadu Cotescu
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...apidays
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Principled Technologies
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)wesley chun
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024SynarionITSolutions
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...apidays
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024The Digital Insurer
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processorsdebabhi2
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businesspanagenda
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century educationjfdjdjcjdnsjd
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesBoston Institute of Analytics
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024The Digital Insurer
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherRemote DBA Services
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityPrincipled Technologies
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobeapidays
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAndrey Devyatkin
 

Recently uploaded (20)

Artificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and MythsArtificial Intelligence: Facts and Myths
Artificial Intelligence: Facts and Myths
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin WoodPolkadot JAM Slides - Token2049 - By Dr. Gavin Wood
Polkadot JAM Slides - Token2049 - By Dr. Gavin Wood
 
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
Bajaj Allianz Life Insurance Company - Insurer Innovation Award 2024
 
Scaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organizationScaling API-first – The story of a global engineering organization
Scaling API-first – The story of a global engineering organization
 
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
Apidays Singapore 2024 - Building Digital Trust in a Digital Economy by Veron...
 
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
Deploy with confidence: VMware Cloud Foundation 5.1 on next gen Dell PowerEdg...
 
Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024Top 10 Most Downloaded Games on Play Store in 2024
Top 10 Most Downloaded Games on Play Store in 2024
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024Manulife - Insurer Innovation Award 2024
Manulife - Insurer Innovation Award 2024
 
Exploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone ProcessorsExploring the Future Potential of AI-Enabled Smartphone Processors
Exploring the Future Potential of AI-Enabled Smartphone Processors
 
Why Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire businessWhy Teams call analytics are critical to your entire business
Why Teams call analytics are critical to your entire business
 
presentation ICT roal in 21st century education
presentation ICT roal in 21st century educationpresentation ICT roal in 21st century education
presentation ICT roal in 21st century education
 
HTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation StrategiesHTML Injection Attacks: Impact and Mitigation Strategies
HTML Injection Attacks: Impact and Mitigation Strategies
 
Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024Partners Life - Insurer Innovation Award 2024
Partners Life - Insurer Innovation Award 2024
 
Strategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a FresherStrategies for Landing an Oracle DBA Job as a Fresher
Strategies for Landing an Oracle DBA Job as a Fresher
 
Boost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivityBoost PC performance: How more available memory can improve productivity
Boost PC performance: How more available memory can improve productivity
 
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
AWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of TerraformAWS Community Day CPH - Three problems of Terraform
AWS Community Day CPH - Three problems of Terraform
 

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.