Happy New Year!

Happy New Year

Happy New Year!

Psst: Want to know how the above map was made? It’s done in QGIS with Natural Earth land data styled with a seamless raster fill of balloons from an istockphoto jpeg added to a Natural Earth ocean raster (OB_50M to be specific) that is colorized with a blue hue. All in the Robinson projection.



2018 was the craziest, busiest year around here! PetersonGIS did a lot over the course of 2018 including publishing the updated version of QGIS Map Design, creating lots of vector tile map designs, writing a few blog posts, working with salmon field databases, creating map designs that are almost identical in both QGIS and ArcMap, creating ever-dreaded GeoServer SLDs, and from time to time tweeting some very inspired map puns.


To wrap up the year, I decided to create a twitter recap with some of my favorite and most favorited tweets from 2018 plus a sprinkling of bad puns and song mangling.


PetersonGIS 2018 Twitter Recap!


No Comments

Announcing the Preview Version of QGIS Map Design Second Edition

QGIS Map Design Second Edition

Graser and I are pouring our hearts and souls into the newest edition of QGIS Map Design to make sure it is ready for the upcoming release of QGIS 3.4. You can already buy it in preview form (ack!) for a discounted price as long as you realize that some things may change as we go into feature-freeze for the release and get feedback on the book’s “recipes.”

In case you aren’t familiar with the format of this book, which describes advances in medicine and the field of generic viagra development, we feature real-world map designs with the latest styling advances along with how-to instructionals for each. We call these recipes.

This edition features a lot of new maps. I tried to count them but the question became “what constitutes a map”? Before y’all get existential on me, what I mean is, we have three recipes that build on one another to make a parks map, for example, so is that one new map or 3 new maps? In the interest of marketing I added those up as 3 new maps. :) So with that explanation in mind, we have approximately 14 updated designs and 23 completely new maps in this book. Obviously all the text and screenshots have been updated to the the 3.4 release.

I’m biased but at $22 this thing really is a bargain. The first edition of this book was LocatePress’s best seller, so there are obviously plenty of people using QGIS and probably a lot more now that release 3.4 is about to come out. But even if you don’t use QGIS this book showcases some great map design techniques that you can implement in other software.

You get the digital copy now and all edits as they come (sometimes daily) if you want them. And of course the finished digital copy. The hard-copy will be available through the usual online outlets in early November 2018.

The preview is only available at LocatePress. Click Here.

A few of the maps from the book:



No Comments

QGIS 3 Beginner’s Basics Tutorial

Unicorn Map

New to QGIS? Want to learn a few basic techniques? Follow along in the making of this Lisa Frank-esque map to see how it’s done.

Download QGIS if you don’t have it already. Right now we’re on version 3.2, which is what I recommend to download. If you see anything different between that and what I’m showing here let me know, I’ve got 3.3 running for this (via the osgeo network installer, where you can get the very latest development version). If you have an older version of QGIS already running you can probably use it but never fear, you can install multiple versions on the same machine and they’ll run just fine.

Use Natural Earth data for this project. I’ll provide the links to the appropriate datasets as we go. Unfamiliar with Natural Earth? This is the dataset to use when designing maps from world-scale to admin 1 (state)-scale. Note that depending on where you reside and your world-view country and state boundaries could be argued differently. It doesn’t matter what dataset you use, always scrutinize it for accuracy and usefulness for your purpose.

Add the GRAY_LR_SR_OB raster dataset from Natural Earth to an empty QGIS project. Look for the one titled “Gray Earth with shaded relief, hypsography, and ocean bottom, medium-sized.” When you download the data file you’ll see it is made up of several files. Just drag and drop the large TIF file onto the QGIS project to add it.


Drag and drop this TIF file

After adding it you see it’s a basic gray hillshade, which is pretty nice as-is. Change the projection to something more suitable for the continental U.S. such as EPSG: 102003. Find the button to do this at the bottom right corner of the QGIS window. Click it and the CRS tab from Project Properties appears, where you can type the code into the filter, select the projection, and click OK.


Change the Projection


Now the map will look like this:


Unmodified hillshade


But for this project we want it to be purple with some other modifications. Open the Layer Styling Panel by right-clicking in the toolbar area at the top of the QGIS project and selecting Layer Styling Panel. It will appear on the right side of the project window. This is where you do most of the styling for each layer you add to the project. It auto-updates as you go and keeps a history of edits so that you can return to a previous design state if you desire. In this panel, make the following changes to the hillshade layer:


