Hallo,
parsing the output from v.out.ascii format=standard is hard work.
Attached patch adds new output format to v.out.ascii called "script".
With this output, working with vector data in our scripts should be
*much* simpler.
If format=script is choosed, each feature will be printed in one line,
so e.g.
B 6 1
5958812.48844435 3400828.84221011
5958957.29887089 3400877.11235229
5959021.65906046 3400930.7458436
5959048.47580612 3400973.65263665
5959069.92920264 3401032.64947709
5958812.48844435 3400828.84221011
1 1
will become
B:6:1:1 1:5958812.48844435 3400828.84221011:5958957.29887089 3400877.11235229:....
Please applay this patch, if you found it useful (I have no acess to
cvs).
Looking forward to your comments
Jachym
--
Jachym Cepicky
e-mail: jachym.cepicky@centrum.cz
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/gnupg_public_key/jachym_cepicky-gpg_public_key.asc
-----------------------------------------
OFFICE:
GDF-Hannover
Mengendamm 16d
30177 Hannover
Germany
e-mail: cepicky@gdf-hannover.de
URL: http://gdf-hannover.de
Tel.: +49 511-39088507
(attachments)
v.out.ascii.patch (4.7 KB)
Jachym Cepicky wrote:
parsing the output from v.out.ascii format=standard is hard work.
Attached patch adds new output format to v.out.ascii called "script".
With this output, working with vector data in our scripts should be
*much* simpler.
If format=script is choosed, each feature will be printed in one line,
so e.g.
B 6 1
5958812.48844435 3400828.84221011
5958957.29887089 3400877.11235229
5959021.65906046 3400930.7458436
5959048.47580612 3400973.65263665
5959069.92920264 3401032.64947709
5958812.48844435 3400828.84221011
1 1
will become
B:6:1:1 1:5958812.48844435 3400828.84221011:5958957.29887089 3400877.11235229:....
Many of the tools which you might want to use to process such data
may have limits on the maximum length of a line.
Writing scripts which expect all the data on one line is a recipe for
producing scripts which only work with "simple" maps (or which only
work with the GNU versions of the standard tools, as they usually
allocate line buffers dynamically).
--
Glynn Clements <glynn@gclements.plus.com>
hallo,
On Sat, Jun 03, 2006 at 02:52:52AM +0100, Glynn Clements wrote:
Jachym Cepicky wrote:
> parsing the output from v.out.ascii format=standard is hard work.
>
> Attached patch adds new output format to v.out.ascii called "script".
> With this output, working with vector data in our scripts should be
> *much* simpler.
>
> If format=script is choosed, each feature will be printed in one line,
> so e.g.
>
> B 6 1
> 5958812.48844435 3400828.84221011
> 5958957.29887089 3400877.11235229
> 5959021.65906046 3400930.7458436
> 5959048.47580612 3400973.65263665
> 5959069.92920264 3401032.64947709
> 5958812.48844435 3400828.84221011
> 1 1
>
> will become
>
> B:6:1:1 1:5958812.48844435 3400828.84221011:5958957.29887089 3400877.11235229:....
Many of the tools which you might want to use to process such data
may have limits on the maximum length of a line.
Writing scripts which expect all the data on one line is a recipe for
producing scripts which only work with "simple" maps (or which only
work with the GNU versions of the standard tools, as they usually
allocate line buffers dynamically).
--
Glynn Clements <glynn@gclements.plus.com>
you are right. I found another solution
thanks
Jachym
--
Jachym Cepicky
e-mail: jachym.cepicky@centrum.cz
URL: http://les-ejk.cz
GPG: http://les-ejk.cz/gnupg_public_key/jachym_cepicky-gpg_public_key.asc
-----------------------------------------
OFFICE:
GDF-Hannover
Mengendamm 16d
30177 Hannover
Germany
e-mail: cepicky@gdf-hannover.de
URL: http://gdf-hannover.de
Tel.: +49 511-39088507