How to export a GTiff with its GDAL colour table, in GRASS, which is suitable for Adobe Illustrator?

How to export a GTiff with its GDAL colour table, in GRASS, which is suitable for Adobe Illustrator?

I've created a new raster in GRASS, starting from a dem and using the commands r.relief and r.shade.

Now I would like to export this new raster as a georeferenced image and import it in Adobe Illustrator (using MAPublisher plugin).

I'm trying to do it using the command r.out.gdal and exporting it as GTiff with its colour table using UInt16 data type, with no success…

Have you got any suggestion?

I don't think that Adobe Illustrator can read UInt16 data, so you have to rescale your raster first with r.rescale to 0-255 values and then export it with r.out.gdal with optiontype=Byteto Byte datatype.

All GRASS color tables formats (v.6.4) are in this link:

If you have GRASS 6.4 in Linux, they are in /usr/lib/grass64/etc/colors.

For example, if you used the elevation table, this is the format:

0% 0 191 191 20% 0 255 0 40% 255 255 0 60% 255 127 0 80% 191 127 63 100% 200 200 200

Copy the above information as elevation.text and use the gdaldem command for producing your colored raster. The sintaxis of gdaldem color-relief would be (assuming your exported uncolored raster as input_raster.tif):

gdaldem color-relief input_raster.tif elevation.txt output_raster.tif

I ran the command in GRASS console. This is the result in my system when I loaded the output_raster.tif in QGIS. It can be observed that is a rgb image (corroborated with Value Tool Plugin).

You can do the same (but it is more difficult because there is not ColorRampItem definitions for the renderer) by using the Python Console of QGIS; as is exposed here: QGis Save Raster as Rendered Image

Using the GRASSr.out.gdalmodule, you specifycreateopt="TFW=YES"to get a *.tfw world file. When exporting with type=UInt16 you should also get the proper colors saved into the geotiff. (I don't know specifically if Adobe iluustrator will read those tif color ramp headers)

Le portail francophone de la géomatique

  • Imagerie Géospatiale
  • Geospatial made in France
  • GéoTrouveTout
  • Humblogue
  • le blog decigeo
  • GeoConcept
  • arcOrama, un blog sur les SIG, ceux d ESRI en particulier
  • arcOpole - Actualité du Programme
  • Géoclip, le générateur d'observatoire cartographique
  • Le blog de Geomatys
  • Camptocamp
  • Cartographie – Icem7
  • Géoblogs (
  • Geotribu
  • neogeo
  • UrbaLine
  • Les cafés géographiques
  • Les blogs du Diplo - Visions cartographiques
  • Oslandia
  • A GeoSpatial World
  • Cartes et Cartographie / Maps and Mapping
  • Sample Digital Orthophoto Images
  • Blog d'Intelli3
  • Audissey
  • GeoReader's Digest
  • Le blog d'Henri Pornon
  • Data and GIS tips
  • Geo By The Cloud
  • 123 Opendata
  • ReLucBlog
  • L'Atelier de Cartographie
  •, le blog » Cartographie
  • Cartes et figures du monde
  • l'aménagerie » SIG
  • Libertic
  • My Geomatic
  • OpenStreetMap France
  • Sigea : actualités
  • Géosource
  • archeomatic
  • Geographica » Cartographica
  • Tutoriels et formations gratuits des logiciels SIG ArcGIS, MapInfo, ArcView GIS etc.
  • simon mercier
  • Séries temporelles (CESBIO)
  • Veille cartographie
  • Chroniques Cartographiques
  • Carnet (neo)cartographique
  • Geomatick
  • Planet Geospatial -
  • Google Maps Mania
  • All Points Blog
  • Directions Media - Podcasts
  • Navx
  • James Fee GIS Blog
  • OGC News Feed

Watch the video: how to export georeferenced map Geotiff from ArcGIS