[GRASS-user] problems with ps.map outputs

Dear list,

I was trying to produce a Hardcopy PostScript map output with ps.map which I would like to rework within an image processing application. Therefore I was producing both a ps and an eps file but both of them are not loadable into e.g. Adobe Photoshop.

Any ideas are welcome.

Regards

Chris
_________________________________________________________________
Invite your mail contacts to join your friends list with Windows Live Spaces. It's easy!
http://spaces.live.com/spacesapi.aspx?wx_action=create&wx_url=/friends.aspx&mkt=en-us

On Wed, Aug 13, 2008 at 10:58:20AM +0000, we recorded a bogon-computron collision of the <chrisbrandt74@hotmail.com> flavor, containing:

Dear list,

I was trying to produce a Hardcopy PostScript map output with ps.map which I would like to rework within an image processing application. Therefore I was producing both a ps and an eps file but both of them are not loadable into e.g. Adobe Photoshop.

Any ideas are welcome.

I have had good luck converting the PostScript files to PDF with GhostScript.
(Ghostscript comes with a script called "ps2pdf" that runs the converter with
just ther right options.) Both Photoshop and Illustrator are then able to
read them, and you can tweak the presentation to your heart's content.

--
Tom Russo KM5VY SAR502 DM64ux http://www.swcp.com/~russo/
Tijeras, NM QRPL#1592 K2#398 SOC#236 AHTB#1 http://kevan.org/brain.cgi?DDTNM
"Argue for your limitations and sure enough, they're yours." -- R. Bach

christian Brandt wrote:

I was trying to produce a Hardcopy PostScript map output with ps.map
which I would like to rework within an image processing application.
Therefore I was producing both a ps and an eps file but both of them
are not loadable into e.g. Adobe Photoshop.

PostScript isn't a raster image format, so I wouldn't expect Photoshop
to import it directly, although many image programs have a plug-in
(usually based upon Ghostscript), or you can use Ghostscript directly
to rasterise a PostScript file.

The usual tool for interactively editing PostScript files is
Illustrator. Also, I don't know if Acrobat can read PostScript
directly, but you can convert from PostScript to PDF with Distiller,
or with Ghostscript.

The advantage of operating upon PostScript or PDF, as opposed to a
raster format, is that rasterisation loses detail. This isn't an issue
if the end result will be a raster image file, but it can be
significant for hardcopy.

--
Glynn Clements <glynn@gclements.plus.com>

Glynn Clements pisze:

The usual tool for interactively editing PostScript files is
Illustrator.

FTR, Corel Draw worked for me too when I used Windows.

BTW - anybody knows of good Open Source alternatives for editing (*real* editing, alike Illustrator or Corel Draw) PS or PDF under GNU/Linux?

Maciek

--
Maciej Sieczka
www.sieczka.org

Glynn pisze:

> The usual tool for interactively editing PostScript files is
> Illustrator.

Maciek:

FTR, Corel Draw worked for me too when I used Windows.

BTW - anybody knows of good Open Source alternatives for
editing (*real* editing, alike Illustrator or Corel Draw) PS or PDF
under GNU/Linux?

How about Inkscape or Scribus?
  http://www.inkscape.org/
  http://www.scribus.net/

Hamish

