Scanning maps and GRASS

John Talcott talcott at
Mon Nov 6 07:00:00 EST 1995

In article <199511030308.VAA29748 at>,
grassu-list at wrote:

> Hello,
>         I am looking someone who knows a bit about GRASS. I was hoping that 
> they could take out a few moments to answer a question for me. 
> Suppose I have a map of a city. Is it possible to scan in this map and use 
> it successfully with GRASS? I know a little about maps but I don't know much 
> when it comes to getting them into the computer. What exactly must one do to 
> get a map into the computer and to use the map with GRASS?  I would *greatly 
> appreciate* any help or any suggestions as to where I can locate the answer.

I do this all the time, and it's not difficult once you get the hang of it.
I use the following procedure:
1) Since I use UTM coordinates, I mark UTM crosshair locations on the map
   before I scan it. These pencil crosshairs will permit an accurate
   registration later.
2) Scan the map at a resolution of at least 150 dpi and preferably 300 dpi.
   This increases the accuracy of your registration and if you are going to
   digitize anything after registration, it will increase the accuracy of
   that, too. I store the scanned image as a tiff file.
3) Import the scanned image into the imagery location in GRASS. I use the utility.
4) Once imported into the imagery location, check the image to make sure it
   includes the area you want. Use the following GRASS commands:
   d.mon start=x0
   g.region -p rast=myimage
   d.erase c=black
   d.rast myimage
5) You will need to register the image into a different location. This new
   location will have geographical units, instead of the cartesian x,y units
   the imagery location uses. Go to the new location (this requires leaving
   GRASS and starting it up again in the new location) and create a region
   that includes the area of the scanned image you want to import. This can
   be accomplished by using the g.region command. Set your region to region
   containing the area of interest.
6) Exit GRASS and start it up again in the imagery location. You must create
   a group containing the scanned raster file. After you have created the
   group, you can use i.points to register the image. BTW, there is an
   excellent tutorial at the GRASS ftp site, "" on image
   processing and it contains details on most of this stuff. Once you have
   identified several points and enetered their actual geographic locations,
   you are ready to rectify the image into the geographic location. Use
   either i.rectify or i.rectify2. Summary: (this must be run interactively)
   i.points (this must be run interactively)
   i.rectify2 (this must be run interactively)
7) Once i.rectify2 finishes, you will receive mail with some job statistics.
   Look at them. Exit GRASS and start it up again in the geographic location.
   Use d.mon, g.region, d.erase, and d.rast to view the recitified image.
8) If you have register several scanned images that overlap slightly or are
   adjacent, you can use r.patch to patch them together into a single raster

This may all sound somewhat confusing and I would strongly recommend acquiring
the GRASS image processing tutorial. I have found the key to accurately
registration is to premark the map with many, equally spaced coordinate
crossings prior to scanning.

Good Luck!

John C Talcott talcott at
Science Applications Intl. Corp. (SAIC)
10260 Campus Point Drive
San Diego CA 92121
(619) 546-6447

More information about the grass-user mailing list