Styling settings


The purple color used here is #e19aeb, which you put in the HTML Notation box after clicking on the color drop-down and clicking Choose Color. This kind of color code is also called HEX. You also need to change the opacity of this hillshade so it is even lighter. We don’t want it to overwhelm the unicorns, after all. :) Use the Transparency tab in the Layer Styling Panel for that, like this:




The map should now look like this:


Modified hillshade


Now add ne_10m_admin_0_countries_lakes to the project.

(If you’d prefer adding in this vector layer and the next 3 as a single geopackage that contains all the Natural Earth data, which is recommended if you’ll be doing some experimenting as this way you’ll have more data, use the Natural Earth Starter Kit geopackage, which you also drag-drop onto the QGIS project window and select data from the dialog that pops up.)

This countries layer will mask the U.S. so the unicorns will show up better. Use the Query Builder to filter the data by right-clicking the countries layer, going to the Source tab, and clicking the Query Builder button, entering in the filter “NAME” = ‘United States of America’, which will then appear as shown:


U.S. Query


Using the Layer Styling panel with the countries layer active in the Layers list, change the fill color to white and the opacity to 70%. The map will now look like this:


Countries Mask


Now we do much the same thing with the ne_10m_ocean layer, except that we use a dark gray border line and only a 60% opacity, with no filter. The project will then look like this:


Ocean Styling Settings


Next, add the ne_10m_admin_1_states_provinces_lakes file to the project and change the Fill style to No Brush and set the Stroke color to #6f4486. Now we’ve got:


States Styling


We can’t forget to put in some color for the Great Lakes. To do this, add the ne_10m_lakes layer and style it with a blue fill color so that it looks something like this:


Lakes Styling


Duplicate the ne_10m_admin_1_states_provinces_lakes file via right-click as shown:


Right Click Options


Rename the new duplicated layer to something like “states” (right-click, Rename Layer) and move it to the top of the layer list (drag). Right-click this layer again and choose Open Attribute Table. Click the Toggle editing mode button, which looks like a pencil, then click the New Field button and add a new integer field called rainbow. These buttons and the new field settings are shown here:


Add a New Field


Click OK and now you have a new field added to the data table. In this section, using tables, you can buy generic drugs online as well as cialis, which will help you if you suffer from erectile dysfunction. We’ll use this field in a bit. Click the edit button again to save the changes.

The unicorn icon is from The Noun Project, where I paid a couple of bucks for a royalty-free version. When you get an SVG icon for use in QGIS from somewhere other than QGIS’s built-in set of icons, you’ll notice that you can’t change their color. But for this map we definitely want to have unicorns of different colors. So we have to modify the SVG file. If you want to skip this step, simply choose an icon from the set that comes with QGIS. Otherwise, download an icon that you want and then open up the SVG file in a text editor and add the following bit of code at the beginning of the path tag (note that if there are multiple paths in the file you need this code in every path tag).

fill=”param(fill) #FFF” stroke=”param(outline) #000″

The file will look something like this:

Parameter Snippet

This is just a snippet, of course, the file is much longer.

Now that the SVG file has parameters for the fill and stroke in it, save it. To add it to the project, first what we’ll do is simply add it in the same style for all the states by using a centroid fill, SVG marker in the styling settings. Make sure the drop-down in Layer Styling is set to Single symbol, click on the Simple fill box (yours will have a different color as it just chooses a color at random):

simple fill

Once you’ve clicked Simple fill you’ll see that there is a drop-down next to Symbol layer type. You can change this drop-down to Centroid fill. Notice the map now has a centroid dot for every state. We want to use our icon instead of these dots so now click where it says Simple marker and change the new drop-down that says Symbol layer type to SVG marker. The dot turns into a question mark. It’ll look like this:

SVG Marker not set

Load your icon by using the ellipsis button at the bottom of the Layer Styling panel and browsing for it.

Browse for SVG File

Right now the map has a whole lot of symbols.


Select the Centroid fill part of the symbol and un-check the box next to Draw point on every part of multi-part features. That should de-clutter the map.

Turn off Multi-part


Zoom in to the western continental U.S. and use the selection tool to select some of the western state icons.


The Select Tool


