Skip to content
  • Home
  • About
    • Privacy Policy
    • Disclaimer
    • Terms and Conditions
  • Contact Us
Geoscience.blogYour Compass for Earth's Wonders & Outdoor Adventures
  • Home
  • About
    • Privacy Policy
    • Disclaimer
    • Terms and Conditions
  • Contact Us
Posted on December 24, 2022 (Updated on July 22, 2025)

Show only polygon of interest in Atlas, QGIS

Hiking & Activities

Zoom In: Showing Only Your Area of Interest in QGIS Atlas

QGIS, or Quantum GIS if you’re feeling formal, is a fantastic open-source tool for playing around with maps and spatial data. Think of it as your digital cartographer’s Swiss Army knife. One of its coolest tricks is the Atlas tool. Ever needed to churn out a whole series of maps, all styled the same but each spotlighting a different area? Atlas is your friend. It lets you automatically generate these maps using a coverage layer – basically, a layer that tells QGIS what areas to focus on. But here’s the thing: sometimes you only want to highlight that specific area, masking out everything else. It’s like putting a spotlight on center stage. So, how do you do it? Let’s dive in.

Cracking the Atlas Code

The QGIS Atlas is built right in, so no need to go hunting for plugins. It’s all about creating map books from a shapefile or spatial dataset. You pick a layer with geometries – think of it as your guide – and Atlas cleverly adjusts the map view to each shape in that layer. Trust me, this is a huge time-saver. Instead of manually creating hundreds of maps, you can let Atlas do the heavy lifting in minutes.

Method 1: The “Inverted Polygons” Magic Trick

Here’s a simple way to focus on your polygon of interest: the “Inverted Polygons” style. It’s like saying, “show me everything except this,” effectively masking out the unwanted areas.

