[GRASS-user] v.out.ogr multiple
Moritz Lennert
mlennert at club.worldonline.be
Wed Jul 9 03:35:46 EDT 2008
On 08/07/08 22:33, Gabriele N. wrote:
> Hello.
> I want to create a script bash (GUI) to export many vector in shapefile
> having the opportunity to decide which export layer (0, 1, 2) and
> type=line,area ecc..
Does this mean interactive decision layer by layer, or that the module
should allow for entering layer and type as an option ?
> I would also like to know if you can use the characters as' * 'to be able to
> export all instance vector starting with' nome_vector ....'.
>
> There is already some scripts? If not, I started to write something in bash
> but I am in difficulty.
It will have to be something like:
for map in `g.mlist type=vect pattern=$GIS_OPT_PATTERN
do
v.out.ogr $map type=$GIS_OPT_TYPE layer=$GIS_OPT_LAYER
done
where GIS_OPT_PATTERN would be something like 'nome_vector*'
If you need to automatically decide which layers and types to export,
you might be able to do some grep/awk magic with v.category -g $map
option=report.
Moritz
More information about the grass-user
mailing list