[GRASS-user] d.out.file now does GeoTIFFs
Glynn Clements
glynn at gclements.plus.com
Thu Oct 30 12:49:50 EDT 2008
Hamish wrote:
> > I just found out that the output from d.out.file geotiff
> > has some distortions.
> >
> > See this:
> > http://farm4.static.flickr.com/3007/2984908579_b73cdd3b99_o.png
> >
> > The lighter relief is the original raster from the GRASS dbase and the
> > darker one with some green vector is the d.out.file output.
>
> Can you try again with today's SVN? You need to update the d.info
> module as well. I think it should be better now.
>
> > I'm using qgis to visualize.
>
> yes me too, "qgis known_good.tif new.tif" and setting the transparency
> to 50% is a very fast way of checking.
>
>
> Today I hope to enable margin removal for all d.out.file formats.
> (a flag to keep them is already in place)
>
> I'd like to get rid of the "sleep" steps though (AFAIR the PNG driver
> may still be working after "d.mon stop" returns)
This shouldn't happen. R_kill_driver() sends GRAPH_CLOSE to the
monitor, then tries to read() one byte. As the monitor never sends
this byte, the read() will block until it sees EOF, which happens when
the monitor terminates.
Similarly, R_close_driver() won't return until the driver's Respond()
method has completed. For the PNG driver, this means writing the image
if GRASS_PNG_AUTO_WRITE=TRUE.
> Is GRASS_PNG_AUTO_WRITE the solution? or RENDER_IMMEDIATE ..?
For output, you should probably be using GRASS_RENDER_IMMEDIATE rather
than the PNG driver.
In 6.3.0 and later, you can use GRASS_PNG_READ to have the driver
overlay its output onto an existing image rather than replacing it.
GRASS_PNG_READ requires that the image already exists with the correct
format and dimensions. Typical usage:
GRASS_RENDER_IMMEDIATE=TRUE
GRASS_PNG_READ=FALSE
export GRASS_RENDER_IMMEDIATE GRASS_PNG_READ
d.erase
GRASS_PNG_READ=TRUE
<more d.* commands>
GRASS_PNG_AUTO_WRITE only matters if you are using a PNG monitor
rather than immediate rendering, and you need the file to be written
after each d.* command. Without GRASS_PNG_AUTO_WRITE, the file will
only be written when the driver is terminated with "d.mon stop=PNG".
--
Glynn Clements <glynn at gclements.plus.com>
More information about the grass-user
mailing list