I got two raster files imported in Grass using r.in.gdal, one represents a dem, the other is a “drape”. (the files originated from ArcGIS)
I am setting up a WebGis app (apache, mapserver, php_mapscript) and need a tiff layer to represent elevation and have a image background to put my vectors/points on.
I tried to export the dem file with r.out.gdal, but I obtain something similar to a negative a b/w image with no colors!
Tried several ‘createopt’ but still with no success.
With Grass6.2 everything looks fine.
Whats’ wrong? Should I merge the two raster files first?
I am not a “GIS geek” so any kind of help will be appreciate.
hi,
irrc mapserver can work only with rasters, which have less then 256
values. You can make classes for each elevation level and display it
with desired color, e.g.
CLASS
EXPRESSION ([pixel] = 38)
name '390 - 395 m'
COLOR 253 240 112
END
CLASS
which means, that all pixels with value 38 will represent elevation
between 390 and 395 meters.
Jachym
On Mon, Dec 18, 2006 at 05:05:11PM +0100, Raffaele Morelli wrote:
Hi,
I got two raster files imported in Grass using r.in.gdal, one represents a
dem, the other is a "drape". (the files originated from ArcGIS)
I am setting up a WebGis app (apache, mapserver, php_mapscript) and need a
tiff layer to represent elevation and have a image background to put my
vectors/points on.
I tried to export the dem file with r.out.gdal, but I obtain something
similar to a negative a b/w image with no colors!
Tried several 'createopt' but still with no success.
With Grass6.2 everything looks fine.
Whats' wrong? Should I merge the two raster files first?
I am not a "GIS geek" so any kind of help will be appreciate.
On Monday 18 December 2006 08:05, Raffaele Morelli wrote:
Hi,
I got two raster files imported in Grass using r.in.gdal, one represents a
dem, the other is a "drape". (the files originated from ArcGIS)
I am setting up a WebGis app (apache, mapserver, php_mapscript) and need a
tiff layer to represent elevation and have a image background to put my
vectors/points on.
I tried to export the dem file with r.out.gdal, but I obtain something
similar to a negative a b/w image with no colors!
Tried several 'createopt' but still with no success.
With Grass6.2 everything looks fine.
Whats' wrong? Should I merge the two raster files first?
I am not a "GIS geek" so any kind of help will be appreciate.
Note that r.out.gdal has been updated since I posted these notes. Also- I have
had the best luck using arcinfo (command line) directly to import geotiff
files:
imagegrid * * * *
cheers,
--
Dylan Beaudette
Soils and Biogeochemistry Graduate Group
University of California at Davis
530.754.7341
I got two raster files imported in Grass using r.in.gdal, one
represents a dem, the other is a "drape". (the files originated from
ArcGIS) I am setting up a WebGis app (apache, mapserver,
php_mapscript) and need a tiff layer to represent elevation and have a
image background to put my vectors/points on.
I tried to export the dem file with r.out.gdal, but I obtain something
similar to a negative a b/w image with no colors!
Tried several 'createopt' but still with no success.
With Grass6.2 everything looks fine.
I think that GDAL only saves a color table if you save max 256 values
(type=Byte). Otherwise the meta-data gets too huge.
I got two raster files imported in Grass using r.in.gdal, one represents a
dem, the other is a "drape". (the files originated from ArcGIS)
I am setting up a WebGis app (apache, mapserver, php_mapscript) and need a
tiff layer to represent elevation and have a image background to put my
vectors/points on.
My answer would fit better on the mapserver mailing list, but oh well...
If you have what I have, i.e. a grey-shaded relief in one file and
coloured DEM in another, the best option might be displaying the relief
in the background and overlaying it with a transparent DEM
(TRANSPARENCY 50 in LAYER section). It looks pretty good and it's
actually the only decent option I could come up with. You might also
want to set IMAGETYPE PNG24 if the colours don't look good, but be
aware it enlarges the output image size significantly.
You can see the effect of the above here: http://gis.umcs.lublin.pl/skorowidze/ (the last two layers, hipsometria
and rzezba, are the DEM and the relief respectively).
Przemys³aw,
yes, I have what you got. But what kind of files are you pointing inside
your .map file, GTiff or what?
I'm pointing to .tif files from .map, and they have accompanying .tfw
with georeferences. Example:
LAYER
NAME "rzezba"
CONNECTION GDAL
DATA "rzezba.tif"
TYPE raster
END
Przemysław,
yes, I have what you got. But what kind of files are you pointing inside
your .map file, GTiff or what?
I’m pointing to .tif files from .map, and they have accompanying .tfw
with georeferences. Example:
LAYER
NAME “rzezba”
CONNECTION GDAL
DATA “rzezba.tif”
TYPE raster
END
Here again.
Unfortunately I did not solve the problem but still having problem with visualization under mapserver using GTiff files from r.out.gdal
I used a 8-bit GTiff form ArcGis and everything was quite fine, so I tried to obtain better results with r.out.gdal using type=Byte but in the resulting GTiff I see only a restricted range of colors correctly displayed.
Apologize for being so annoying but didn’t found useful resources on the web, except for an “rgb2pct.py” script from http://gdal.maptools.org which in turns requires gdal be compiled with python support. That may help (unsure) but I hope something else could do the same without recompile.