[GRASS-dev] gis.m: how to create high-resolution graphics file ?

Hello,

I am trying to export a high resolution jpeg or ppm from the map display, but I just can't seem to find a way to do this. All I get are fairly low resolution files. Have I missed something ? How can I configure this (beyong chosing jpeg quality) ?

The same goes for printing to eps or pdf.

Moritz

Moritz,

In terms of raster, you can only get what is in the display. That is, you
can't get higher resolution than you can see. This is pretty good if you
expand the display to your full screen, but it may not be enough for what
you want I suppose.

Under the print menubutton, you can export to eps. This is a high as it
gets. There is text in eps format--so it will look very good--but vectors
are still rendered on-screen as rasters. This is a function of the GRASS
display libraries/functions. It would be nice to have vectors rendered as
vector objects, of course, but this will take some rewriting. OTOH, this is
the direction we are trying to take the GUI/display architecture.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: Moritz Lennert <mlennert@club.worldonline.be>
Date: Wed, 24 May 2006 22:54:46 +0200
To: Grass Developers List <grass-dev@grass.itc.it>, Michael Barton
<michael.barton@asu.edu>
Subject: gis.m: how to create high-resolution graphics file ?

Hello,

I am trying to export a high resolution jpeg or ppm from the map
display, but I just can't seem to find a way to do this. All I get are
fairly low resolution files. Have I missed something ? How can I
configure this (beyong chosing jpeg quality) ?

The same goes for printing to eps or pdf.

Moritz

Correct me if I'm wrong but isn't that the function of the res parameter?
I think res=4 outputs a png at 4 times the current display size.

d.out.png --help
Description:
Saves active display monitor to PNG file in home directory
Usage:
d.out.png output=string [res=value]
Parameters:
  output Name of PNG file
     res Resolution of output file (single=1, double=2, quad=4)
           default: 2

On 5/25/06, Michael Barton <michael.barton@asu.edu> wrote:

Moritz,

In terms of raster, you can only get what is in the display. That is, you
can't get higher resolution than you can see. This is pretty good if you
expand the display to your full screen, but it may not be enough for what
you want I suppose.

Under the print menubutton, you can export to eps. This is a high as it
gets. There is text in eps format--so it will look very good--but vectors
are still rendered on-screen as rasters. This is a function of the GRASS
display libraries/functions. It would be nice to have vectors rendered as
vector objects, of course, but this will take some rewriting. OTOH, this is
the direction we are trying to take the GUI/display architecture.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

> From: Moritz Lennert <mlennert@club.worldonline.be>
> Date: Wed, 24 May 2006 22:54:46 +0200
> To: Grass Developers List <grass-dev@grass.itc.it>, Michael Barton
> <michael.barton@asu.edu>
> Subject: gis.m: how to create high-resolution graphics file ?
>
> Hello,
>
> I am trying to export a high resolution jpeg or ppm from the map
> display, but I just can't seem to find a way to do this. All I get are
> fairly low resolution files. Have I missed something ? How can I
> configure this (beyong chosing jpeg quality) ?
>
> The same goes for printing to eps or pdf.
>
> Moritz

_______________________________________________
grass-dev mailing list
grass-dev@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass-dev

--
"Wish not to seem, but to be, the best."
                -- Aeschylus

With res= >1 though, the rescaling of the map decorations and text is strange.

David

On 5/24/06, Joel Pitt <joel.pitt@gmail.com> wrote:

Correct me if I'm wrong but isn't that the function of the res parameter?
I think res=4 outputs a png at 4 times the current display size.

d.out.png --help
Description:
Saves active display monitor to PNG file in home directory
Usage:
d.out.png output=string [res=value]
Parameters:
  output Name of PNG file
     res Resolution of output file (single=1, double=2, quad=4)
           default: 2

On 5/25/06, Michael Barton <michael.barton@asu.edu> wrote:
> Moritz,
>
> In terms of raster, you can only get what is in the display. That is, you
> can't get higher resolution than you can see. This is pretty good if you
> expand the display to your full screen, but it may not be enough for what
> you want I suppose.
>
> Under the print menubutton, you can export to eps. This is a high as it
> gets. There is text in eps format--so it will look very good--but vectors
> are still rendered on-screen as rasters. This is a function of the GRASS
> display libraries/functions. It would be nice to have vectors rendered as
> vector objects, of course, but this will take some rewriting. OTOH, this is
> the direction we are trying to take the GUI/display architecture.
>
> Michael
> __________________________________________
> Michael Barton, Professor of Anthropology
> School of Human Evolution & Social Change
> Center for Social Dynamics and Complexity
> Arizona State University
>
> phone: 480-965-6213
> fax: 480-965-7671
> www: http://www.public.asu.edu/~cmbarton
>
> > From: Moritz Lennert <mlennert@club.worldonline.be>
> > Date: Wed, 24 May 2006 22:54:46 +0200
> > To: Grass Developers List <grass-dev@grass.itc.it>, Michael Barton
> > <michael.barton@asu.edu>
> > Subject: gis.m: how to create high-resolution graphics file ?
> >
> > Hello,
> >
> > I am trying to export a high resolution jpeg or ppm from the map
> > display, but I just can't seem to find a way to do this. All I get are
> > fairly low resolution files. Have I missed something ? How can I
> > configure this (beyong chosing jpeg quality) ?
> >
> > The same goes for printing to eps or pdf.
> >
> > Moritz
>
> _______________________________________________
> grass-dev mailing list
> grass-dev@grass.itc.it
> http://grass.itc.it/mailman/listinfo/grass-dev
>

