[GRASS-user] Very high resolution topographic map of Europe: need help and advices

Markus Neteler neteler at osgeo.org
Wed Aug 12 10:31:43 EDT 2009


On Wed, Aug 12, 2009 at 4:06 PM, Felix Schalck<felix.schalck at gmail.com> wrote:
> Dear Markus,
>
> Thank you soooo much for your response; it provided me with valuables
> hints - but also with new questions.

Sure: things at that level aren't naturally obvious.

> First, following your avice, I finally decided to compile the new
> GRASS6.4rc5. Having an amd64 cpu, there war no binary available; so I
> had to do the job myself. Let's face it: manual configuration is a
> pain for a newcommer like me,

You mean to find all dependences?
We have collection some help in the Wiki:
http://grass.osgeo.org/wiki/Compile_and_Install

> but once the ./configure script shows
> the long awaited final recap, the make command - although quite long -

If you have a dual/multi-core CPU, you can use
make -j2
make -j4
or so to be much faster (I always use make -j4).

> runs withouth a hitch. I reminds me of good ol' freebsd days, although
> we had a lot more troubles finishing compilation without errors: great
> job guys ! But the resulat was worth it; I don't know if it is the
> work you've done for the last few years, or the gcc optiomization
> flags (or perhaps both of it), but the resulting grass64 runs like a
> fireball compared to my old 6.2 bin provided by the Ubuntu repos.
> Again: great job !

Fantastic!

> Only now I fully understand what you meant by "it
> is so far the only convincing software for GIS number crunching". But
> let's go back to the topic: my high-resolution topographic map of
> Europe.
>
> Thanks to your advices, the production outline has changed to this:
>
> 1. Merge the cgiar TIFs (AND NOT THE GRASS RASTERS IF I GOT THIS
> CORRECTLY) thanks to gdalwrap command. In what projection does this
> command work ? Is it possible to wrap the TIF directlly in my lcc
> projection ?

I tried that yesterday and did NOT have luck. I would do it two-pass,
even if it consumes twice as much space temporaneously:

a) gdalwarp: all into one file, keeping the projection (mosaicking)
b) gdalwarp: reproject to LCC (note that there are EU LCC and others).

Use your preferred resampling method (gdalwarp offers several).

Perhaps I got something wrong and you can do it in one step as well.

> 2. Add image pyramids with gdaladdo (< I frankly do not underdand this
> one at all; what does it mean ?)

OK, it means that map copies at lower to much lower resolution are
stored in the GeoTIFF (or different format which supports pyramids)
file. When then opening with QGIS, Mapserver etc, it takes advantage
of that and speeds up in an impressive way the visualization.
Of course the file size increases.

Example: I take "world natural earth 250m" which is huge; to cover
Europe you need to download 4 tiles = 8 GB. I added pyramids with
gdaladdo and now I am able to open these huge 4 tiles in no time
in one step with QGIS. It's a convenience.

> 3. Shaded relief: I don't know your gdalhillshade command at all. Does
> it produce the same results as the r.shaded.relief I was planning to
> use ? Can you set the illumination angle with gdalhilshade ?

Yes.
I realise that it is called "gdaldem" now.
http://trac.osgeo.org/gdal/browser/trunk/gdal/apps/gdaldem.cpp
http://gdal.org/gdaldem.html

> 4. Re-gdaladdo for the shaded tif.

yes.

> 5. Import in GRASS and checkout results. If I'm right, I will have two
> layers at this point, one with the relief colors, one with the
> shadings.

Right (say, one is the relief [colors are optional], the other the shadings).
You can use d.his or r.his to make a nice shaded colorized terrain
map, something like this:
http://grass.osgeo.org/grass60/screenshots/images/etopo2_grass_laea_9_48N_0E.jpg

> 6. Coastlines and Rivers. I was planning to use SWBD(coastlines and
> main rivers) and VLMAP0 Data (for the secondary rivers). Here again,
> you provide me with a complete new set of tools:
> r.external/r.terraflow/r.mapcalc/. What is the general idea behind ?

r.external you would use in step 5. Instead of r.in.gdal.

r.terraflow/r.mapcalc you may forget since I didn't understand that you
would take the rivers as vector maps (I thought you wanted to extract
them from the DEM).

> I checked the man pages, but I don't really understand how to use them
> for my purpose. My plan was to import the shapefile into the right
> projection with rvin.ogr,

v.in.ogr (or v.external).

> and than export svg files for rework BEFORE
> joining the river layer and the topographic layers; but perhaps your
> way, once I understand it, is more efficient.

Not sure (since I was confused :).

> 7. Export the shaded topography with r.out.png in one big png. Do I
> need two files (one containing the shadings, one with the relief
> colors) ?

If you do the color shading in GRASS, then you need to export
only one file.

> 8. Merge topography and hydrography layers in GIMP.

Yes, sounds reasonable.

Please consider to document your steps in the GRASS Wiki,
it could be useful in future for others.

Good luck
Markus


More information about the grass-user mailing list