Wow! Inkscape does (almost) wonders. Last time I tried it there were
more issues that benefits. Now (0.46-2, Debian testing) it imports a
complex QGIS-generated PDF flawlessly treating text as text (cool!),
raster as raster and vector as vector, let's me edit it just like a
normal hybrid graphics file. I can export it back to PDF after edits -
with a glitch that transparent rasters parts (those which were null in
QGIS, thus transparent in it's PDF output) now are white in the new PDF,
and some newly added transparent vector objects are rendered wrong in
Evince, but OK in Adobe Reader. Anyway if I stick to SVG format for
saving any changes after importing the original PDF to Inkscape - no
problems whatsover.

(Pitty that PostScript import does not work too well though.)

Inkscape has improved *a lot*. Glad you guys made me try it again. Thanks.

Maciek

--
Maciej Sieczka
www.sieczka.org

On Thu, Aug 14, 2008 at 02:04:50AM -0700, we recorded a bogon-computron collision of the <hamish_b@yahoo.com> flavor, containing:

> Glynn pisze:
>
> > The usual tool for interactively editing PostScript files is
> > Illustrator.

Maciek:
> FTR, Corel Draw worked for me too when I used Windows.
>
> BTW - anybody knows of good Open Source alternatives for
> editing (*real* editing, alike Illustrator or Corel Draw) PS or PDF
> under GNU/Linux?

How about Inkscape or Scribus?
  http://www.inkscape.org/
  http://www.scribus.net/

Both of these are cool programs, and if one could get ps.map's output into
them they'd be great choices for tweaking map presentation. But neither is
actually able to import a PDF (or even PostScript) map for editing.

Scribus can import a PDF of text and allow you to edit it. It can't do much
with the graphics, though.

Inkscape can do a great deal with the graphics if you can get the data
imported. But it can't read PDFs or postscript directly. Inkscape has some
script that tries to use ghostscript to convert the document to an Adobe
Illustrator document and then import that, but every time I've tried it it
fails. As far as I could tell, it was because the ghostscript ps-to-ai deal
didn't work properly on ps.map's generated postscript.

Have you actually had success with either of these programs? I would *LOVE*
not to have to use Illustrator (which I don't even have --- when I need this
capability I have to transfer PDF versions of my maps to my girlfriend's
computer, which *does* have Adobe CS).

--
Tom Russo KM5VY SAR502 DM64ux http://www.swcp.com/~russo/
Tijeras, NM QRPL#1592 K2#398 SOC#236 AHTB#1 http://kevan.org/brain.cgi?DDTNM
"Argue for your limitations and sure enough, they're yours." -- R. Bach

Maciej Sieczka wrote:

Wow! Inkscape does (almost) wonders. Last time I tried it there were
more issues that benefits. Now (0.46-2, Debian testing) it imports a
complex QGIS-generated PDF flawlessly treating text as text (cool!),
raster as raster and vector as vector, let's me edit it just like a
normal hybrid graphics file. I can export it back to PDF after edits -
with a glitch that transparent rasters parts (those which were null in
QGIS, thus transparent in it's PDF output) now are white in the new PDF,
and some newly added transparent vector objects are rendered wrong in
Evince, but OK in Adobe Reader. Anyway if I stick to SVG format for
saving any changes after importing the original PDF to Inkscape - no
problems whatsover.

That's interesting to know.

(Pitty that PostScript import does not work too well though.)

Does running it through ps2ps help? Or maybe Inkscape already does the
equivalent of that.

Also, bear in mind that the cairo driver can generate SVG directly, by
using e.g. "export GRASS_PNGFILE=map.svg". However, setting
GRASS_PNG_READ=TRUE doesn't work for vector formats, so you have to
output each command to a separate file then compose them afterwards.

--
Glynn Clements <glynn@gclements.plus.com>

Tom Russo pisze:

<hamish_b@yahoo.com> wrote:

How about Inkscape or Scribus?
  http://www.inkscape.org/
  http://www.scribus.net/

Both of these are cool programs, and if one could get ps.map's output into
them they'd be great choices for tweaking map presentation. But neither is actually able to import a PDF (or even PostScript) map for editing.

Scribus can import a PDF of text and allow you to edit it. It can't do much
with the graphics, though.

Inkscape can do a great deal with the graphics if you can get the data imported. But it can't read PDFs or postscript directly. Inkscape has some script that tries to use ghostscript to convert the document to an Adobe Illustrator document and then import that, but every time I've tried it it fails. As far as I could tell, it was because the ghostscript ps-to-ai deal didn't work properly on ps.map's generated postscript.

Have you actually had success with either of these programs?

Tom,

I also had problem with Inkscape in past, but I just checked 0.46 stock
Debian testing package and it rocks now. See my previous message in the
thread.

Maciek

--
Maciej Sieczka
www.sieczka.org

Glynn Clements pisze:

Maciej Sieczka wrote:

Wow! Inkscape does (almost) wonders. Last time I tried it there were
more issues that benefits. Now (0.46-2, Debian testing) it imports a
complex QGIS-generated PDF flawlessly treating text as text (cool!),
raster as raster and vector as vector, let's me edit it just like a
normal hybrid graphics file. I can export it back to PDF after edits -
with a glitch that transparent rasters parts (those which were null in
QGIS, thus transparent in it's PDF output) now are white in the new PDF,
and some newly added transparent vector objects are rendered wrong in
Evince, but OK in Adobe Reader. Anyway if I stick to SVG format for
saving any changes after importing the original PDF to Inkscape - no
problems whatsover.

That's interesting to know.

(Pitty that PostScript import does not work too well though.)

Does running it through ps2ps help? Or maybe Inkscape already does the
equivalent of that.

No good. Still as with the original ps file: opening it in Inkscape
the rasters are not imported and text is imported as vector objects,
with some corruption.

Being curious I tried ps2pdf too. It's output is corrupted though -
contains only the top-right part of the input ps, even though I specify
-sPAPERSIZEa4. Yet, as I wrote before, the original pdf generated by
QGIS imports into Inkscape without a single glitch.

Also, bear in mind that the cairo driver can generate SVG directly, by
using e.g. "export GRASS_PNGFILE=map.svg". However, setting
GRASS_PNG_READ=TRUE doesn't work for vector formats, so you have to
output each command to a separate file then compose them afterwards.

I didn't try Cariro output in GRASS. I'm talking about the QGIS print
composer output, as I wrote in my previous message.

Maciek

--
Maciej Sieczka
www.sieczka.org

On Thu, Aug 14, 2008 at 03:49:37PM +0200, we recorded a bogon-computron collision of the <tutey@o2.pl> flavor, containing:

Tom Russo pisze:
> <hamish_b@yahoo.com> wrote:

[on alternatives to Adobe Illustrator for tweaking ps.map output]

>> How about Inkscape or Scribus?
>> http://www.inkscape.org/
>> http://www.scribus.net/

> Both of these are cool programs, and if one could get ps.map's output into
> them they'd be great choices for tweaking map presentation. But neither is
> actually able to import a PDF (or even PostScript) map for editing.
>

[...]

>
> Inkscape can do a great deal with the graphics if you can get the data
> imported. But it can't read PDFs or postscript directly.

[...]

>
> Have you actually had success with either of these programs?

Tom,

I also had problem with Inkscape in past, but I just checked 0.46 stock
Debian testing package and it rocks now. See my previous message in the
thread.

Indeed! This is greatly improved from last time I tried it. Inkscape can't
read raw postscript, but can now import pdf better than it used to be
able to do last time I tried it. I was able to do a ps2pdf of a map I'd
created previously from ps.map and import it into inkscape very nicely.
Interestingly, it was better to do ps2pdf on the raw output of ps.map than it
was to do a ps2ps first --- the "simplified" postscript from ps2ps turned all
of my text into individual glyphs for each letter instead of turning them into
text objects that could be edited in inkscape nicely.

There are some odd and annoying artifacts:
  1) All of my text imports oddly formatted, with inter-letter spacing all
     messed up. All it took to fix this was to ungroup everything until I
     could select the individual text objects, then edit the text (adding a
     space and deleting it was sufficient) and click "Apply" --- this fixed
     all the spacing, but the net effect was that I'd told inkscape to make a
     null change to the actual text. Nothing else I tried forced it to
     re-adjust the text spacing properly.

  2) None of the grid lines I'd created with ps.map's "grid" function showed
     up. The were all hidden in there as paths with no fill. I was able to
     fix them by opening the "XML Editor" and clicking every path in the list
     until I started seeing my invisible grid lines --- each path after that
     was another piece of my grid, and I could set the fill on each one to
     something useful. But short of editing the XML I was unable to get
     the grid lines selected through the drawing panel until they were filled.

Even with these annoyances, this still gave me something I could edit nicely
--- my primary use for this kind of thing will be to fix up the hideous
labeling that ps.map is capable of, since inkscape can allow me to "put text
on path" for any arbitrarily shaped path better than v.label can do with it's
"curve text to lines" feature.

In all, this was a very nice surprise, since I tried inkscape only a few
months ago and had found it impossible to import ps.map output then.
Thanks for the nudge.

--
Tom Russo KM5VY SAR502 DM64ux http://www.swcp.com/~russo/
Tijeras, NM QRPL#1592 K2#398 SOC#236 AHTB#1 http://kevan.org/brain.cgi?DDTNM
"Argue for your limitations and sure enough, they're yours." -- R. Bach

Yes, with ps2pdf the combination Grass/Inkscape works great...

By the way (perhaps off subject, but it may be interesting for those who
can't give up with Illustrator) : Inkscape 0.46 now handles transparency
between layers. In the past it was not implemented which was a big
limitation for clean graphical map processing.

VB

Hi all,
just to say that inkscape can import Sketch files (.sk extension) and these can be derived from a ps.map .ps output by pstoedit.

->$ pstoedit -f sk file.ps file.sk

->$ inkscape file.sk

hope it helps

Francesco

Tom Russo wrote:

On Thu, Aug 14, 2008 at 03:49:37PM +0200, we recorded a bogon-computron collision of the <tutey@o2.pl> flavor, containing:

Tom Russo pisze:

<hamish_b@yahoo.com> wrote:

[on alternatives to Adobe Illustrator for tweaking ps.map output]

How about Inkscape or Scribus?
  http://www.inkscape.org/
  http://www.scribus.net/

Both of these are cool programs, and if one could get ps.map's output into
them they'd be great choices for tweaking map presentation. But neither is actually able to import a PDF (or even PostScript) map for editing.

[...]

Inkscape can do a great deal with the graphics if you can get the data imported. But it can't read PDFs or postscript directly.

[...]

Have you actually had success with either of these programs?

Tom,

I also had problem with Inkscape in past, but I just checked 0.46 stock
Debian testing package and it rocks now. See my previous message in the
thread.

Indeed! This is greatly improved from last time I tried it. Inkscape can't
read raw postscript, but can now import pdf better than it used to be able to do last time I tried it. I was able to do a ps2pdf of a map I'd created previously from ps.map and import it into inkscape very nicely. Interestingly, it was better to do ps2pdf on the raw output of ps.map than it was to do a ps2ps first --- the "simplified" postscript from ps2ps turned all of my text into individual glyphs for each letter instead of turning them into text objects that could be edited in inkscape nicely.

There are some odd and annoying artifacts:
  1) All of my text imports oddly formatted, with inter-letter spacing all messed up. All it took to fix this was to ungroup everything until I could select the individual text objects, then edit the text (adding a space and deleting it was sufficient) and click "Apply" --- this fixed all the spacing, but the net effect was that I'd told inkscape to make a null change to the actual text. Nothing else I tried forced it to re-adjust the text spacing properly.

  2) None of the grid lines I'd created with ps.map's "grid" function showed up. The were all hidden in there as paths with no fill. I was able to fix them by opening the "XML Editor" and clicking every path in the list until I started seeing my invisible grid lines --- each path after that was another piece of my grid, and I could set the fill on each one to something useful. But short of editing the XML I was unable to get the grid lines selected through the drawing panel until they were filled.

Even with these annoyances, this still gave me something I could edit nicely --- my primary use for this kind of thing will be to fix up the hideous labeling that ps.map is capable of, since inkscape can allow me to "put text on path" for any arbitrarily shaped path better than v.label can do with it's "curve text to lines" feature.

In all, this was a very nice surprise, since I tried inkscape only a few
months ago and had found it impossible to import ps.map output then.
Thanks for the nudge.

--
##############################################
Francesco Mirabella, PhD
Geologia Strutturale e Geofisica
Universita' di Perugia,
Dipartimento di Scienze della Terra,
Piazza Universita' 1, 06100 Perugia (Italy)
tel: ++39.(0)75.586.7182
fax: ++39.(0)75.585.2603
##############################################