SlideShare a Scribd company logo
1 of 34
QGIS Print Composer &
Advanced Atlas Production
Data Defined Overides
QGIS’ Secret Superhero?
Creating a basic atlas
Snazzing it up
http://gis.stackexchange.com/questions/152296/how-to-count-points-within-the-current-print-composer-atlas-feature-in-qgis-2-8
Creating an atlas of historic epochs for
Land Contamination desk studies.
Memory layer
CSV
Create Atlas
Coverage
select s.*, l.* from sites s
cross join landmark_layers l
Digitise
Site
Composer Settings
‘sites|’ || attribute(@atlas_feature, ‘name’)
Dynamic page items
System variables
Dynamic page items
Atlas variables
More on QGIS Variables
http://nyalldawson.net/2015/12/exploring-variables-in-qgis-2-12-part-
Atlas Results
QGIS Print Composer &
Advanced Atlas
Production
Follow Up Questions
How to filter atlas
features where there is
no relevant
background map
• You need to have a single layer showing extents of coverage for all layers
in your atlas list.
• For LandMark layers you should have a coverage grid layer per epoch. If
you are using other layers such as aerial imagery, plotting sheets or
DTMs you might have to generate extent polygons yourself (gdaltindex
maybe?).
• Once you have coverages for all of your layers:
• dissolve and merge each one so that you have a single feature on
each layer.
• Create an attribute containing the layer name.
• Merge all the layers together so you have a single layer with one
feature per layer, with an attribute identifying which layer it relates to.
Now you can alter the query used to create a virtual layer to:
select s.*, l.* from landmark_layers l
inner join merged_grids g
on l.grid_name = g.name
cross join sites s
where INTERSECTS(s.geometry, g.geometry)
So before we do the cross join between our list of layers and our
site feature we’re joining the coverage layer to the list based on
the layer name attribute.
Then we only add features to the virtual layer where the site
boundary intersects with the relevant feature on the
merged_grids layer.
Note: This query could be simplified if you permanantly joined
landmark_layers to merged_grids.
How to show adjacent
tile references on
composer
At least 3 approaches:
• Calculate adjacent values for all tiles and populate as new columns
on layer. http://gis.stackexchange.com/questions/214300/how-to-determine-neighbouring-tile-ids-in-
qgis/215179#215179
• Calculate values on the fly using label expressions and function.
• Don’t calculate anything, just style it
Calculate on the fly
1. Add a label and click Insert an
expression
2. On the Function Editor
tab create a new function
called getAdjacentTileID
and paste code from next
slide
@qgsfunction(args="auto", group='Custom')
def getAdjacentTileID(geomAtlas, gridLayerName, gridLayerAttr, tilePos, feature, parent):
gridLayer = QgsMapLayerRegistry.instance().mapLayersByName(gridLayerName)[0]
if geomAtlas is None:
return 0
if gridLayer is None:
raise Exception("Layer not found: " + gridLayerName)
rect = geomAtlas.boundingBox()
gridSize = rect.xMaximum() - rect.xMinimum()
if (tilePos.upper() not in ['N', 'S', 'E', 'W', 'NE', 'NW', 'SE', 'SW']):
raise Exception("Invalid Tile Position: " + tilePos)
atlasCentroid = geomAtlas.centroid().asPoint()
atlasX = atlasCentroid.x()
atlasY = atlasCentroid.y()
if tilePos.upper() in ['N', 'NE', 'NW']:
adjY = atlasY + gridSize
elif tilePos.upper() in ['S', 'SE', 'SW']:
adjY = atlasY - gridSize
else :
adjY = atlasY
if tilePos.upper() in ['NE', 'E', 'SE']:
adjX = atlasX + gridSize
elif tilePos.upper() in ['NW', 'W', 'SW']:
adjX = atlasX - gridSize
else :
adjX = atlasX
adjGeom = QgsGeometry.fromPoint(QgsPoint(adjX,adjY))
for f in gridLayer.getFeatures():
if f.geometry().intersects(adjGeom):
return f[gridLayerAttr]
return ' '
3. On the expression tab enter:
getAdjacentTileID(@atlas_geometry, ‘Grid’, ‘id’, ‘N’)
Where Grid is the name of the atlas layer, id is the attribute to use
for the label and N is the adjacent grid position. Create labels for
values as needed (valid options are N, E, S, W, NE, NW, SE, SW)
● Will only work on square grids
but could be modified for other
shapes.
● Provides flexibility to place
labels anywhere or use values
within other labels
● Means values are calculated
every time atlas is run vs
calculating once and storing
with data (downside)
Styling
● Rule based styling for atlas layer, shades out all but current atlas feature
● Rule based labeling labels all BUT the atlas feature
Ensure map frame is square and set margin around feature
to 10%
● No calculations needed
and no changes to any
data.
● QGIS styling and labelling
options give lots of
flexibility but more limiting
than calculating label
values
Any questions please contact me on
t.colley@npt.gov.uk

