Crash course of using QGIS to update distribution maps

I was requested to make a tutorial of how to update distribution maps in prep for the many bird taxonomy changes that were published a few days ago. I will be walking you through this process using QGIS.

Step 1: Locate the Species You are Curating

I am going to be using the Masked Flowerpiercer (Diglossa cyanea) split as my example. Start by clicking the “Edit Taxon” button under the “Taxonomy” tab.

Step 2: Click “Edit Taxon Range” at the bottom of the page

Step 3: Download kml file before the taxon file. All you need to do is click the link to download.

Step 4: Download and Open QGIS

Download available here: Spatial without Compromise · QGIS

Note: Google maps may not be automatically installed with QGIS installation. To add Google maps, do the following steps:

  • Click “Plugins” in your menu
  • Click “Manage and Install Plugins”
  • Search and install “NextGIS QuickMapServices” and this will allow Google Maps to be used.
  • Open up a new project and add your base map (I like Google Terrain)

Step 5: Add your shapefiles and kml

  • 1a: Click on “New Shapefile Layer” in the marked red box.
  • 1b: Name the file “Edit”
  • 1c: Select “Polygon” under the “Geometry Type” dropdown and click “OK”.
  • 2a. Click on “Data Source Manager”
  • 2b. Open the kml you downloaded from iNaturalist

Step 6: Buffer the kml distribution

The split won’t work until you buffer the original kml. You can do that by following these steps:

  • 6a: Click on “Vector”

  • 6b: Go to “Geoprocessing Tools” in the dropdown; should be the first option

  • 6c: Click “Buffer”; should be the first option right of the dropdown

  • 6d: Ensure the input is the kml; should be denoted as a number as seen in the photo

  • 6e: “Distance” is automatically inputted as “10.00000”, make sure that you remove the 1 and make it 0, or the result will show a heavily inflated map.

Step 7: Start creating the maps

  • 1: Click on “Edit”. That lets the system know you are editing that file.
  • 2: Click on the “Toggle Editing” which is a yellow pencil to the right of the two red pencils
  • 3a: Start clicking around the map and completely envelope the distribution to want to clip off. In the photo, I clicked completely around the distribution of the Whistling Masked-Flowerpiercer. The polygon will be a translucent red with dotted lines. When you double-click, you now have a polygon the same color as your “Edit” layer!
  • 3b: Click “Vector” and then “Geoprocessing Tools”
  • 4: Click “Intersection”

Step 8: Completing the Intersection

  1. Make the input layer “Edit”
  2. Make the output layer “Buffer”
  3. Click “Run”
  4. Congrats! You just created the Whistling Masked-Flowerpiercer map!

Step 9: Use difference to clip out remaining species

Step 10: Run difference function

  1. Make “Buffered” your input layer
  2. Make “Intersection” (or the Whistling Masked-Flowerpiercer) as your output layer
  3. Click “Run”
  4. Congrats! You just made the Warbling Masked-Flowerpiercer distribution map!

Step 11: Export the New Maps

  1. Right-click “Difference” and select “Export”, and lastly “Save Features As…”
  2. Name your file; I am calling the “Difference” layer “Diglossa_cyanea”
  3. Click “OK”
  4. The file is now saved to the “Documents” folder in your File Explorer.
  5. Repeat for other distribution.

Step 12: Add the Maps to iNaturalist

  1. Going back to the original Masked Flowerpiercer page and click “Replace”
  2. Click “Select File”
  3. Go under “Documents” folder
  4. Find “Diglossa_cyanea”; click and upload
  5. Make sure to click “This is not an IUCN Red List range map because the map is unsuitable”. You want to select this because you edited it due to a species split.
  6. Save!
  7. Repeat for other species

Step 13: Conduct the Split as you normally would and look back at your work!

5 Likes

Thanks for this. Can you explain a bit more about the need for Step 6 (with a buffer distance of 0)? Why is this necessary?

related, i think: https://forum.inaturalist.org/t/taxon-range-map-editing/146

i think the second section in the FAQ portion of the document referenced in the link above explains this

1 Like

It might be the version of QGIS you’re using. I just tried using the intersection geoprocessing tool without buffering, and it worked, so I was able to bypass step 6. But I know when I started out editing maps a few years ago, you would have an error appear when you try to do that.

1 Like

The KML format is a bit trickier to edit than normal geospatial files, so buffering basically rebuilds it in QGIS’ memory as a file that it has more control over.

Another way is to select the polygon, press Ctrl+C, then Ctrl+Alt+V (I presume Ctrl+Option+V on a Mac), which pastes the polygon into a temporary scratch layer and does much the same thing. Additionally, to cut down on a few steps, you should be able to Toggle Editing (the pencil icon), then go to Edit> Edit Geometry> Split Features and then just draw a line between them rather than making new layers and worrying about the intersection.

For species with a gap in the distribution, and where both taxa are mapped with different polygons, you should be able to use Processing Toolbox > Vector Geometry > Multipart to Singlepart (this will also convert it to a format QGIS is happier with, like the buffer tool), select the polygons for one of the split taxa, and then go to Edit > Cut Features, then Ctrl + Alt + V (or Edit > Paste Features As > Temporary Scratch Layer), and you will have both taxa in clean new layers, and you’re at Step 11.

(though a quick caveat, im not a curator, so i haven’t tested precisely how these work with the formats iNaturalist provides and accepts, but I think it should work).

2 Likes

Thanks a lot!