[GRASSLIST:6573] Re: [GRASS5] Re: Re: problem importing vector
Lorenzo Moretti
lorenzo.moretti at bologna.enea.it
Wed Apr 20 08:52:38 EDT 2005
Hi Hamish
>Ok, I've done this; needed to add a v.type step before and after v.split
>as it doesn't support boundaries yet. Also note that it lost the DB
>connection during the v.split step, but easy enough to reconnect to
>original DB when done.
>
>
>BEFORE:
>
>time v.in.ogr dsn=`pwd` layer=Coast_islands out=test_pre
>real 576m40.151s
>user 572m45.630s
>sys 2m55.560s
>
>
>AFTER:
>
>_method_
>v.in.ogr -c
>v.type type=boundary,line
>v.split
>v.type type=line,boundary
>v.clean tool=break
>db.copy
>v.db.connect
>
>
>time v.in.ogr -c dsn=`pwd` layer=Coast_islands out=test_pre
>real 2m34.380s
>user 1m47.290s
>sys 0m42.980s
>
>v.type in=test_pre out=test_pre2 type=boundary,line
>v.split in=test_pre2 out=test_pre3 vertices=100
>v.type in=test_pre3 out=test_pre4 type=line,boundary
>[all fast]
>
>time v.clean in=test_pre4 out=test_pre5 tool=break
>real 0m41.982s
>user 0m41.310s
>sys 0m0.580s
>
>db.copy from_table=test_pre to_table=test_pre5
>v.db.connect test_pre5 table=test_pre5
>[fast]
>
>
>9.6 hours -> 3.25 minutes. Not bad, I think you guessed correctly Radim...
>[2.8GHz P4, Linux]
>
>
>Hamish
I've applied your PATCH to vector/v.in.ogr/geom.c.
All OS X users can download last cvs version (050419) with this patch
at: http://wwwamb.bologna.enea.it/forgrass/downloadcvs.htm.
I have tried with some old shape that have problems in Grass with normal:
v.in.ogr -o
... and I have the same problems than before: infinite loop. I have
killed v.in.ogr.
After I have followed your method (a bit complex)
>v.in.ogr -c -o (-c is been used with some complex shapes)
>v.type type=boundary,line
>v.split
>v.type type=line,boundary
>v.clean tool=break
>db.copy
>v.db.connect
and from X11 terminal this method works in OS X and it's fast.
This is a good news but the method is not very easy.
I have retry the same commands from wish app in X11 and AQUA
environment (graphic method) (v.type in graphic window is not good)
but v.clean send to crash my Wish app, only wish app.
Why wish app is more unstable with some commands with some vector layer?
Bye
--
________________________________________________________________________
|| Lorenzo Moretti e-mail: lorenzo.moretti at bologna.enea.it
||/|/| ENEA prot/idr Web: http://wwwamb.bologna.enea.it/
|| | via Don Fiammelli, 2 FTP: ftp://ftpamb.bologna.enea.it/ (res.)
~~~~~~ 40128 BOLOGNA - ITALY Ph: +39-0516098086 Fax: +39-0516098131
Download GRASS for MAC OS X:
http://wwwamb.bologna.enea.it/forgrass/
________________________________________________________________________
More information about the grass-user
mailing list