More Related Content

Viewers also liked

Certificate on Canadian Banking smit
Certificate on Canadian Banking smitCertificate on Canadian Banking smit
Certificate on Canadian Banking smitsmit modh
 
Appreciation
AppreciationAppreciation
Appreciationsmit modh
 
QGIS LTR is making the world a better place by Saber Razmjooei
QGIS LTR is making the world a better place by Saber RazmjooeiQGIS LTR is making the world a better place by Saber Razmjooei
QGIS LTR is making the world a better place by Saber RazmjooeiShaun Lewis
 
Dr Richard Fry - Using R as a GIS
Dr Richard Fry - Using R as a GISDr Richard Fry - Using R as a GIS
Dr Richard Fry - Using R as a GISShaun Lewis
 
QRAS: SIMPLE TOOL FOR HEC-RAS GEOMETRY DATA PREPARATION A S QGIS CAN BECOME A...
QRAS: SIMPLE TOOL FOR HEC-RAS GEOMETRY DATA PREPARATION A S QGIS CAN BECOME A...QRAS: SIMPLE TOOL FOR HEC-RAS GEOMETRY DATA PREPARATION A S QGIS CAN BECOME A...
QRAS: SIMPLE TOOL FOR HEC-RAS GEOMETRY DATA PREPARATION A S QGIS CAN BECOME A...pierluigi de rosa
 
Carrera profesional docente
Carrera profesional docente Carrera profesional docente
Carrera profesional docente Camila Redel
 
Case Study Presentation
Case Study PresentationCase Study Presentation
Case Study Presentationsophieekhoo
 
Mapping Experiences: From Insight To Action
Mapping Experiences: From Insight To ActionMapping Experiences: From Insight To Action
Mapping Experiences: From Insight To ActionJim Kalbach
 
Impact of fashion on youth!
Impact of fashion on youth!Impact of fashion on youth!
Impact of fashion on youth!Khadijah Sohail
 
Local and indigenous knowledge for community resilience: Hydro-meteorological...
Local and indigenous knowledge for community resilience: Hydro-meteorological...Local and indigenous knowledge for community resilience: Hydro-meteorological...
Local and indigenous knowledge for community resilience: Hydro-meteorological...Noralene Uy
 
Oates - Multiverse Press Tentative Fundraising Plan 2017
Oates - Multiverse Press Tentative Fundraising Plan 2017Oates - Multiverse Press Tentative Fundraising Plan 2017
Oates - Multiverse Press Tentative Fundraising Plan 2017Scott Oates
 

Viewers also liked (16)

Certificate on Canadian Banking smit
Certificate on Canadian Banking smitCertificate on Canadian Banking smit
Certificate on Canadian Banking smit
 
Appreciation
AppreciationAppreciation
Appreciation
 
Trasfondo rojo-1
Trasfondo rojo-1Trasfondo rojo-1
Trasfondo rojo-1
 
QGIS LTR is making the world a better place by Saber Razmjooei
QGIS LTR is making the world a better place by Saber RazmjooeiQGIS LTR is making the world a better place by Saber Razmjooei
QGIS LTR is making the world a better place by Saber Razmjooei
 
ANU CV
ANU CVANU CV
ANU CV
 
El llamado a la santidad
El llamado a la santidadEl llamado a la santidad
El llamado a la santidad
 
OCJP CERTIFICATE
OCJP CERTIFICATEOCJP CERTIFICATE
OCJP CERTIFICATE
 