--
"Wish not to seem, but to be, the best."
                -- Aeschylus

_______________________________________________
grass-dev mailing list
grass-dev@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass-dev

--
David Finlayson

D.out.png was my first script. The resolution parameter was a multiplier to
change the display geometry prior to output to a png file. It was never
completely satisfactory because of its effects on vectors, text, and display
enhancements like scalebars. These would shrink in size to become nearly
unreadable. The saved graphic file, then did not look like what you saw on
the screen.

The current display architecture no longer writes to a png file (although
ironically it uses the PNG driver). It writes to a PPM file. The save file
routine then uses gdal to translate the PPM into other formats. It looks
like it might be possible to implement the multiplier back into the output
geometry, but I'm not sure that the results are desirable.

Michael

On 5/24/06 5:04 PM, "Joel Pitt" <joel.pitt@gmail.com> wrote:

Correct me if I'm wrong but isn't that the function of the res parameter?
I think res=4 outputs a png at 4 times the current display size.

d.out.png --help
Description:
Saves active display monitor to PNG file in home directory
Usage:
d.out.png output=string [res=value]
Parameters:
  output Name of PNG file
     res Resolution of output file (single=1, double=2, quad=4)
           default: 2

On 5/25/06, Michael Barton <michael.barton@asu.edu> wrote:

Moritz,

In terms of raster, you can only get what is in the display. That is, you
can't get higher resolution than you can see. This is pretty good if you
expand the display to your full screen, but it may not be enough for what
you want I suppose.

Under the print menubutton, you can export to eps. This is a high as it
gets. There is text in eps format--so it will look very good--but vectors
are still rendered on-screen as rasters. This is a function of the GRASS
display libraries/functions. It would be nice to have vectors rendered as
vector objects, of course, but this will take some rewriting. OTOH, this is
the direction we are trying to take the GUI/display architecture.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: Moritz Lennert <mlennert@club.worldonline.be>
Date: Wed, 24 May 2006 22:54:46 +0200
To: Grass Developers List <grass-dev@grass.itc.it>, Michael Barton
<michael.barton@asu.edu>
Subject: gis.m: how to create high-resolution graphics file ?

Hello,

I am trying to export a high resolution jpeg or ppm from the map
display, but I just can't seem to find a way to do this. All I get are
fairly low resolution files. Have I missed something ? How can I
configure this (beyong chosing jpeg quality) ?

The same goes for printing to eps or pdf.

Moritz

_______________________________________________
grass-dev mailing list
grass-dev@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass-dev

___________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics & Complexity
Arizona State University

WWW - http://www.public.asu.edu/~cmbarton
Phone: 480-965-6262
Fax: 480-965-7671

> Correct me if I'm wrong but isn't that the function of the res
> parameter? I think res=4 outputs a png at 4 times the current
> display size.

also d.out.file or just the PNG driver with GRASS_WIDTH and GRASS_HEIGHT
set to the desired size.

With res= >1 though, the rescaling of the map decorations and text is
strange.

Grid lines, etc, will still only be drawn 1 pixel wide, so on resize
they tend to disappear.

> > > I am trying to export a high resolution jpeg or ppm from the map
> > > display, but I just can't seem to find a way to do this. All I
> > > get are fairly low resolution files. Have I missed something ?
> > > How can I configure this (beyong chosing jpeg quality) ?
> > >
> > > The same goes for printing to eps or pdf.

If you want good looking poster size graphics [with decorations] you
need to use ps.map. It's a little to learn but it can make Very nice
results.

FWIW, for work I do a lot of map output and use d.* for presentaion &
web graphics, and ps.map for printed reports and journal figures. GMT
might be better for journal figures but I haven't spent the time on
getting good with it.

Hamish

I would add that the GIMP has tools to oversample images (to increase
resolution). This way has the advantage that the map decorations scale
with the background. The usual problems with increasing the resolution
of a bitmap apply.

On 5/24/06, Hamish <hamish_nospam@yahoo.com> wrote:

> > Correct me if I'm wrong but isn't that the function of the res
> > parameter? I think res=4 outputs a png at 4 times the current
> > display size.

also d.out.file or just the PNG driver with GRASS_WIDTH and GRASS_HEIGHT
set to the desired size.

> With res= >1 though, the rescaling of the map decorations and text is
> strange.

