Archive for January, 2019

Using Seamless Images in Cartography

 

Occasionally the cartographer comes across a need for a seamless image, seamless pattern, or seamless texture. A seamless image is one that, when duplicated and set side-to-side with the original, creates a larger image that does not have any visible boundary between the two smaller images. They are also called repeating patterns.

Here are three examples of this in action.

 

New Year’s Map Balloons Image

Vector seamless pattern of colorful

I searched for the above image on istockphoto with the keywords “seamless balloons.” Try searching for seamless images yourself. Notice that the balloons on the sides of the image are not whole. They don’t become whole balloons until the image is pieced together like so:

SeamlessBalloons

Here’s a demonstration of how this kind of image is useful in a map. This demo is in QGIS. I start by showing you what happens when you use a non-seamless image file and then finish with the seamless image from above so you can see the massive difference in visual quality that results:

 

 

 

A Seamless Orchard Pattern, and Others

Repeating white space is fine in some patterns. Here we have a very simple pattern piece made with just one image element surrounded by white space. For this demonstration the image is enlarged and the white space rectangle and the floret image are grouped together. It creates a uniform pattern when tiled:

OrchardPattern

This was used in a vector tile implementation of a complex map style. Implemented on the map, this seamless pattern appears like this:

image10

 

If a pattern with an offset is desired instead, a somewhat more complicated pattern must be created. If you are adept at graphic software like Inkscape, you can create these yourself with special attention to pixel size ratios, x and y coordinate locations, and clipping to ensure the separate components are formatted with the exact spacing required. Here I demo a different Inkscape tool than the demos above where I just copied and pasted: the Edit-Clone-Create Tiled Clones tool. It is the same concept, we are repeating the original image, but it is a lot faster.

 

bluedots2

 

 

Note that you can also create linear patterns for things like hedgerows or power lines. Here is a hedgerow symbol:

 

hedgerowpattern

 

Remember, the image file you give to your map software will be just that initial piece of the pattern. The software will take care of the tiling for you. Here we see the hedgerow pattern in use as part of a Mapbox GL JS style. 

 

hedgerow

 

Hatch Textures

Last, we have hatching textures. These are used frequently in cartographic design and so should be part of our toolkit. Creating a seamless hatch fill is a decidedly more difficult task than the others because of the line angles. It will look something like this which may be counter intuitive. This is zoomed in for demo purposes. The original hatch png is only 6px x 6px.

redhatch

 

Here you see how it fits together:

 

hatch

 

It pays to have one of these in SVG format because it is likely that you’ll want to make changes to the colors and transparencies. For example, let’s say you’re wanting to use a diagonal hatch fill to denote natural areas in an interactive world-wide map. Many natural areas span both land and water features so it can be useful to create a semi-transparent hatch fill or a hatch fill with no background color at all to cover these areas. In this way the reader can see where the natural area is covering water and where it is covering land. In other cases you may want a non-transparent background fill, especially for smaller area features.

Here is that same hatch fill pattern shown above, except in different colors to identify military areas in a vector tile implementation of the Humanitarian OpenStreetMap style. This military area is covering some water but the hatch is non-transparent:

hatch2

 

Here, that same little sprite (a png file created with the svg and made into a sprite) was changed to white diagonal hatches with no background color in order to allow the land/water boundaries to show through. This is in our camo style vector tile demo:

camohatch

 

While it is true that GIS software comes with pre-rendered seamless image patterns for your use, there may indeed come a time when you need to create your own. What a good tool to have in your toolkit!

 

 

No Comments

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