Dr Richard Fry - Using R as a GIS
Dr Richard Fry - Using R as a GISDr Richard Fry - Using R as a GIS
Dr Richard Fry - Using R as a GIS
 
QRAS: SIMPLE TOOL FOR HEC-RAS GEOMETRY DATA PREPARATION A S QGIS CAN BECOME A...
QRAS: SIMPLE TOOL FOR HEC-RAS GEOMETRY DATA PREPARATION A S QGIS CAN BECOME A...QRAS: SIMPLE TOOL FOR HEC-RAS GEOMETRY DATA PREPARATION A S QGIS CAN BECOME A...
QRAS: SIMPLE TOOL FOR HEC-RAS GEOMETRY DATA PREPARATION A S QGIS CAN BECOME A...
 
Carrera profesional docente
Carrera profesional docente Carrera profesional docente
Carrera profesional docente
 
Case Study Presentation
Case Study PresentationCase Study Presentation
Case Study Presentation
 
Mapping Experiences: From Insight To Action
Mapping Experiences: From Insight To ActionMapping Experiences: From Insight To Action
Mapping Experiences: From Insight To Action
 
Impact of fashion on youth!
Impact of fashion on youth!Impact of fashion on youth!
Impact of fashion on youth!
 
Kruskal Wall Test
Kruskal Wall TestKruskal Wall Test
Kruskal Wall Test
 
Local and indigenous knowledge for community resilience: Hydro-meteorological...
Local and indigenous knowledge for community resilience: Hydro-meteorological...Local and indigenous knowledge for community resilience: Hydro-meteorological...
Local and indigenous knowledge for community resilience: Hydro-meteorological...
 
Oates - Multiverse Press Tentative Fundraising Plan 2017
Oates - Multiverse Press Tentative Fundraising Plan 2017Oates - Multiverse Press Tentative Fundraising Plan 2017
Oates - Multiverse Press Tentative Fundraising Plan 2017
 

Similar to QGIS Print Composer & Advanced Atlas Production

The Web map stack on Django
The Web map stack on DjangoThe Web map stack on Django
The Web map stack on DjangoPaul Smith
 
Introducing CSS Grid Layout
Introducing CSS Grid LayoutIntroducing CSS Grid Layout
Introducing CSS Grid LayoutRachel Andrew
 
AEA Chicago CSS Grid Layout
AEA Chicago CSS Grid LayoutAEA Chicago CSS Grid Layout
AEA Chicago CSS Grid LayoutRachel Andrew
 
CSS Grid Layout for Frontend NE
CSS Grid Layout for Frontend NECSS Grid Layout for Frontend NE
CSS Grid Layout for Frontend NERachel Andrew
 
Start Using CSS Grid Layout Today - RuhrJS
Start Using CSS Grid Layout Today - RuhrJSStart Using CSS Grid Layout Today - RuhrJS
Start Using CSS Grid Layout Today - RuhrJSRachel Andrew
 
CSS Grid Layout - All Things Open
CSS Grid Layout - All Things OpenCSS Grid Layout - All Things Open
CSS Grid Layout - All Things OpenRachel Andrew
 
CSS Grid Layout - An Event Apart Orlando
CSS Grid Layout - An Event Apart OrlandoCSS Grid Layout - An Event Apart Orlando
CSS Grid Layout - An Event Apart OrlandoRachel Andrew
 
CSS Grid Layout: An Event Apart Boston 2016
CSS Grid Layout: An Event Apart Boston 2016CSS Grid Layout: An Event Apart Boston 2016
CSS Grid Layout: An Event Apart Boston 2016Rachel Andrew
 
ArcGIS API for Javascript Tutorial
ArcGIS API for Javascript TutorialArcGIS API for Javascript Tutorial
ArcGIS API for Javascript TutorialMohammed Mahmoud
 
Render Conf: Start using CSS Grid Layout Today
Render Conf: Start using CSS Grid Layout TodayRender Conf: Start using CSS Grid Layout Today
Render Conf: Start using CSS Grid Layout TodayRachel Andrew
 
Graph computation
Graph computationGraph computation
Graph computationSigmoid
 
