August 3, 2026

The QGIS program - Topo maps, part 3 - cropping

The map sources most useful to me are scans of historic USGS map sheets. These scans are available in several forms, what I find most useful is the PDF. These scans include map margins, legends, and such. It is desirable to crop off that information, especially if two adjacent sheets are intended to be joined together.

Making a rectangle (polygon)

QGIS can crop a raster using a polygon, so the necessary thing is to generate a polygon (a rectangle defined by long/lat limits).
Some suggestions for doing this are:

To create a grid, use Vector -- Research Tools -- Create Grid.
Set grid type to Rectangle (Polygon).
Enter long,long,lat,lat
Leave the spacing values set to 1.0

I enter -110,-109,32,33

It works! I get a rectangle. It seems to use EPSG:4326 by default. Nice and easy.
I end up with a layer labeled "Grid".

Go to layer properties and for fill color, select "transparent fill" to get rid of the pink fill.

Clipping a raster layer

It turns out that this is easier and more direct than I thought. Use Raster -- Extraction -- Clip Raster by extent (notice that the same menu has "Clip Raster by polygon") You can enter the extent as long,long, lat,lat (which you could also generate from another layer). Note that it will ask for the input layer in the dialog. Another option is to "Clip my mask canvas extent". Here you zoom and pan first, using what you see on the canvas to delimit what you get. This might be handy if you had a huge raster and wanted to reduce it before performing some compute intensive action. Another option is to "draw on canvas" pulling a rectangular square to select the region of interest.
Feedback? Questions? Drop me a line!

Tom's Geology Info / tom@mmto.org