[GRASSLIST:5951] Re: r.in.tiff problem

Michael Ash mash at econs.umass.edu
Wed Apr 2 18:35:33 EST 2003


> Michael Ash wrote:
> > I am having some trouble importing scanned maps with
> > r.in.tiff [in GRASS 5pre3 for Cygwin/X]

Eric G. Miller wrote:

> A later version of r.in.tiff checks for the projection...  An
> unreferenced TIFF will have a "region" of 0..width by 0..-height pixels
> and a cell size of 1.  But, 90 pixels isn't very many...
> 
> Solution:  (1) Import unreferenced images into an XY location.
> (2) Newer r.in.tiff will set the projection to XY for the image if it
> doesn't have a TFW (I think, maybe this was not a good idea since most
> of the projection info is per LOCATION not data set).
> 
> (1) is probably the preferred solution.

Thank you very much for the guidance.  (1) worked.  

I created a new location with XY coordinates and dimensions
that correspond roughly to those of the TIFF file.  I ran
r.in.tiff and then g.region and now I have a working raster
map of the scanned map.

(One curiosity: r.in.tiff generated a segmentation fault
until I ran it with the -v (verbose) option, and then it ran
fine.)

BTW, note to new users about what I am up to:

Goal: I want to add some maps scanned from paper to an
existing location/mapset.

I will follow Eric's advice to scan the unreferenced images
into an XY location.  I will then use:

i.group to make the map(s) into a single group 

i.target to specify the target location/mapset to which the
  newly scanned maps apply (this is how I connect the scanned map in a vanilla XY location
  to an existing location/mapset with lat/long or other coordinates)

i.points to specify points in the scanned map that correspond to known points in the target location/mapset This procedure can be done by coordinates or by point-n-click.

i.rectify to create the new raster map in the desired location/mapset with coordinates that correspond to those specified in i.points.




Best regards,

Michael Ash, Assistant Professor 
  of Economics and Public Policy         
Department of Economics and CPPA
University of Massachusetts
Amherst, MA 01003        
Tel 413-545-6329 Fax 413-545-2921
Email mash at econs.umass.edu
http://people.umass.edu/maash




More information about the grass-user mailing list