4

I have several hundred scanned maps in TIFF format, each correctly georeferenced and forming a large grid of images. The problem is that the border for each map is present - a white band, with a black edge (not NoData), containing references etc, and overlaps the adjacent tiles. I want to remove these borders from all maps (see below - the white cross through the middle and the edges around the outside).

4 scanned maps showing white, overlapping borders through the middle and around the edge

Is there a way to remove X number of pixels from the top, left, bottom, and right of rasters? And is there a way to do it for multiple rasters in the same process? I.e., rather than using the extent (as with the Clipper tool). It would be very easy in an image processing program like IrfranView, but I want to retain the geo-data (World files etc) which would be thrown off as the extent and position of the corners would change.

I can use QGIS or ArcMap.

8
  • First try to see what is the value of the black edge with the identifying tool. Then you can try to covert your file to another/same format and definig the null value and keeping the files in the same crs (raster/conversion/translate(convert format)) Jul 10, 2014 at 13:08
  • This might give you some ideas: help.arcgis.com/en/arcgisdesktop/10.0/help/index.html#//… specifically shrinking footprints. Depending on your version of ArcGIS you might find the Hawth's Analysis Tools Clip rasters by polygons using autodetect useful.
    – John
    Jul 10, 2014 at 13:16
  • What are you planning on doing with the images after modification? I believe ArcGIS Mosaic Datasets can mask out marginalia on the fly, and build image overviews with the edges masked out, without changing the base images at all.
    – Vince
    Jul 10, 2014 at 14:55
  • @Gerardo Jimenez, black is used elsewhere in the image, as is white, so I can't simply drop those values. Also, because the images are scanned and imperfect, 'white' and 'black' aren't all the same value, as there are slight differences within each colour
    – gisol
    Jul 10, 2014 at 15:12
  • @Vince - I want to merge them all to produce on huge continuous raster, then Split them into 999x999 tiles.
    – gisol
    Jul 10, 2014 at 15:16

2 Answers 2

1

I agree with Vince. Use a mosaic dataset in ArcGIS. It does a good job of on-the-fly cropping of map marginalia by using the footprint of the actual data area. See here :

What is a mosaic dataset

Creating a mosaic dataset

1

If you have Basic licensing and cannot Create Mosaic Dataset, but you have access to Spatial Analyst, you can do the following to remove X pixels from the border of each raster:

  1. Create Constant Raster with value = Y, and extent of original raster
  2. Shrink constant raster by X pixels, using zone value Y
  3. In Raster Calculator, use an expression like: Con(shrink raster, original raster)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.