[GRASSLIST:3998] Re: BoundingBox in eps not found by ps.map
Florian Goessmann
florian.goessmann at mac.com
Thu Jul 22 21:37:32 EDT 2004
thanks!
but i found the mistake myself. the eps had mac line endings, which ps.maps doesn't understand. when i changed them to unix, everything worked fine.
regards,
Florian
PS: i thought i had posted the solution the same day when i askedm but i only sned it yo myself, not to the list :-)
On Friday, July 23, 2004, at 06:26AM, Hamish <hamish_nospam at yahoo.com> wrote:
>> 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