Following-up on this one the v.buffer command also works for me with anisotropic polygon buffers when running GRASS 6.4.0RC4 on Ubuntu 8.04.<br /><br />Thanks for the help, and looks like it is a Windows specific bug.<br /><br />Apologies too if this doesn&#39;t land in the right place in the thread, I&#39;m not sure how to respond to these things properly with g-mail.<br /><br />Brian.<br /><br />On Jun 8, 2009 4:36pm, Markus Neteler &lt;neteler@osgeo.org&gt; wrote:<br />&gt; (cc grass-dev for inspection)<br />&gt; <br />&gt; <br />&gt; <br />&gt; On Mon, Jun 8, 2009 at 10:35 PM, Brian Krzyscokrzys@gmail.com&gt; wrote:<br />&gt; <br />&gt; &gt; Hi,<br />&gt; <br />&gt; &gt;<br />&gt; <br />&gt; &gt; I am trying to use v.buffer to create anisotropic buffers around polygons,<br />&gt; <br />&gt; &gt; and it doesn&#39;t seem to work.  Example command included below, and error<br />&gt; <br />&gt; &gt; message attached.  I am running 6.4.0 on Win XP.<br />&gt; <br />&gt; &gt;<br />&gt; <br />&gt; &gt; v.buffer input=AltPolys@MAPSET1 output=t1 distance=500 minordistance=100<br />&gt; <br />&gt; &gt; angle=45<br />&gt; <br />&gt; &gt;<br />&gt; <br />&gt; &gt; The ability to create anisotropic buffers seems like a great recent<br />&gt; <br />&gt; &gt; addition, and I am using it quite effectively for points, maybe just isn&#39;t<br />&gt; <br />&gt; &gt; setup for polygons?<br />&gt; <br />&gt; <br />&gt; <br />&gt; On Linux, this seems to work.<br />&gt; <br />&gt; <br />&gt; <br />&gt; Here a memory test:<br />&gt; <br />&gt; <br />&gt; <br />&gt; valgrind --tool=memcheck --leak-check=yes --show-reachable=yes  $CMD --o<br />&gt; <br />&gt; ==7737== Memcheck, a memory error detector.<br />&gt; <br />&gt; ==7737== Copyright (C) 2002-2008, and GNU GPL&#39;d, by Julian Seward et al.<br />&gt; <br />&gt; ==7737== Using LibVEX rev 1884, a library for dynamic binary translation.<br />&gt; <br />&gt; ==7737== Copyright (C) 2004-2008, and GNU GPL&#39;d, by OpenWorks LLP.<br />&gt; <br />&gt; ==7737== Using valgrind-3.4.1, a dynamic binary instrumentation framework.<br />&gt; <br />&gt; ==7737== Copyright (C) 2000-2008, and GNU GPL&#39;d, by Julian Seward et al.<br />&gt; <br />&gt; ==7737== For more details, rerun with: -v<br />&gt; <br />&gt; ==7737==<br />&gt; <br />&gt; WARNING: Vector map  already exists and will be overwritten<br />&gt; <br />&gt; ==7737== Syscall param write(buf) points to uninitialised byte(s)<br />&gt; <br />&gt; ==7737== at 0x70904F0: write (in /lib64/libc-2.9.so)<br />&gt; <br />&gt; ==7737== by 0x702F8E9: _IO_file_write (in /lib64/libc-2.9.so)<br />&gt; <br />&gt; ==7737== by 0x70307F8: _IO_do_write (in /lib64/libc-2.9.so)<br />&gt; <br />&gt; ==7737== by 0x70313F6: _IO_switch_to_get_mode (in /lib64/libc-2.9.so)<br />&gt; <br />&gt; ==7737== by 0x702FD6F: _IO_file_seekoff (in /lib64/libc-2.9.so)<br />&gt; <br />&gt; ==7737== by 0x70255E9: ftell (in /lib64/libc-2.9.so)<br />&gt; <br />&gt; ==7737== by 0x5D44EB1: dig_ftell (file.c:41)<br />&gt; <br />&gt; ==7737== by 0x5D458F7: dig__write_head (head.c:56)<br />&gt; <br />&gt; ==7737== by 0x4E5AE38: V1_open_new_nat (open_nat.c:127)<br />&gt; <br />&gt; ==7737== by 0x4E5A288: Vect_open_new (open.c:565)<br />&gt; <br />&gt; ==7737== by 0x402790: main (main.c:303)<br />&gt; <br />&gt; ==7737==  Address 0x4029009 is not stack&#39;d, malloc&#39;d or (recently) free&#39;d<br />&gt; <br />&gt; Buffering lines...<br />&gt; <br />&gt; ...<br />&gt; <br />&gt; Number of areas: 1<br />&gt; <br />&gt; Number of isles: 1<br />&gt; <br />&gt; ==7737==<br />&gt; <br />&gt; ==7737== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 2 from 1)<br />&gt; <br />&gt; ==7737== malloc/free: in use at exit: 996,601 bytes in 2,937 blocks.<br />&gt; <br />&gt; ==7737== malloc/free: 51,003 allocs, 48,066 frees, 13,321,460 bytes allocated.<br />&gt; <br />&gt; ==7737== For counts of detected errors, rerun with: -v<br />&gt; <br />&gt; ==7737== Use --track-origins=yes to see where uninitialised values come from<br />&gt; <br />&gt; ==7737== searching for pointers to 2,937 not-freed blocks.<br />&gt; <br />&gt; ==7737== checked 3,522,896 bytes.<br />&gt; <br />&gt; ==7737==<br />&gt; <br />&gt; ==7737==<br />&gt; <br />&gt; ==7737== 896 bytes in 28 blocks are still reachable in loss record 1 of 14<br />&gt; <br />&gt; ==7737== at 0x4C2362E: malloc (vg_replace_malloc.c:207)<br />&gt; <br />&gt; ==7737== by 0x4E52146: Vect__new_line_struct (line.c:69)<br />&gt; <br />&gt; ==7737== by 0x4E520FC: Vect_new_line_struct (line.c:59)<br />&gt; <br />&gt; ==7737== by 0x4026AF: main (main.c:290)<br />&gt; <br />&gt; ==7737==<br />&gt; <br />&gt; ==7737==<br />&gt; <br />&gt; ==7737== 2,976 bytes in 220 blocks are indirectly lost in loss record 2 of 14<br />&gt; <br />&gt; ==7737== at 0x4C23761: realloc (vg_replace_malloc.c:429)<br />&gt; <br />&gt; ==7737== by 0x5299148: G__realloc (alloc.c:111)<br />&gt; <br />&gt; ==7737== by 0x5D4FFB1: dig_node_alloc_line (struct_alloc.c:72)<br />&gt; <br />&gt; ==7737== by 0x5D49AC8: dig_node_add_line (plus_node.c:56)<br />&gt; <br />&gt; ==7737== by 0x5D49019: add_line (plus_line.c:44)<br />&gt; <br />&gt; ==7737== by 0x5D49319: dig_add_line (plus_line.c:114)<br />&gt; <br />&gt; ==7737== by 0x4E63331: V2_write_line_nat (write_nat.c:359)<br />&gt; <br />&gt; ==7737== by 0x4E624E1: Vect_write_line (write.c:143)<br />&gt; <br />&gt; ==7737== by 0x4E372D8: Vect_break_lines_list (break_lines.c:307)<br />&gt; <br />&gt; ==7737== by 0x4E362F3: Vect_break_lines (break_lines.c:38)<br />&gt; <br />&gt; ==7737== by 0x40332F: main (main.c:503)<br />&gt; <br />&gt; ==7737==<br />&gt; <br />&gt; ==7737==<br />&gt; <br />&gt; ==7737== 4,096 bytes in 8 blocks are definitely lost in loss record 3 of 14<br />&gt; <br />&gt; ==7737== at 0x4C2362E: malloc (vg_replace_malloc.c:207)<br />&gt; <br />&gt; ==7737== by 0x5F575D6: RTreeNewNode (node.c:49)<br />&gt; <br />&gt; ==7737== by 0x5F5664C: RTreeNewIndex (index.c:29)<br />&gt; <br />&gt; ==7737== by 0x5D4E4C2: dig_spidx_init (spindex.c:36)<br />&gt; <br />&gt; ==7737== by 0x5D46C34: dig_init_plus (plus.c:94)<br />&gt; <br />&gt; ==7737== by 0x4E59306: Vect__open_old (open.c:146)<br />&gt; <br />&gt; ==7737== by 0x4E59E7D: Vect_open_old (open.c:415)<br />&gt; <br />&gt; ==7737== by 0x402746: main (main.c:300)<br />&gt; <br />&gt; ==7737==<br />&gt; <br />&gt; ==7737==<br />&gt; <br />&gt; ==7737== 6,144 bytes in 12 blocks are still reachable in loss record 4 of 14<br />&gt; <br />&gt; ==7737== at 0x4C2362E: malloc (vg_replace_malloc.c:207)<br />&gt; <br />&gt; ==7737== by 0x5F575D6: RTreeNewNode (node.c:49)<br />&gt; <br />&gt; ==7737== by 0x5F5664C: RTreeNewIndex (index.c:29)<br />&gt; <br />&gt; ==7737== by 0x5D4E4C2: dig_spidx_init (spindex.c:36)<br />&gt; <br />&gt; ==7737== by 0x5D46C34: dig_init_plus (plus.c:94)<br />&gt; <br />&gt; ==7737== by 0x5D47078: dig_load_plus (plus.c:274)<br />&gt; <br />&gt; ==7737== by 0x4E5A919: Vect_open_topo (open.c:751)<br />&gt; <br />&gt; ==7737== by 0x4E5978E: Vect__open_old (open.c:229)<br />&gt; <br />&gt; ==7737== by 0x4E59E7D: Vect_open_old (open.c:415)<br />&gt; <br />&gt; ==7737== by 0x402746: main (main.c:300)<br />&gt; <br />&gt; ==7737==<br />&gt; <br />&gt; ==7737==<br />&gt; <br />&gt; ==7737== 6,312 bytes in 13 blocks are indirectly lost in loss record 5 of 14<br />&gt; <br />&gt; ==7737== at 0x4C2362E: malloc (vg_replace_malloc.c:207)<br />&gt; <br />&gt; ==7737== by 0x529903E: G__malloc (alloc.c:41)<br />&gt; <br />&gt; ==7737== by 0x4E4F3BE: Vect_line_intersection (intersect.c:810)<br />&gt; <br />&gt; ==7737== by 0x4E36C34: Vect_break_lines_list (break_lines.c:219)<br />&gt; <br />&gt; ==7737== by 0x4E362F3: Vect_break_lines (break_lines.c:38)<br />&gt; <br />&gt; ==7737== by 0x40332F: main (main.c:503)<br />&gt; <br />&gt; ==7737==<br />&gt; <br />&gt; ==7737==<br />&gt; <br />&gt; ==7737== 9,744 bytes in 3 blocks are possibly lost in loss record 6 of 14<br />&gt; <br />&gt; ==7737== at 0x4C2362E: malloc (vg_replace_malloc.c:207)<br />&gt; <br />&gt; ==7737== by 0x529903E: G__malloc (alloc.c:41)<br />&gt; <br />&gt; ==7737== by 0x4E4F3BE: Vect_line_intersection (intersect.c:810)<br />&gt; <br />&gt; ==7737== by 0x4E36C34: Vect_break_lines_list (break_lines.c:219)<br />&gt; <br />&gt; ==7737== by 0x4E362F3: Vect_break_lines (break_lines.c:38)<br />&gt; <br />&gt; ==7737== by 0x40332F: main (main.c:503)<br />&gt; <br />&gt; ==7737==<br />&gt; <br />&gt; ==7737==<br />&gt; <br />&gt; ==7737== 9,916 bytes in 109 blocks are indirectly lost in loss record 7 of 14<br />&gt; <br />&gt; ==7737== at 0x4C2362E: malloc (vg_replace_malloc.c:207)<br />&gt; <br />&gt; ==7737== by 0x5299135: G__realloc (alloc.c:109)<br />&gt; <br />&gt; ==7737== by 0x5D505A7: dig_area_alloc_line (struct_alloc.c:310)<br />&gt; <br />&gt; ==7737== by 0x5D47ADA: dig_add_area (plus_area.c:196)<br />&gt; <br />&gt; ==7737== by 0x4E3EDA6: Vect_build_line_area (build_nat.c:90)<br />&gt; <br />&gt; ==7737== by 0x4E3FE92: Vect_build_nat (build_nat.c:599)<br />&gt; <br />&gt; ==7737== by 0x4E3DCA2: Vect_build_partial (build.c:134)<br />&gt; <br />&gt; ==7737== by 0x40338E: main (main.c:518)<br />&gt; <br />&gt; ==7737==<br />&gt; <br />&gt; ==7737==<br />&gt; <br />&gt; ==7737== 21,756 bytes in 311 blocks are still reachable in loss record 8 of 14<br />&gt; <br />&gt; ==7737== at 0x4C2362E: malloc (vg_replace_malloc.c:207)<br />&gt; <br />&gt; ==7737== by 0x529903E: G__malloc (alloc.c:41)<br />&gt; <br />&gt; ==7737== by 0x52BBBC5: G_define_option (parser.c:243)<br />&gt; <br />&gt; ==7737== by 0x52BBD4B: G_define_standard_option (parser.c:319)<br />&gt; <br />&gt; ==7737== by 0x401EEC: main (main.c:151)<br />&gt; <br />&gt; ==7737==<br />&gt; <br />&gt; ==7737==<br />&gt; <br />&gt; ==7737== 27,952 (352 direct, 27,600 indirect) bytes in 11 blocks are<br />&gt; <br />&gt; definitely lost in loss record 9 of 14<br />&gt; <br />&gt; ==7737== at 0x4C2362E: malloc (vg_replace_malloc.c:207)<br />&gt; <br />&gt; ==7737== by 0x4E52146: Vect__new_line_struct (line.c:69)<br />&gt; <br />&gt; ==7737== by 0x4E520FC: Vect_new_line_struct (line.c:59)<br />&gt; <br />&gt; ==7737== by 0x4E3F9F0: Vect_build_nat (build_nat.c:496)<br />&gt; <br />&gt; ==7737== by 0x4E3DCA2: Vect_build_partial (build.c:134)<br />&gt; <br />&gt; ==7737== by 0x40338E: main (main.c:518)<br />&gt; <br />&gt; ==7737==<br />&gt; <br />&gt; ==7737==<br />&gt; <br />&gt; ==7737== 27,648 bytes in 16 blocks are indirectly lost in loss record 10 of 14<br />&gt; <br />&gt; ==7737== at 0x4C21404: calloc (vg_replace_malloc.c:397)<br />&gt; <br />&gt; ==7737== by 0x52990BC: G__calloc (alloc.c:74)<br />&gt; <br />&gt; ==7737== by 0x5D42A59: dig__frealloc (allocation.c:144)<br />&gt; <br />&gt; ==7737== by 0x5D428DD: dig__alloc_space (allocation.c:83)<br />&gt; <br />&gt; ==7737== by 0x5D50477: dig_alloc_points (struct_alloc.c:257)<br />&gt; <br />&gt; ==7737== by 0x4E5E054: Vect__Read_line_nat (read_nat.c:309)<br />&gt; <br />&gt; ==7737== by 0x4E5DA65: V1_read_next_line_nat (read_nat.c:82)<br />&gt; <br />&gt; ==7737== by 0x4E5D742: Vect_read_next_line (read.c:76)<br />&gt; <br />&gt; ==7737== by 0x4E3FA74: Vect_build_nat (build_nat.c:519)<br />&gt; <br />&gt; ==7737== by 0x4E3DCA2: Vect_build_partial (build.c:134)<br />&gt; <br />&gt; ==7737== by 0x4E3DB95: Vect_build (build.c:55)<br />&gt; <br />&gt; ==7737== by 0x401C6B: stop (main.c:41)<br />&gt; <br />&gt; ==7737==<br />&gt; <br />&gt; ==7737==<br />&gt; <br />&gt; ==7737== 47,276 bytes in 36 blocks are still reachable in loss record 11 of 14<br />&gt; <br />&gt; ==7737== at 0x4C23761: realloc (vg_replace_malloc.c:429)<br />&gt; <br />&gt; ==7737== by 0x5299148: G__realloc (alloc.c:111)<br />&gt; <br />&gt; ==7737== by 0x52A7EB2: set_env (env.c:156)<br />&gt; <br />&gt; ==7737== by 0x52A7C44: read_env (env.c:104)<br />&gt; <br />&gt; ==7737== by 0x52A84CE: G__getenv (env.c:317)<br />&gt; <br />&gt; ==7737== by 0x52A8410: G_getenv (env.c:271)<br />&gt; <br />&gt; ==7737== by 0x52B6684: G_location (location.c:63)<br />&gt; <br />&gt; ==7737== by 0x52B669C: G__location_path (location.c:78)<br />&gt; <br />&gt; ==7737== by 0x52B6628: G_location_path (location.c:41)<br />&gt; <br />&gt; ==7737== by 0x52B1B0B: G__gisinit (gisinit.c:58)<br />&gt; <br />&gt; ==7737== by 0x402360: main (main.c:232)<br />&gt; <br />&gt; ==7737==<br />&gt; <br />&gt; ==7737==<br />&gt; <br />&gt; ==7737== 172,526 bytes in 207 blocks are still reachable in loss<br />&gt; <br />&gt; record 12 of 14<br />&gt; <br />&gt; ==7737== at 0x4C2362E: malloc (vg_replace_malloc.c:207)<br />&gt; <br />&gt; ==7737== by 0x5299135: G__realloc (alloc.c:109)<br />&gt; <br />&gt; ==7737== by 0x5D50078: dig_alloc_nodes (struct_alloc.c:99)<br />&gt; <br />&gt; ==7737== by 0x5D47106: dig_load_plus (plus.c:290)<br />&gt; <br />&gt; ==7737== by 0x4E5A919: Vect_open_topo (open.c:751)<br />&gt; <br />&gt; ==7737== by 0x4E5978E: Vect__open_old (open.c:229)<br />&gt; <br />&gt; ==7737== by 0x4E59E7D: Vect_open_old (open.c:415)<br />&gt; <br />&gt; ==7737== by 0x402746: main (main.c:300)<br />&gt; <br />&gt; ==7737==<br />&gt; <br />&gt; ==7737==<br />&gt; <br />&gt; ==7737== 213,996 bytes in 87 blocks are still reachable in loss record 13 of 14<br />&gt; <br />&gt; ==7737== at 0x4C21404: calloc (vg_replace_malloc.c:397)<br />&gt; <br />&gt; ==7737== by 0x52990BC: G__calloc (alloc.c:74)<br />&gt; <br />&gt; ==7737== by 0x52BCEC7: G_parser (parser.c:762)<br />&gt; <br />&gt; ==7737== by 0x402372: main (main.c:234)<br />&gt; <br />&gt; ==7737==<br />&gt; <br />&gt; ==7737==<br />&gt; <br />&gt; ==7737== 492,215 (472,963 direct, 19,252 indirect) bytes in 1,876<br />&gt; <br />&gt; blocks are definitely lost in loss record 14 of 14<br />&gt; <br />&gt; ==7737== at 0x4C2362E: malloc (vg_replace_malloc.c:207)<br />&gt; <br />&gt; ==7737== by 0x529903E: G__malloc (alloc.c:41)<br />&gt; <br />&gt; ==7737== by 0x5D500D5: dig_alloc_line (struct_alloc.c:114)<br />&gt; <br />&gt; ==7737== by 0x5D48EE0: add_line (plus_line.c:27)<br />&gt; <br />&gt; ==7737== by 0x5D49319: dig_add_line (plus_line.c:114)<br />&gt; <br />&gt; ==7737== by 0x4E63331: V2_write_line_nat (write_nat.c:359)<br />&gt; <br />&gt; ==7737== by 0x4E624E1: Vect_write_line (write.c:143)<br />&gt; <br />&gt; ==7737== by 0x4E372D8: Vect_break_lines_list (break_lines.c:307)<br />&gt; <br />&gt; ==7737== by 0x4E362F3: Vect_break_lines (break_lines.c:38)<br />&gt; <br />&gt; ==7737== by 0x40332F: main (main.c:503)<br />&gt; <br />&gt; ==7737==<br />&gt; <br />&gt; ==7737== LEAK SUMMARY:<br />&gt; <br />&gt; ==7737== definitely lost: 477,411 bytes in 1,895 blocks.<br />&gt; <br />&gt; ==7737== indirectly lost: 46,852 bytes in 358 blocks.<br />&gt; <br />&gt; ==7737== possibly lost: 9,744 bytes in 3 blocks.<br />&gt; <br />&gt; ==7737== still reachable: 462,594 bytes in 681 blocks.<br />&gt; <br />&gt; ==7737==  suppressed: 0 bytes in 0 blocks.<br />&gt; <br />&gt; <br />&gt; <br />&gt; Might be a memory leak?<br />&gt; <br />&gt; <br />&gt; <br />&gt; For example, I don&#39;t see in main.c<br />&gt; <br />&gt;  Vect_destroy_cats_struct(Cats);<br />&gt; <br />&gt;  Vect_destroy_cats_struct(BCats);<br />&gt; <br />&gt; <br />&gt; <br />&gt; which might be necessary.<br />&gt; <br />&gt; <br />&gt; <br />&gt; Markus<br />&gt;