Grid lines, etc, will still only be drawn 1 pixel wide, so on resize
they tend to disappear.

> > > > I am trying to export a high resolution jpeg or ppm from the map
> > > > display, but I just can't seem to find a way to do this. All I
> > > > get are fairly low resolution files. Have I missed something ?
> > > > How can I configure this (beyong chosing jpeg quality) ?
> > > >
> > > > The same goes for printing to eps or pdf.

If you want good looking poster size graphics [with decorations] you
need to use ps.map. It's a little to learn but it can make Very nice
results.

FWIW, for work I do a lot of map output and use d.* for presentaion &
web graphics, and ps.map for printed reports and journal figures. GMT
might be better for journal figures but I haven't spent the time on
getting good with it.

Hamish

--
David Finlayson

Hamish wrote:

> With res= >1 though, the rescaling of the map decorations and text is
> strange.

Grid lines, etc, will still only be drawn 1 pixel wide, so on resize
they tend to disappear.

Yep. This is one of the most fundamental problems with the display
architecture.

It isn't easily fixed, either. Once you go beyond single-pixel lines,
you have to start dealing with joins and caps, and you have to
distinguish between a path consisting of multiple line segments and a
sequence of separate lines.

One of my longer term plans is to migrate d.* commands away from the
low-level R_* commands to the relatively higher-level D_* commands,
and to add more primitives[1]. That would make it practical for the
display library to (optionally) generate PostScript rather than use
its own renderer.

[1] Adding new primitives is a lot easier if you just have to add a
function to a library, rather than (as is the case at present) add the
R_* function to lib/raster/protocol.c, add the opcode to
include/graphics.h, add a new case to display/drivers/lib/command.c,
add implementations to display/drivers/{PNG,XDRIVER}, add a
dispatch-table entry to display/drivers/lib/driver.h, and initialise
the entries in display/drivers/{PNG,XDRIVER}/main.c.]

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

Hamish wrote:

Correct me if I'm wrong but isn't that the function of the res
parameter? I think res=4 outputs a png at 4 times the current
display size.

also d.out.file or just the PNG driver with GRASS_WIDTH and GRASS_HEIGHT
set to the desired size.

Yes, but d.out.png and d.out.file are only available when using the old monitors. At least, I get:

***You must select a display monitor***

So, yes, I can get a nice map by going through the "old" system or through the d.out.png driver.
My question concerned exporting a map directly from the gis.m map display to a high resolution file.

Moritz

Michael Barton wrote:

Moritz,

In terms of raster, you can only get what is in the display. That is, you
can't get higher resolution than you can see. This is pretty good if you
expand the display to your full screen, but it may not be enough for what
you want I suppose.

No, even if I expand to full screen, the resolution is not print-ready in my eyes.

Under the print menubutton, you can export to eps. This is a high as it
gets. There is text in eps format--so it will look very good--but vectors
are still rendered on-screen as rasters. This is a function of the GRASS
display libraries/functions. It would be nice to have vectors rendered as
vector objects, of course, but this will take some rewriting. OTOH, this is
the direction we are trying to take the GUI/display architecture.

Let's hope that Glynn gets around his "longer term" plans of migrating to D_* commands soon... :wink:

Moritz

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: Moritz Lennert <mlennert@club.worldonline.be>
Date: Wed, 24 May 2006 22:54:46 +0200
To: Grass Developers List <grass-dev@grass.itc.it>, Michael Barton
<michael.barton@asu.edu>
Subject: gis.m: how to create high-resolution graphics file ?

Hello,

I am trying to export a high resolution jpeg or ppm from the map
display, but I just can't seem to find a way to do this. All I get are
fairly low resolution files. Have I missed something ? How can I
configure this (beyong chosing jpeg quality) ?

The same goes for printing to eps or pdf.

Moritz

_______________________________________________
grass-dev mailing list
grass-dev@grass.itc.it
http://grass.itc.it/mailman/listinfo/grass-dev

Moritz,

I recently created GRASS output for a large banner 72"x24". The images were
8"x10" or larger. I expanded my display to match my iMac screen and they
came out looking very good. I used Inkscape to add nice looking text.

Michael
__________________________________________
Michael Barton, Professor of Anthropology
School of Human Evolution & Social Change
Center for Social Dynamics and Complexity
Arizona State University

phone: 480-965-6213
fax: 480-965-7671
www: http://www.public.asu.edu/~cmbarton

From: Moritz Lennert <mlennert@club.worldonline.be>
Date: Fri, 26 May 2006 13:02:54 +0200
To: Michael Barton <michael.barton@asu.edu>
Cc: Grass Developers List <grass-dev@grass.itc.it>
Subject: Re: [GRASS-dev] Re: gis.m: how to create high-resolution graphics
file ?

In terms of raster, you can only get what is in the display. That is, you
can't get higher resolution than you can see. This is pretty good if you
expand the display to your full screen, but it may not be enough for what
you want I suppose.

No, even if I expand to full screen, the resolution is not print-ready
in my eyes.