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

Markus Neteler neteler at osgeo.org
Sun Aug 16 20:20:05 EDT 2009


Hi Felix,

On Sun, Aug 16, 2009 at 7:37 PM, Felix Schalck<felix.schalck at gmail.com> wrote:
...
> a - Importing the vectors from SWBD is no problem, tough It would be
> nice to have the 200+ NASA shapefiles merged BEFORE importing a new
> layer in GRASS. Is this possible with ogr2ogr ?

Merge of two SHAPE files 'file1.shp' and 'file2.shp' into a new file
'file_merged.shp' is performed like this:

# note order "out", then "in":
ogr2ogr file_merged.shp file1.shp
ogr2ogr -update -append file_merged.shp file2.shp -nln file_merged file2

The second command is opening file_merged.shp in update mode, and
trying to find existing layers and append the features being copied.
The -nln option sets the name of the layer to be copied to.

Attached a script to do as many as you want.

> b - The big problem are coastlines and waterbodies (+main rivers):
> somehow I have to show them on the topographic map, which gdalwarp has
> filled out with -32768 values in nodata-waterzones. So either I cut
> waterbodies out of the topographic raster along the vectors, or I
> somehow have GRASS compute me all waterbodies from the vector layer,
> fill them with a nice blue and create a raster which can be pasted
> over the topographic raster to get the final map.  It seems doable
> with mapcalc, but frankly, I do not know at all how to proceed. Any
> help here would be greatly appreciated.

Not sure, but set -32768 to NULL (no data) with r.null?
Then use r.colors (nv to set color for NULL):
http://grass.osgeo.org/grass64/manuals/html64_user/r.colors.html

cheers
Markus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ogr_shape_merge.sh
Type: application/x-sh
Size: 723 bytes
Desc: not available
Url : http://lists.osgeo.org/pipermail/grass-user/attachments/20090817/21e95f19/ogr_shape_merge.sh


More information about the grass-user mailing list