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..
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.
Thank you
Gabriele
--
View this message in context: http://www.nabble.com/v.out.ogr-multiple-tp18348459p18348459.html
Sent from the Grass - Users mailing list archive at Nabble.com.
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
Hi Moritz.
Moritz Lennert-2 wrote:
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
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
I would like to insert layer and type as an option.
Attached is what I have done (GUI and script). However, there are errors.
http://www.nabble.com/file/p18356967/Schermata-v.out.ogr_multiplo.sh.png
Schermata-v.out.ogr_multiplo.sh.png
http://www.nabble.com/file/p18356967/v.out.ogr_multiplo.sh
v.out.ogr_multiplo.sh
Where I wrong?
Thank you
Gabriele
--
View this message in context: http://www.nabble.com/v.out.ogr-multiple-tp18348459p18356967.html
Sent from the Grass - Users mailing list archive at Nabble.com.
On 09/07/08 10:42, Gabriele N. wrote:
Hi Moritz.
Moritz Lennert-2 wrote:
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
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
I would like to insert layer and type as an option.
Attached is what I have done (GUI and script). However, there are errors. http://www.nabble.com/file/p18356967/Schermata-v.out.ogr_multiplo.sh.png Schermata-v.out.ogr_multiplo.sh.png http://www.nabble.com/file/p18356967/v.out.ogr_multiplo.sh
v.out.ogr_multiplo.sh
Where I wrong?
It would be easier to help you if you gave us more information about the errors...
But from looking at your script, I already see this:
for map in g.mlist type=vect pattern=$GIS_OPT_PATTERN
should be:
for map in `g.mlist type=vect pattern=$GIS_OPT_PATTERN`
note the backticks (`)
and then
v.out.ogr input=${map} ...
should be v.out.ogr input=$map
Moritz
Moritz
Thanks Moritz.
I have made some improvements.
I give you an example and the new script. Now I export all vectors with
name that starts with "foglio_1"
But I do not know how to select a folder where to export the shapes. Now,
only works if I enter the path by hand or select from a graphical user
interface a file in the folder (prova).
But it begins to work 
Still suggestions?
Thanks
Gabriele
http://www.nabble.com/file/p18359390/Schermata-v.out.ogr_multiplo.sh.png
Schermata-v.out.ogr_multiplo.sh.png
http://www.nabble.com/file/p18359390/v.out.ogr_multiplo.sh
v.out.ogr_multiplo.sh
Moritz Lennert-2 wrote:
On 09/07/08 10:42, Gabriele N. wrote:
Hi Moritz.
Moritz Lennert-2 wrote:
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
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
I would like to insert layer and type as an option.
Attached is what I have done (GUI and script). However, there are errors.
http://www.nabble.com/file/p18356967/Schermata-v.out.ogr_multiplo.sh.png
Schermata-v.out.ogr_multiplo.sh.png
http://www.nabble.com/file/p18356967/v.out.ogr_multiplo.sh
v.out.ogr_multiplo.sh
Where I wrong?
It would be easier to help you if you gave us more information about the
errors...
But from looking at your script, I already see this:
for map in g.mlist type=vect pattern=$GIS_OPT_PATTERN
should be:
for map in `g.mlist type=vect pattern=$GIS_OPT_PATTERN`
note the backticks (`)
and then
v.out.ogr input=${map} ...
should be v.out.ogr input=$map
Moritz
Moritz
_______________________________________________
grass-user mailing list
grass-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/grass-user
--
View this message in context: http://www.nabble.com/v.out.ogr-multiple-tp18348459p18359390.html
Sent from the Grass - Users mailing list archive at Nabble.com.