Maciej Sieczka wrote: > Hamish wrote: >> Maciej Sieczka wrote: >>> Hamish wrote: >>>> Maciej Sieczka wrote: >>>>> Is: >>>>> >>>>> $ v.type from=point to=centroid; v.type from=line to=boundary; >>>>> >>>>> as fast as: >>>>> >>>>> $ v.type type=point,centroid,line,boundary >>>>> >>>>> ? >>>> No. But it's a very quick operation, so twice as long is still not >>>> very long. >>> ??? >>> >>> This is a regression. If I was to suggest something I'd suggest >>> reverting this change. >> >> two points: >> >> 1) this hasn't been enacted anywhere in the (active) code. This is >> just proposal/preparation for GRASS 7. v.type in 6.3 still does type=,,, > > Yes I know. > >> 2) It is a balance of cost vs benefit. To me, clarity and ease of use >> is more important than ability to do two things at once. The speed hit >> is minimal (I expect you could retype a massive 1 million point LIDAR >> map in a second or two); > > OK. So we need a benchmark.
Done as follows: $ v.info -t mlns nodes=1000000 points=1000000 lines=999000 boundaries=0 centroids=0 areas=0 islands=0 faces=0 kernels=0 primitives=1999000 map3d=0 $ time v.type in=mlns out=mlns_type_once type=point,centroid,line,boundary real 6m37.459s user 6m12.191s sys 0m23.673s $ time `v.type in=mlns out=mlns_type_first type=point,centroid; v.type in=mlns_type_first out=mlns_type_second type=point,centroid` real 6m26.522s user 5m34.141s sys 0m45.615s Actaully, the latter method seems a bit faster. No worries in that case. Sorry for the fuss Hamish. Hope you don't mind :). Maciek _______________________________________________ grass-dev mailing list [email protected] http://grass.itc.it/mailman/listinfo/grass-dev

