[GRASS-dev] [GRASS GIS] #1865: WinGrass v.buffer memory issue

#1865: WinGrass v.buffer memory issue
---------------------+------------------------------------------------------
Reporter: feppink | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Vector | Version: 6.4.3 RCs
Keywords: | Platform: MSWindows 7
      Cpu: x86-64 |
---------------------+------------------------------------------------------
System: Windows 7 64-bit Home Basic, GRASS 6.4.3-RC2, core i7 3612QM, 8Gb
RAM.

I have a vector map with a 30,131 primitives and well over 700,000
vertices. I want to create buffers of 50,000 map units (meters) around the
centroids of the primitives. If I do this, memory usage of v.buffer
steadily creeps up and at some point GRASS runs out of memory and
terminates v.buffer.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1865&gt;
GRASS GIS <http://grass.osgeo.org>

#1865: WinGrass v.buffer memory issue
---------------------+------------------------------------------------------
Reporter: feppink | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Vector | Version: 6.4.3 RCs
Keywords: | Platform: MSWindows 7
      Cpu: x86-64 |
---------------------+------------------------------------------------------

Comment(by feppink):

Additional info: I specify no other options for v.buffer apart from the
units for the major axis. Memory issue starts occurring during "Breaking
boundaries".

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1865#comment:1&gt;
GRASS GIS <http://grass.osgeo.org>

#1865: WinGrass v.buffer memory issue
---------------------+------------------------------------------------------
Reporter: feppink | Owner: grass-dev@…
     Type: defect | Status: new
Priority: normal | Milestone: 6.4.3
Component: Vector | Version: 6.4.3 RCs
Keywords: | Platform: MSWindows 7
      Cpu: x86-64 |
---------------------+------------------------------------------------------

Comment(by mmetz):

Replying to [comment:1 feppink]:
> Additional info: I specify no other options for v.buffer apart from the
units for the major axis. Memory issue starts occurring during "Breaking
boundaries".

If possible, try GRASS 7, because v.buffer only works correctly in GRASS 7
and vector memory consumption is much less.

Can you make the input vector map available and post the exact command
used to calculate buffers?

Markus M

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1865#comment:2&gt;
GRASS GIS <http://grass.osgeo.org>

#1865: WinGrass v.buffer memory issue
----------------------+-----------------------------------------------------
Reporter: feppink | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.4
Component: Vector | Version: 6.4.3 RCs
Keywords: v.buffer | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------
Changes (by neteler):

  * keywords: => v.buffer
  * priority: normal => blocker
  * milestone: 6.4.3 => 6.4.4

Comment:

See also #1464 (v.buffer needs to be compiled with GEOS support).

See also #1343

See also #2223

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1865#comment:3&gt;
GRASS GIS <http://grass.osgeo.org>

#1865: WinGrass v.buffer memory issue
----------------------+-----------------------------------------------------
Reporter: feppink | Owner: grass-dev@…
     Type: defect | Status: new
Priority: blocker | Milestone: 6.4.4
Component: Vector | Version: 6.4.3 RCs
Keywords: v.buffer | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------

Comment(by neteler):

Replying to [ticket:1865 feppink]:
> System: Windows 7 64-bit Home Basic, GRASS 6.4.3-RC2, core i7 3612QM,
8Gb RAM.

Here Linux, GRASS 6.4.svn (r59970), 8 GB RAM.

> I have a vector map with a 30,131 primitives and well over 700,000
vertices. I want to create buffers of 50,000 map units (meters) around the
centroids of the primitives. If I do this, memory usage of v.buffer
steadily creeps up and at some point GRASS runs out of memory and
terminates v.buffer.

I have made a test with the current v.buffer (which itself now uses GEOS),
no (more?) memory issues:

{{{
# buffer polygons
GRASS 6.4.4svn (eu_laea):~ > v.buffer clc2000_E45N25 out=buf distance=100
  100%
  100%
  100%
Breaking polygons...
  100%
  100%
Removing duplicates...
  100%
Breaking boundaries...
date%
  100%
Removing duplicates...
  100%
Cleaning boundaries at nodes
  100%
Building topology for vector map <buf>...
Building areas...
  100%
200514 areas built
16651 isles built
Number of nodes: 239757
Number of primitives: 641559
Number of points: 0
Number of lines: 0
Number of boundaries: 641559
Number of centroids: 0
Number of areas: 200514
Number of isles: 16651
Number of areas without centroid: 200514
Removing dangles...
  100%
Removing bridges...
  100%
Attaching islands...
Building topology for vector map <buf>...
Attaching islands...
  100%
Number of nodes: 239757
Number of primitives: 641559
Number of points: 0
Number of lines: 0
Number of boundaries: 641559
Number of centroids: 0
Number of areas: 200514
Number of isles: 16651
Number of areas without centroid: 200514
Calculating centroids for all areas...
  100%
Generating list of boundaries to be deleted...
  100%
Deleting boundaries...
  100%
Calculating centroids for areas...
  100%
Building topology for vector map <buf>...
Registering primitives...
1479 primitives registered
10551 vertices registered
Building areas...
  100%
4 areas built
4 isles built
Attaching islands...
  100%
Attaching centroids...
  100%
Number of nodes: 1479
Number of primitives: 1479
Number of points: 0
Number of lines: 0
Number of boundaries: 1478
Number of centroids: 1
Number of areas: 4
Number of isles: 4
Number of areas without centroid: 3
}}}

And
{{{
# buffer centroids
GRASS 6.4.4svn (eu_laea):~ > v.buffer test out=buf2 distance=50
type=centroid
Buffering features...
  100%
Cleaning buffers...
Building parts of topology...
[...]
Attaching centroids...
  100%
Number of nodes: 39266
Number of primitives: 39266
Number of points: 0
Number of lines: 0
Number of boundaries: 19674
Number of centroids: 19592
Number of areas: 19592
Number of isles: 19592
}}}

Please try again.

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1865#comment:4&gt;
GRASS GIS <http://grass.osgeo.org>

#1865: WinGrass v.buffer memory issue
----------------------+-----------------------------------------------------
Reporter: feppink | Owner: grass-dev@…
     Type: defect | Status: new
Priority: critical | Milestone: 6.4.4
Component: Vector | Version: 6.4.3 RCs
Keywords: v.buffer | Platform: MSWindows 7
      Cpu: x86-64 |
----------------------+-----------------------------------------------------
Changes (by neteler):

  * priority: blocker => critical

--
Ticket URL: <http://trac.osgeo.org/grass/ticket/1865#comment:5&gt;
GRASS GIS <http://grass.osgeo.org>

#1865: WinGrass v.buffer memory issue
--------------------------+-------------------------------------------------
  Reporter: feppink | Owner: grass-dev@…
      Type: defect | Status: closed
  Priority: critical | Milestone: 6.4.4
Component: Vector | Version: 6.4.3 RCs
Resolution: fixed | Keywords: v.buffer
  Platform: MSWindows 7 | Cpu: x86-64
--------------------------+-------------------------------------------------
Changes (by neteler):

  * status: new => closed
  * resolution: => fixed

Comment:

No response on original issue for > 1 year, v.buffer is meanwhile based on
GEOS.

Closing, feel free to reopen if needed.

--
Ticket URL: <https://trac.osgeo.org/grass/ticket/1865#comment:6&gt;
GRASS GIS <http://grass.osgeo.org>