Hi Felix,

On Sun, Aug 16, 2009 at 7:37 PM, Felix Schalck<felix.scha...@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

Attachment: ogr_shape_merge.sh
Description: Bourne shell script

_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to