Opened 9 years ago

Closed 13 months ago

#1077 closed enhancement (fixed)

sync nice features of r.out.tiff, r.out.png

Reported by: hamish Owned by: grass-dev@…
Priority: normal Milestone: 6.4.6
Component: Raster Version: svn-releasebranch64
Keywords: r.out.tiff, r.out.png Cc:
CPU: All Platform: All

Description

Hi,

r.out.tiff has a -t flag to create a world file. r.out.png has a -t flag to make NULL cells transparent.

it would be really useful if they both could have both flags. For use with gdal2tiles.py + OpenLayers? you need both but only can get one or the other! Probably it is some pretty easy cutting and pasting of code between the two modules.

GDAL supports extensions of .pgw, .pngw or .wld for PNG World files. http://gdal.org/frmt_various.html#PNG

(& finally, rename the flags in grass7 to make them consistent)

r.out.gdal is no good here because for OpenLayers? you care about the colors not the data, and gdal is cranky with color maps.

thanks, Hamish

Change History (6)

comment:1 Changed 9 years ago by hamish

workaround: run both r.out.tiff and r.out.png and ship the world file from r.out.tiff with the png from r.out.png

comment:2 Changed 9 years ago by hamish

  • world file export flag added to r.out.png in trunk (r42410)
    • (now output is good for KML and WMS/TMS overlays!)
  • r.out.tiff's -t flag renamed to -w in trunk to match

does TIFF support transparency?

Hamish

comment:3 in reply to:  2 Changed 9 years ago by glynn

Replying to hamish:

does TIFF support transparency?

Yes.

More importantly, transparency is supported by most applications which read TIFF files. What information can be stored in a TIFF file is often less important than what information programs which "support TIFF" understand (e.g. the problems with 16-bit paletted images).

comment:4 Changed 9 years ago by hamish

r.out.png world-file flag backported to 6.5svn in r43655

comment:5 Changed 4 years ago by neteler

Milestone: 6.5.06.4.6
Version: svn-trunksvn-releasebranch64

comment:6 Changed 13 months ago by wenzeslaus

Resolution: fixed
Status: newclosed

The current situation is:

r.out.tiff:

-w
    Output TIFF world file

r.out.png:

-t
    Make NULL cells transparent
-w
    Output world file

So for r.out.png it is addressed fully. For r.out.tiff partially. However, r.out.tiff was moved from core to addons and the web export case is really about r.out.png. Closing as fixed.

Note: See TracTickets for help on using tickets.