Talk Web Design: Get Ready For CSS Grid Layout
Talk Web Design: Get Ready For CSS Grid LayoutTalk Web Design: Get Ready For CSS Grid Layout
Talk Web Design: Get Ready For CSS Grid LayoutRachel Andrew
 
CSS Grid Layout. Specification overview. Implementation status and roadmap (B...
CSS Grid Layout. Specification overview. Implementation status and roadmap (B...CSS Grid Layout. Specification overview. Implementation status and roadmap (B...
CSS Grid Layout. Specification overview. Implementation status and roadmap (B...Igalia
 
03 sajjad ali -qgis working with raster
03 sajjad ali -qgis working with raster03 sajjad ali -qgis working with raster
03 sajjad ali -qgis working with rasterTOUSEEF3347
 
Status of CSS Grid Layout Implementation (BlinkOn 6)
Status of CSS Grid Layout Implementation (BlinkOn 6)Status of CSS Grid Layout Implementation (BlinkOn 6)
Status of CSS Grid Layout Implementation (BlinkOn 6)Igalia
 
Data Visualization With R: Learn To Modify Title, Axis Labels & Range
Data Visualization With R: Learn To Modify Title, Axis Labels & RangeData Visualization With R: Learn To Modify Title, Axis Labels & Range
Data Visualization With R: Learn To Modify Title, Axis Labels & RangeRsquared Academy
 

Similar to QGIS Print Composer & Advanced Atlas Production (20)

The Web map stack on Django
The Web map stack on DjangoThe Web map stack on Django
The Web map stack on Django
 
Introducing CSS Grid Layout
Introducing CSS Grid LayoutIntroducing CSS Grid Layout
Introducing CSS Grid Layout
 
AEA Chicago CSS Grid Layout
AEA Chicago CSS Grid LayoutAEA Chicago CSS Grid Layout
AEA Chicago CSS Grid Layout
 
CSS Grid Layout for Frontend NE
CSS Grid Layout for Frontend NECSS Grid Layout for Frontend NE
CSS Grid Layout for Frontend NE
 
Ex32018.pdf
Ex32018.pdfEx32018.pdf
Ex32018.pdf
 
Start Using CSS Grid Layout Today - RuhrJS
Start Using CSS Grid Layout Today - RuhrJSStart Using CSS Grid Layout Today - RuhrJS
Start Using CSS Grid Layout Today - RuhrJS
 
CSS Grid Layout - All Things Open
CSS Grid Layout - All Things OpenCSS Grid Layout - All Things Open
CSS Grid Layout - All Things Open
 
CSS Grid Layout
CSS Grid LayoutCSS Grid Layout
CSS Grid Layout
 
CSS Grid Layout - An Event Apart Orlando
CSS Grid Layout - An Event Apart OrlandoCSS Grid Layout - An Event Apart Orlando
CSS Grid Layout - An Event Apart Orlando
 
CSS Grid Layout: An Event Apart Boston 2016
CSS Grid Layout: An Event Apart Boston 2016CSS Grid Layout: An Event Apart Boston 2016
CSS Grid Layout: An Event Apart Boston 2016
 
ArcGIS API for Javascript Tutorial
ArcGIS API for Javascript TutorialArcGIS API for Javascript Tutorial
ArcGIS API for Javascript Tutorial
 
Render Conf: Start using CSS Grid Layout Today
Render Conf: Start using CSS Grid Layout TodayRender Conf: Start using CSS Grid Layout Today
Render Conf: Start using CSS Grid Layout Today
 
17523630.ppt
17523630.ppt17523630.ppt
17523630.ppt
 
CSS Grid Layout
CSS Grid LayoutCSS Grid Layout
CSS Grid Layout
 
Graph computation
Graph computationGraph computation
Graph computation
 
Talk Web Design: Get Ready For CSS Grid Layout
Talk Web Design: Get Ready For CSS Grid LayoutTalk Web Design: Get Ready For CSS Grid Layout
Talk Web Design: Get Ready For CSS Grid Layout
 
CSS Grid Layout. Specification overview. Implementation status and roadmap (B...
CSS Grid Layout. Specification overview. Implementation status and roadmap (B...CSS Grid Layout. Specification overview. Implementation status and roadmap (B...
CSS Grid Layout. Specification overview. Implementation status and roadmap (B...
 
03 sajjad ali -qgis working with raster
03 sajjad ali -qgis working with raster03 sajjad ali -qgis working with raster
03 sajjad ali -qgis working with raster
 
Status of CSS Grid Layout Implementation (BlinkOn 6)
Status of CSS Grid Layout Implementation (BlinkOn 6)Status of CSS Grid Layout Implementation (BlinkOn 6)
Status of CSS Grid Layout Implementation (BlinkOn 6)
 
Data Visualization With R: Learn To Modify Title, Axis Labels & Range
Data Visualization With R: Learn To Modify Title, Axis Labels & RangeData Visualization With R: Learn To Modify Title, Axis Labels & Range
Data Visualization With R: Learn To Modify Title, Axis Labels & Range
 

More from Shaun Lewis

Dr Crispin Cooper - QGIS Plugin ‘sDNA’
Dr Crispin Cooper - QGIS Plugin ‘sDNA’Dr Crispin Cooper - QGIS Plugin ‘sDNA’
Dr Crispin Cooper - QGIS Plugin ‘sDNA’Shaun Lewis
 
Steven Kingston - OS open data – visualisation and gazetteer searching with q...
Steven Kingston - OS open data – visualisation and gazetteer searching with q...Steven Kingston - OS open data – visualisation and gazetteer searching with q...
Steven Kingston - OS open data – visualisation and gazetteer searching with q...Shaun Lewis
 
David Lovelace - Analysing, displaying and sharing historic landscapes from f...
David Lovelace - Analysing, displaying and sharing historic landscapes from f...David Lovelace - Analysing, displaying and sharing historic landscapes from f...
David Lovelace - Analysing, displaying and sharing historic landscapes from f...Shaun Lewis
 
Processing Landsat 8 Multi-Spectral Images with GRASS Tools & the potential o...
Processing Landsat 8 Multi-Spectral Images with GRASS Tools & the potential o...Processing Landsat 8 Multi-Spectral Images with GRASS Tools & the potential o...
Processing Landsat 8 Multi-Spectral Images with GRASS Tools & the potential o...Shaun Lewis
 
Using Data Services in QGIS by Richard Evans
Using Data Services in QGIS by Richard EvansUsing Data Services in QGIS by Richard Evans
Using Data Services in QGIS by Richard EvansShaun Lewis
 
Making beautiful maps with Mapbox Studio by Charley Glynn
Making beautiful maps with Mapbox Studio by Charley GlynnMaking beautiful maps with Mapbox Studio by Charley Glynn
Making beautiful maps with Mapbox Studio by Charley GlynnShaun Lewis
 
Making the Case for QGIS by Neil Benny
Making the Case for QGIS by Neil BennyMaking the Case for QGIS by Neil Benny
Making the Case for QGIS by Neil BennyShaun Lewis
 
LIDAR-derived DTM for archaeology and landscape history research some recent ...
LIDAR-derived DTM for archaeology and landscape history research some recent ...LIDAR-derived DTM for archaeology and landscape history research some recent ...
LIDAR-derived DTM for archaeology and landscape history research some recent ...Shaun Lewis
 

More from Shaun Lewis (8)

Dr Crispin Cooper - QGIS Plugin ‘sDNA’
Dr Crispin Cooper - QGIS Plugin ‘sDNA’Dr Crispin Cooper - QGIS Plugin ‘sDNA’
Dr Crispin Cooper - QGIS Plugin ‘sDNA’
 
Steven Kingston - OS open data – visualisation and gazetteer searching with q...
Steven Kingston - OS open data – visualisation and gazetteer searching with q...Steven Kingston - OS open data – visualisation and gazetteer searching with q...
Steven Kingston - OS open data – visualisation and gazetteer searching with q...
 
David Lovelace - Analysing, displaying and sharing historic landscapes from f...
David Lovelace - Analysing, displaying and sharing historic landscapes from f...David Lovelace - Analysing, displaying and sharing historic landscapes from f...
David Lovelace - Analysing, displaying and sharing historic landscapes from f...
 
Processing Landsat 8 Multi-Spectral Images with GRASS Tools & the potential o...
Processing Landsat 8 Multi-Spectral Images with GRASS Tools & the potential o...Processing Landsat 8 Multi-Spectral Images with GRASS Tools & the potential o...
Processing Landsat 8 Multi-Spectral Images with GRASS Tools & the potential o...
 
Using Data Services in QGIS by Richard Evans
Using Data Services in QGIS by Richard EvansUsing Data Services in QGIS by Richard Evans
Using Data Services in QGIS by Richard Evans
 
Making beautiful maps with Mapbox Studio by Charley Glynn
Making beautiful maps with Mapbox Studio by Charley GlynnMaking beautiful maps with Mapbox Studio by Charley Glynn
Making beautiful maps with Mapbox Studio by Charley Glynn
 
Making the Case for QGIS by Neil Benny
Making the Case for QGIS by Neil BennyMaking the Case for QGIS by Neil Benny
Making the Case for QGIS by Neil Benny
 
LIDAR-derived DTM for archaeology and landscape history research some recent ...
LIDAR-derived DTM for archaeology and landscape history research some recent ...LIDAR-derived DTM for archaeology and landscape history research some recent ...
LIDAR-derived DTM for archaeology and landscape history research some recent ...
 

Recently uploaded

Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceanilsa9823
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsArshad QA
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Steffen Staab
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionSolGuruz
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxbodapatigopi8531
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️Delhi Call girls
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providermohitmore19
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...panagenda
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsAlberto González Trastoy
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVshikhaohhpro
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxComplianceQuest1
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfkalichargn70th171
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️anilsa9823
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerThousandEyes
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comFatema Valibhai
 

Recently uploaded (20)

Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female serviceCALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
CALL ON ➥8923113531 🔝Call Girls Badshah Nagar Lucknow best Female service
 
Software Quality Assurance Interview Questions
Software Quality Assurance Interview QuestionsSoftware Quality Assurance Interview Questions
Software Quality Assurance Interview Questions
 
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
Shapes for Sharing between Graph Data Spaces - and Epistemic Querying of RDF-...
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Diamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with PrecisionDiamond Application Development Crafting Solutions with Precision
Diamond Application Development Crafting Solutions with Precision
 
Hand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptxHand gesture recognition PROJECT PPT.pptx
Hand gesture recognition PROJECT PPT.pptx
 
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
call girls in Vaishali (Ghaziabad) 🔝 >༒8448380779 🔝 genuine Escort Service 🔝✔️✔️
 
TECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service providerTECUNIQUE: Success Stories: IT Service provider
TECUNIQUE: Success Stories: IT Service provider
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
W01_panagenda_Navigating-the-Future-with-The-Hitchhikers-Guide-to-Notes-and-D...
 
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time ApplicationsUnveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
Unveiling the Tech Salsa of LAMs with Janus in Real-Time Applications
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Optimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTVOptimizing AI for immediate response in Smart CCTV
Optimizing AI for immediate response in Smart CCTV
 
A Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docxA Secure and Reliable Document Management System is Essential.docx
A Secure and Reliable Document Management System is Essential.docx
 
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdfLearn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
Learn the Fundamentals of XCUITest Framework_ A Beginner's Guide.pdf
 
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS LiveVip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
Vip Call Girls Noida ➡️ Delhi ➡️ 9999965857 No Advance 24HRS Live
 
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online  ☂️
CALL ON ➥8923113531 🔝Call Girls Kakori Lucknow best sexual service Online ☂️
 
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected WorkerHow To Troubleshoot Collaboration Apps for the Modern Connected Worker
How To Troubleshoot Collaboration Apps for the Modern Connected Worker
 
HR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.comHR Software Buyers Guide in 2024 - HRSoftware.com
HR Software Buyers Guide in 2024 - HRSoftware.com
 

QGIS Print Composer & Advanced Atlas Production

  • 1. QGIS Print Composer & Advanced Atlas Production
  • 2.
  • 3. Data Defined Overides QGIS’ Secret Superhero?
  • 4.
  • 6.
  • 7.
  • 9.
  • 10.
  • 12.
  • 13. Creating an atlas of historic epochs for Land Contamination desk studies.
  • 15. Create Atlas Coverage select s.*, l.* from sites s cross join landmark_layers l
  • 17. Composer Settings ‘sites|’ || attribute(@atlas_feature, ‘name’)
  • 20. More on QGIS Variables http://nyalldawson.net/2015/12/exploring-variables-in-qgis-2-12-part-
  • 22.
  • 23. QGIS Print Composer & Advanced Atlas Production Follow Up Questions
  • 24. How to filter atlas features where there is no relevant background map
  • 25. • You need to have a single layer showing extents of coverage for all layers in your atlas list. • For LandMark layers you should have a coverage grid layer per epoch. If you are using other layers such as aerial imagery, plotting sheets or DTMs you might have to generate extent polygons yourself (gdaltindex maybe?). • Once you have coverages for all of your layers: • dissolve and merge each one so that you have a single feature on each layer. • Create an attribute containing the layer name. • Merge all the layers together so you have a single layer with one feature per layer, with an attribute identifying which layer it relates to.
  • 26. Now you can alter the query used to create a virtual layer to: select s.*, l.* from landmark_layers l inner join merged_grids g on l.grid_name = g.name cross join sites s where INTERSECTS(s.geometry, g.geometry) So before we do the cross join between our list of layers and our site feature we’re joining the coverage layer to the list based on the layer name attribute. Then we only add features to the virtual layer where the site boundary intersects with the relevant feature on the merged_grids layer. Note: This query could be simplified if you permanantly joined landmark_layers to merged_grids.
  • 27. How to show adjacent tile references on composer
  • 28. At least 3 approaches: • Calculate adjacent values for all tiles and populate as new columns on layer. http://gis.stackexchange.com/questions/214300/how-to-determine-neighbouring-tile-ids-in- qgis/215179#215179 • Calculate values on the fly using label expressions and function. • Don’t calculate anything, just style it
  • 29. Calculate on the fly 1. Add a label and click Insert an expression 2. On the Function Editor tab create a new function called getAdjacentTileID and paste code from next slide
  • 30. @qgsfunction(args="auto", group='Custom') def getAdjacentTileID(geomAtlas, gridLayerName, gridLayerAttr, tilePos, feature, parent): gridLayer = QgsMapLayerRegistry.instance().mapLayersByName(gridLayerName)[0] if geomAtlas is None: return 0 if gridLayer is None: raise Exception("Layer not found: " + gridLayerName) rect = geomAtlas.boundingBox() gridSize = rect.xMaximum() - rect.xMinimum() if (tilePos.upper() not in ['N', 'S', 'E', 'W', 'NE', 'NW', 'SE', 'SW']): raise Exception("Invalid Tile Position: " + tilePos) atlasCentroid = geomAtlas.centroid().asPoint() atlasX = atlasCentroid.x() atlasY = atlasCentroid.y() if tilePos.upper() in ['N', 'NE', 'NW']: adjY = atlasY + gridSize elif tilePos.upper() in ['S', 'SE', 'SW']: adjY = atlasY - gridSize else : adjY = atlasY if tilePos.upper() in ['NE', 'E', 'SE']: adjX = atlasX + gridSize elif tilePos.upper() in ['NW', 'W', 'SW']: adjX = atlasX - gridSize else : adjX = atlasX adjGeom = QgsGeometry.fromPoint(QgsPoint(adjX,adjY)) for f in gridLayer.getFeatures(): if f.geometry().intersects(adjGeom): return f[gridLayerAttr] return ' '
  • 31. 3. On the expression tab enter: getAdjacentTileID(@atlas_geometry, ‘Grid’, ‘id’, ‘N’) Where Grid is the name of the atlas layer, id is the attribute to use for the label and N is the adjacent grid position. Create labels for values as needed (valid options are N, E, S, W, NE, NW, SE, SW) ● Will only work on square grids but could be modified for other shapes. ● Provides flexibility to place labels anywhere or use values within other labels ● Means values are calculated every time atlas is run vs calculating once and storing with data (downside)
  • 32. Styling ● Rule based styling for atlas layer, shades out all but current atlas feature ● Rule based labeling labels all BUT the atlas feature
  • 33. Ensure map frame is square and set margin around feature to 10% ● No calculations needed and no changes to any data. ● QGIS styling and labelling options give lots of flexibility but more limiting than calculating label values
  • 34. Any questions please contact me on t.colley@npt.gov.uk