[GRASSLIST:3996] Re: BoundingBox in eps not found by ps.map

Hamish hamish_nospam at yahoo.com
Thu Jul 22 18:25:59 EDT 2004


> i want to include an eps file (made with adobe acrobat 6.0) into a
> ps.map map, but ps.map complains that the bounding box cannot be
> found. i checked the eps file and that seems to be correct as
> %%BoundingBox is given.


works for me....
[tested with GRASS 5.7]


e.g. spearfish data set:


ps.map out=test.ps << EOF
raster elevation.dem
eps 50% -40%
  epsfile /usr/lib/tk8.3/images/logo.eps
  end
mapinfo
  where 0.5 8.5
  end
end
EOF
gv test.ps



here is the code, from 5.7's ps/ps.map/eps.c:
    ...
    /* looking for bbox */
    while ( fgets(buf, 200, fp) != NULL )
    {
        if (sscanf(buf, "%%%%BoundingBox: %lf %lf %lf %lf", 
		llx, lly, urx, ury) == 4)
        {
            fclose (fp);
            return (1);
        }
    }
    fprintf (stderr,"Bounding box in eps file <%s> was not found\n", eps);
    fclose (fp);
    return (0);
}



so make sure the %%BoundingBox: statement has 4 numbers after it.
I don't know why it would fail otherwise.



Hamish




More information about the grass-user mailing list