<div dir="ltr"><div><br><br>On Sat, Nov 25, 2017 at 2:43 PM, 洪朝貴 <<a href="mailto:ckhung@cyut.edu.tw">ckhung@cyut.edu.tw</a>> wrote:<br>><br>> Thank you Markus! It works now.<br>><br>> Printing the current region could help.<br>> Re-wording the manual page may also help.<br>> "Unlike most other vector functions, setting the<br>> computation region is mandatory in order to deal with<br>> infinite regions in the Voronoi diagrams."<br>> Or something prominent like that.<br><br></div>The first line of the manual<br><br>"v.voronoi - Creates a Voronoi diagram in current region from an input vector map containing points or centroids."<br><div><br></div><div>could be rephrased to</div><div><br></div><div>"v.voronoi - Creates a Voronoi diagram constrained to the extents of the current region from an input vector map containing points or centroids."<br><div><br></div></div><div><br>> I read somewhere that vector operations are not<br>> affected by the region setting, and had success with<br>> v.distance and v.delaunay without ever setting it.<br>> The v.voronoi manual says<br>> "The  bounds  of  the  output map are limited by the current region."<br>> but I somehow ignored it as something to worry about later<br>> if and when I get some output :-)<br></div><div><br></div><div>It is something to worry about particularly when you get no output ;-)</div><div><br></div><div>We could change the error message</div><div><br></div><div>"Found 0 points/centroids in <tkec@work>, but at least 2 are needed"</div><div><br></div><div>to something like</div><div><br></div><div>"Found 0 points/centroids in <tkec@work>, but at least 2 are needed. Please verify that the current region extents are covering at least parts of the input map."<br></div><div><br></div><div>Markus M<br></div><div>><br>><br>><br>> --<br>> 『我的野蠻工讀生』用高昂的『下賊船的代價』<br>> 綁架了我的文件! (請分別搜尋)<br>> Chao-Kuei Hung 洪朝貴<br>><br>> PGP Key ID: 4096R/5828A7A7<br>> Fingerprint: 67AF B5AB 5242 3E99 16D7  EAF8 A94D 2C92 5828 A7A7<br>><br>><br>> 2017-11-25 20:48 GMT+08:00 Markus Neteler <<a href="mailto:neteler@osgeo.org">neteler@osgeo.org</a>>:<br>> > On Nov 25, 2017 11:48 AM, "Markus Metz" <<a href="mailto:markus.metz.giswork@gmail.com">markus.metz.giswork@gmail.com</a>><br>> > wrote:<br>> >> On Sat, Nov 25, 2017 at 3:07 AM, 洪朝貴 <<a href="mailto:ckhung@cyut.edu.tw">ckhung@cyut.edu.tw</a>> wrote:<br>> > ...<br>> >> > Did I miss some steps before calling v.voronoi?<br>> >><br>> >> v.voronoi uses the current region (the algorithm requires this), therefore<br>> >> you need to set an appropriate computational region first, e.g. with<br>> >><br>> >> g.region -pa vect=tkec res=1<br>> >><br>> >> before using v.voronoi.<br>> ><br>> > Would it make sense to print the used region settings to help the user?<br>> ><br>> > Best,<br>> > markusN<br><br></div></div>