<div dir="ltr"><br><br>On Tue, Jun 18, 2019 at 4:08 PM Micha Silver <<a href="mailto:tsvibar@gmail.com">tsvibar@gmail.com</a>> wrote:<br>><br>> It looks like you've run out of integer values for the "category" primary key.<br>><br>> Do you really want a vector polygon map with > 2 billion features?<br>><br>><br>> On 18/06/2019 15:14, Ken Mankoff wrote:<br>><br>> Hello,<br>><br>> I think I'm experiencing a buffer overflow. This is a hard one to search for with GRASS GIS because the word "buffer" and "overflow" appear throughout as in r.buffer and overflowing weirs, etc. but I'm referring to the C-code error type of buffer oveflow:<br>><br>> r.to.vect -v input=basins output=basins type=area<br>><br>> DBMI-SQLite driver error:<br>> Error in sqlite3_step():<br>> UNIQUE constraint failed: <a href="http://basins.cat">basins.cat</a><br>><br>> ERROR: Unable to insert into table: insert into basins values (<br>>        -2137121269, '(Category -2137121269)')<br><div><br></div><div>This is close to the 32 bit signed integer limit, but not yet there, the lower limit for raster maps of type CELL is at  −2,147,483,648</div><div><br></div><div>The error "UNIQUE constraint failed: <a href="http://basins.cat">basins.cat</a>" indicates that the given category already exists. Another issue is that negative categories are not allowed for vectors. Yet another issue is that basin numbers should be all positive, indicating that integer overflow occurred when creating the raster map basins, which is probably the root of this problem. What is the range of values in the raster map basins (<a href="http://r.info">r.info</a> -r basins) and how was it created?</div><div><br></div><div>Markus M</div><br></div>