Here’s the breakdown:

  • Load Up: First, get all your layers into QGIS, including that all-important polygon layer defining your area of interest.
  • Style Swap: Double-click the polygon layer in the Layers panel to bring up its properties.
  • Find the Symbology Tab: Click on it.
  • Change the Style: In the dropdown, switch from “Single Symbol” to “Inverted Polygons.”
  • Customize the Mask: Now, tweak the style of the inverted polygon. I usually go for a white fill to completely hide the surrounding areas. And to get rid of that annoying boundary line, set the stroke style to “No Pen.”
  • Apply the Changes: Hit “Apply,” then “OK,” and boom! Only your chosen polygon is visible, the rest is masked away.
  • Method 2: Rule-Based Styling – Get Fancy with Atlas Feature ID

    Want a bit more control? Try rule-based styling combined with the Atlas feature ID. This is where things get interesting, especially when you’re using the Atlas tool.

    Let’s break it down:

  • Atlas Setup: In the print layout (where you design your final map), tell Atlas to use your polygon layer as the coverage layer.

  • Layer Properties: Back in the main QGIS window, double-click your polygon layer to open its properties.

  • Rule-Based Time: Head to the “Symbology” tab and pick “Rule-based” from the dropdown.

  • Create the Rules: This is where the magic happens. You’ll need two rules:

    • Rule 1: The Star of the Show (Active Feature): This rule styles the polygon Atlas is currently focused on. Set the filter expression to “ogc_fid” = @atlas_featureid. Replace “ogc_fid” with the actual field name holding your feature IDs. Style this polygon however you like – make it stand out!
    • Rule 2: The Supporting Cast (Other Features): This rule styles all the other polygons. Set the filter expression to “ogc_fid” <> @atlas_featureid. The <> means “not equal to.” Make this style empty or transparent to hide these polygons completely.
  • Apply and Admire: Click “Apply” and “OK.”

  • Now, as Atlas steps through each polygon, only the current one will be visible. Pretty neat, huh?

    Method 3: Clipping with Atlas Feature – The Modern Way (Newer QGIS)

    If you’re rocking a newer version of QGIS, you’re in luck! There’s a built-in clipping feature right in the Atlas tool. It’s a super direct way to clip your map layers to the current Atlas feature.

    Here’s how it works:

  • Atlas Setup (Again): Yep, same as before. Set up Atlas using your polygon layer as the coverage layer.

  • Enable Clipping: In the print layout, select your map item and look for the “Clipping” section in its “Item Properties.”

  • Configure the Clip: Turn on clipping and choose “Clip to Atlas feature.” You might also see options like:

    • Clip During Render Only: This is a faster clip, applied as the map is drawn.
    • Clip Feature Before Render: This clips the data before drawing, which can be more accurate.
    • Layer Selection: Choose which layers you want to clip.
  • Fine-Tune: Adjust any other settings, like whether labels should be forced inside the Atlas feature.

  • Extra Tips and Tricks

    • Data-Driven Visibility: Want even more control? Use data-driven overrides to control layer visibility within Atlas. Add a field to your coverage layer that specifies which layers should be visible for each feature.
    • Expression Power: Expressions are your friend! Use them in labels and styles to dynamically display info about the current Atlas feature. Show the polygon’s name, ID, whatever you need.
    • Performance Matters: Big datasets can slow things down. Simplify your data or use spatial indexes to speed things up.
    • No Data, No Problems: When clipping rasters (images), define a “No Data” value to avoid weird artifacts.
    • CRS Harmony: Make sure all your layers are using the same Coordinate Reference System (CRS) to avoid alignment headaches.

    With these techniques in your toolbox, you’ll be whipping up stunning QGIS Atlases that highlight exactly what you want, every time. Whether you’re into inverted polygons, rule-based styling, or the built-in clipping, QGIS gives you the power to create amazing maps. Now go get mapping!

    You may also like

    Field Gear Repair: Your Ultimate Guide to Fixing Tears On The Go

    Outdoor Knife Sharpening: Your Ultimate Guide to a Razor-Sharp Edge

    Don’t Get Lost: How to Care for Your Compass & Test its Accuracy

    Categories

    • Climate & Climate Zones
    • Data & Analysis
    • Earth Science
    • Energy & Resources
    • General Knowledge & Education
    • Geology & Landform
    • Hiking & Activities
    • Historical Aspects
    • Human Impact
    • Modeling & Prediction
    • Natural Environments
    • Outdoor Gear
    • Polar & Ice Regions
    • Regional Specifics
    • Safety & Hazards
    • Software & Programming
    • Space & Navigation
    • Storage
    • Water Bodies
    • Weather & Forecasts
    • Wildlife & Biology

    New Posts

    • How to Wash a Waterproof Jacket Without Ruining It: The Complete Guide
    • Field Gear Repair: Your Ultimate Guide to Fixing Tears On The Go
    • Outdoor Knife Sharpening: Your Ultimate Guide to a Razor-Sharp Edge
    • Don’t Get Lost: How to Care for Your Compass & Test its Accuracy
    • Your Complete Guide to Cleaning Hiking Poles After a Rainy Hike
    • Headlamp Battery Life: Pro Guide to Extending Your Rechargeable Lumens
    • Post-Trip Protocol: Your Guide to Drying Camping Gear & Preventing Mold
    • Backcountry Repair Kit: Your Essential Guide to On-Trail Gear Fixes
    • Dehydrated Food Storage: Pro Guide for Long-Term Adventure Meals
    • Hiking Water Filter Care: Pro Guide to Cleaning & Maintenance
    • Protecting Your Treasures: Safely Transporting Delicate Geological Samples
    • How to Clean Binoculars Professionally: A Scratch-Free Guide
    • Adventure Gear Organization: Tame Your Closet for Fast Access
    • No More Rust: Pro Guide to Protecting Your Outdoor Metal Tools

    Categories

    • Home
    • About
    • Privacy Policy
    • Disclaimer
    • Terms and Conditions
    • Contact Us
    • English
    • Deutsch
    • Français

    Copyright (с) geoscience.blog 2025

    We use cookies on our website to give you the most relevant experience by remembering your preferences and repeat visits. By clicking “Accept”, you consent to the use of ALL the cookies.
    Do not sell my personal information.
    Cookie SettingsAccept
    Manage consent

    Privacy Overview

    This website uses cookies to improve your experience while you navigate through the website. Out of these, the cookies that are categorized as necessary are stored on your browser as they are essential for the working of basic functionalities of the website. We also use third-party cookies that help us analyze and understand how you use this website. These cookies will be stored in your browser only with your consent. You also have the option to opt-out of these cookies. But opting out of some of these cookies may affect your browsing experience.
    Necessary
    Always Enabled
    Necessary cookies are absolutely essential for the website to function properly. These cookies ensure basic functionalities and security features of the website, anonymously.
    CookieDurationDescription
    cookielawinfo-checkbox-analytics11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Analytics".
    cookielawinfo-checkbox-functional11 monthsThe cookie is set by GDPR cookie consent to record the user consent for the cookies in the category "Functional".
    cookielawinfo-checkbox-necessary11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookies is used to store the user consent for the cookies in the category "Necessary".
    cookielawinfo-checkbox-others11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Other.
    cookielawinfo-checkbox-performance11 monthsThis cookie is set by GDPR Cookie Consent plugin. The cookie is used to store the user consent for the cookies in the category "Performance".
    viewed_cookie_policy11 monthsThe cookie is set by the GDPR Cookie Consent plugin and is used to store whether or not user has consented to the use of cookies. It does not store any personal data.
    Functional
    Functional cookies help to perform certain functionalities like sharing the content of the website on social media platforms, collect feedbacks, and other third-party features.
    Performance
    Performance cookies are used to understand and analyze the key performance indexes of the website which helps in delivering a better user experience for the visitors.
    Analytics
    Analytical cookies are used to understand how visitors interact with the website. These cookies help provide information on metrics the number of visitors, bounce rate, traffic source, etc.
    Advertisement
    Advertisement cookies are used to provide visitors with relevant ads and marketing campaigns. These cookies track visitors across websites and collect information to provide customized ads.
    Others
    Other uncategorized cookies are those that are being analyzed and have not been classified into a category as yet.
    SAVE & ACCEPT