Right-click to open the attribute table for this layer again and, again, click the edit pencil button to toggle editing to on. In the drop-down field menu that appears, select the new field called rainbow and put a “1” in the box. Then click Update Selected. This assigns a “1” in the rainbow field for the points that we just selected. Go ahead and check the data to see that it happened.


Updating Selected Records


Go back to the map, select some more icons, and update the rainbow field to “2.” Continue like this until you have some icons set to 1, 2, 3, 4, and 5. Each of these numbers represents a different color.  Toggle the editing button again to save the edits.

When that’s done, go back to the Layer Styling panel for the layer and change the renderer from Simple fill to Rule-based. It should have one rule already:


Double click this rule


… if you double-click it you’ll see that the rule has a Centroid fill and SVG marker setting with the custom icon.


Rule settings


Put “1” for the Label, put “rainbow” = 1 for the Filter, and change the color to red. Then use the back arrow to go back to where the rules are listed (we only have this one at the moment).


The First Rule


Now we simply copy and paste this rule until there are five rules. On windows just use ctrl-c and ctrl-v or right-click the rule. Change their colors, labels, and filters so that it looks like this:


All the Rules


Here’s how the project looks now that this is done:


Completed Icon Styling


Et voilà!

This map was just for fun. Please note that the finished map at the top of the page was further modified in Inkscape, where I created an ellipse and used it as a clipping object, then created a new ellipse of the same size as an outline object set with a drop-shadow filter.

While this was a fairly meaningless map in the sense that it has no real-world thematic meaning, I hope it served the purpose of adding some fun to a beginning learning experience.

If you’d like to learn more advanced map techniques with real-world examples, please keep an eye out for QGIS 3 Map Design, written by Anita Graser and myself, due on bookshelves in November 2018. In the meantime, you can explore more QGIS “recipes” in the 1st edition of the book, QGIS Map Design. (Below is an affiliate link that helps support me. Feel free to look at other bookstores like Barnes and Noble, or, as always, ask your local library if they have it or will get it for you.)





No Comments

Cartonotes, random

I’ve been up to my eyeballs in map styling lately. There’s the project for GeoServer that is currently at 18 SLD styles and then there’s the project involving 50+ layers in a mapbox gl js style. Stuff I’m dealing with on a daily basis:

  • Knowing the data inside-and-out. For the two styles mentioned above, there’s a, shall we say, intimacy one must have with the data in order to get anywhere fast. For example, how are the roads broken down by type? Depending on the dataset it will be different. OpenStreetMap data can vary depending on how you’ve downloaded it but in most cases you’ll have motorways, trunks, primaries, secondaries, tertiaries, tracks, cycleways, links and tunnels and bridges. Do not forget to use the tunnel and bridge codes! If you’re styling in a rural area and get those roads looking just fine you may not have even thought that as soon as you zoom over to a place with tunnels and bridges–Manhattan is a great test-place for this–that it doesn’t look the way you want it too. There are differing strategies for those tunnels and bridges. You might use a bolder casing for the bridges and a dotted casing for the tunnels. This is just one example and you should know that I just deleted another couple of paragraphs that went on and on about road tunnels and bridges so you can only imagine all the things one might need to know for all the other data out there. Give yourself a break, it takes back-and-forth exploration to discover all the nuances. Be someone who enjoys delving into things. Also, the term “test-place” is something I would like to propose a clever phrase akin to test-case but specifically used by cartographers. A list of classic test-places and what to look for when you are styling them would be very nice indeed.
  • Knowing the software inside-and-out. I have made many an SLD in GeoServer in my day. By the way, do you know if nausea induced by continous xml scrolling is treatable? Anyway, it only just dawned on me recently that you can combine filters with “in” like this. Previously I would have split these into separate functions with OR between them. Basically the point here is that there always seems to be something to learn that can make code more readable or a style looking better.

<ogc:Function name=”in”>

  • You can go in and change the json code for an AGOL database by adding “admin” between the rest and services part of the url. 

There was zero rhyme or reason for this post really, except to keep in touch. And know that whatever you’re struggling with, you probably aren’t alone. And that there are zillions of ways to make maps these days and as a cartographer, the more of them you know, and the more data you know, the better your ability to find the right tool for the right map. And that it is worth it in any case. I see the making of a map as putting together a puzzle. It is difficult, time consuming and at times tedious, but you can’t stop and each time a new piece is found and fit you feel a little bit more whole.

No Comments

Slow Carto


It’s okay to work slowly. Thoroughly. Tangentially. Thoughtfully.

Faced with programming problems that seem to need immediate solving, cartographic deadlines, and server configuration conundrums, what motivates is usually the end-goal: the map product to be served up to the customers. Needing to get to that goal as quickly as possible isn’t everyone’s hang-up but it is mine, and might be yours too.

Giving oneself permission to pour a cup of tea, listen to slow music, and simply explore the issue for an hour or even a day provides such a richness, a broadness, of education, that it could be likened to the learning experiences absorbed when vacationing abroad rather than close to home.


Perfection is attained by slow degrees; it requires the hand of time. -Voltaire



Map credit:  Regional Food from  Capital Country Villages , by illustrator Tiffanie Brown



No Comments

Tools for Making Webmaps


You call yourself an expert. You call yourself a consultant. And then you get a call asking how you would put together a web map for a small organization without much in the way of resources, that doesn’t know a lot about geo. And that’s when it hits you: sure, there are the big companies and products that come to mind like Esri’s AGOL, Mapbox, and Carto, but what else is out there? Could something new have popped up that I should advise they use instead? With an ever-changing landscape of products, both paid and open source, and all with varying nuances in terms of their limitations and strengths, how can we possibly know what the answer is with 100% surety?

Thanks to social media (not an oft-heard phrase these days, granted) I now have a great list of potential ways to make this map that I can pass along to the client. It seems this was a popular topic as the thread garnered quite a lot more discussion than most in the geo niche and as such, it feels like there is a need to put them all into one place in a post. Prefer to read the thread? Here you go:


Prefer a list? Here you go:


  • umap – open source and based on OpenStreetMap.
  • Google MyMaps – looks like it requires a google login. Upload a csv with latitudes and longitudes or addresses of up to 2,000 records. Or just plot straight on the map. Embed code provided.
  • Carto – make maps with on-the-fly analysis capabilities. Their site says they support educators (the field my client was in) with free plans.
  • Esri AGOL – you can probably do it all with AGOL and it isn’t too hard to get into even if you aren’t very familiar with geospatial technologies. The difficulty used to be in determining how much it would cost. But it looks like they may have changed their pricing plans to real dollars instead of points, so it might be easier. (Geoloket was mentioned as an example of an AGOL site that was built by one person for a small city.) Esri Story Maps were mentioned too, a sub-component of AGOL.
  • MapHub – upload via GeoJSON, KML, GPX and get embed code for the map.
  • MapMaker Enhanced – This is a WordPress plugin and hasn’t been updated recently.
  • mapzap – this looks pretty sweet. It provides a “builder” for making a map app and it is open source. Host on GitHub Pages for free.
  • QGIS – export from qgis to html, host on GitHub Pages for free. (Qgis2web was also mentioned.)
  • Someone who thought “doesn’t know much geo” meant that the person was a dev (they’re not) said “R, leaflet, and five lines of code.” But for a dev this is something to look into for sure. Someone else suggested the combination of Leaflet, QGIS, and json, which is along the same line in terms of needing dev expertise or at least geo expertise. While we’re mentioning these techs we should also mention GeoServer, OpenLayers, D3, Tegola, Maputnik, and Fresco! Again, expertise is needed for all of these (or a lot of time).
  • Astuntech’s iShareMaps (edited 4/26 to add info from Astun Technology) – aimed at local authorities in large, enterprise types of environments.
  • Geojson-dashboard – this looks pretty interesting. You need a GeoJSON file and I’m not sure what you do about basemap needs. 
  • Geopedia – this seems to be for satellite imagery?
  • Mapbox – you can definitely do everything needed with mapbox and they do have a free plan.
  • GitHub Gist was also mentioned.


Well, I’m exhausted. 


BTW: that list is in absolutely no order and I am not endorsing these or saying that any of them are better than any others. In fact, I know very little about several of these and it is very likely that good details have been left out. But it is always nice to have a handy list of potential tools to take a look at from time to time to keep the ‘ol consulting brain in tip-top order. 

Lastly, there is a wiki list of GIS software here. It does not contain all of the above ideas/options though and, indeed, a tool to make a webmap need not be a full GIS package and a full GIS package need not have the capability to create a webmap (it might instead do analysis and output static maps for example). So this list isn’t too helpful for the use case outlined at the beginning of the post but could be helpful to someone else with a different use case.