[GRASS-user] v.clean Failed to build area

Hi,

I am attempting to use the rmarea tool in v.clean with a threshold of ~ 1000 sq meters.

projection is the following:

g.proj -p
-PROJ_INFO-------------------------------------------------
name : NAD83 / UTM zone 5N
datum : nad83
ellps : grs80
proj : utm
zone : 5
towgs84 : 0,0,0,0,0,0,0
no_defs : defined
-PROJ_EPSG-------------------------------------------------
epsg : 26905
-PROJ_UNITS------------------------------------------------
unit : meter
units : meters
meters : 1

I am getting a rather cryptic message ‘Failed to build area’.

v.clean -c --overwrite --verbose input=plot_pa_with_lidar@project_area output=plot_pa_rmarea tool=rmarea threshold=1017.2


Tool: Threshold
Remove small areas: 1017.2

WARNING: Vector map <plot_pa_rmarea> already exists and will be overwritten
Using native format
Copying features…
100%
Rebuilding parts of topology…
Building topology for vector map <plot_pa_rmarea@project_area>…
Registering primitives…
1720636 primitives registered
3439992 vertices registered
Building areas…
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
100%
499671 areas built
6004 isles built
Attaching islands…
100%
Attaching centroids…
100%
Topology was built
Number of nodes: 728615
Number of primitives: 1720636
Number of points: 0
Number of lines: 0
Number of boundaries: 1222309
Number of centroids: 498327
Number of areas: 499671
Number of isles: 6004
WARNING: Number of incorrect boundaries: 9
WARNING: Number of duplicate centroids: 14

Tool: Remove small areas
ERROR: Failed to build new area

On Fri, Apr 27, 2018 at 1:37 AM, Peter Tittmann <ptittmann@gmail.com> wrote:

Hi,

I am attempting to use the rmarea tool in v.clean with a threshold of ~ 1000 sq meters.

[…]

I am getting a rather cryptic message ‘Failed to build area’.

v.clean -c --overwrite --verbose input=plot_pa_with_lidar@project_area output=plot_pa_rmarea tool=rmarea threshold=1017.2


Tool: Threshold
Remove small areas: 1017.2

WARNING: Vector map <plot_pa_rmarea> already exists and will be overwritten
Using native format
Copying features…
100%
Rebuilding parts of topology…
Building topology for vector map <plot_pa_rmarea@project_area>…
Registering primitives…
1720636 primitives registered
3439992 vertices registered
Building areas…
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
100%
499671 areas built
6004 isles built
Attaching islands…
100%
Attaching centroids…
100%
Topology was built
Number of nodes: 728615
Number of primitives: 1720636
Number of points: 0
Number of lines: 0
Number of boundaries: 1222309
Number of centroids: 498327
Number of areas: 499671
Number of isles: 6004
WARNING: Number of incorrect boundaries: 9
WARNING: Number of duplicate centroids: 14

Tool: Remove small areas
ERROR: Failed to build new area

I guess the problem are these 9 incorrect boundaries. Which GRASS version are you using? Can you try again with the latest release in case you are not using the latest release?

Markus M

[ please keep this on the GRASS mailing list ]

On Fri, Apr 27, 2018 at 6:43 PM, Peter Tittmann <ptittmann@gmail.com> wrote:

Hi Markus,

grass72 -v
GRASS GIS 7.2.2

This is already the latest 7.2 release. You might try GRASS 7.4.

i will try to figure out how to get the latest release up and running. If you have any suggestions for fixing the boundaries, that would be great.

If upgrading to the latest GRASS 7.4 release does not help, I would need the data for testing to find out why removing small areas fails. If the vector has been imported from an external datasource without modification of the geometries inside GRASS, this version would be preferable. Otherwise the history of plot_pa_with_lidar@project_area would be helpful (v.info -h).

Markus M

Peter

On Thu, Apr 26, 2018 at 11:19 PM, Markus Metz <markus.metz.giswork@gmail.com> wrote:

On Fri, Apr 27, 2018 at 1:37 AM, Peter Tittmann <ptittmann@gmail.com> wrote:

Hi,

I am attempting to use the rmarea tool in v.clean with a threshold of ~ 1000 sq meters.

[…]

I am getting a rather cryptic message ‘Failed to build area’.

v.clean -c --overwrite --verbose input=plot_pa_with_lidar@project_area output=plot_pa_rmarea tool=rmarea threshold=1017.2


Tool: Threshold
Remove small areas: 1017.2

WARNING: Vector map <plot_pa_rmarea> already exists and will be overwritten
Using native format
Copying features…
100%
Rebuilding parts of topology…
Building topology for vector map <plot_pa_rmarea@project_area>…
Registering primitives…
1720636 primitives registered
3439992 vertices registered
Building areas…
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
100%
499671 areas built
6004 isles built
Attaching islands…
100%
Attaching centroids…
100%
Topology was built
Number of nodes: 728615
Number of primitives: 1720636
Number of points: 0
Number of lines: 0
Number of boundaries: 1222309
Number of centroids: 498327
Number of areas: 499671
Number of isles: 6004
WARNING: Number of incorrect boundaries: 9
WARNING: Number of duplicate centroids: 14

Tool: Remove small areas
ERROR: Failed to build new area

I guess the problem are these 9 incorrect boundaries. Which GRASS version are you using? Can you try again with the latest release in case you are not using the latest release?

Markus M

Hi Markus,

I’m ashamed to admit that I hacked my way into fixing this problem by exporting the vector dataset using v.out.ogr to a geopackage then importing it. The cleaning tools in v.in.ogr seemed to solve my problem…

Very clumsy, but it worked.

Thank you!

Peter

···

On Fri, Apr 27, 2018 at 11:51 AM, Markus Metz <markus.metz.giswork@gmail.com> wrote:

[ please keep this on the GRASS mailing list ]

On Fri, Apr 27, 2018 at 6:43 PM, Peter Tittmann <ptittmann@gmail.com> wrote:

Hi Markus,

grass72 -v
GRASS GIS 7.2.2

This is already the latest 7.2 release. You might try GRASS 7.4.

i will try to figure out how to get the latest release up and running. If you have any suggestions for fixing the boundaries, that would be great.

If upgrading to the latest GRASS 7.4 release does not help, I would need the data for testing to find out why removing small areas fails. If the vector has been imported from an external datasource without modification of the geometries inside GRASS, this version would be preferable. Otherwise the history of plot_pa_with_lidar@project_area would be helpful (v.info -h).

Markus M

Peter

On Thu, Apr 26, 2018 at 11:19 PM, Markus Metz <markus.metz.giswork@gmail.com> wrote:

On Fri, Apr 27, 2018 at 1:37 AM, Peter Tittmann <ptittmann@gmail.com> wrote:

Hi,

I am attempting to use the rmarea tool in v.clean with a threshold of ~ 1000 sq meters.

[…]

I am getting a rather cryptic message ‘Failed to build area’.

v.clean -c --overwrite --verbose input=plot_pa_with_lidar@project_area output=plot_pa_rmarea tool=rmarea threshold=1017.2


Tool: Threshold
Remove small areas: 1017.2

WARNING: Vector map <plot_pa_rmarea> already exists and will be overwritten
Using native format
Copying features…
100%
Rebuilding parts of topology…
Building topology for vector map <plot_pa_rmarea@project_area>…
Registering primitives…
1720636 primitives registered
3439992 vertices registered
Building areas…
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
100%
499671 areas built
6004 isles built
Attaching islands…
100%
Attaching centroids…
100%
Topology was built
Number of nodes: 728615
Number of primitives: 1720636
Number of points: 0
Number of lines: 0
Number of boundaries: 1222309
Number of centroids: 498327
Number of areas: 499671
Number of isles: 6004
WARNING: Number of incorrect boundaries: 9
WARNING: Number of duplicate centroids: 14

Tool: Remove small areas
ERROR: Failed to build new area

I guess the problem are these 9 incorrect boundaries. Which GRASS version are you using? Can you try again with the latest release in case you are not using the latest release?

Markus M

Hi Peter,

On Tue, May 1, 2018 at 11:33 PM, Peter Tittmann <ptittmann@gmail.com> wrote:

Hi Markus,

I’m ashamed to admit that I hacked my way into fixing this problem by exporting the vector dataset using v.out.ogr to a geopackage then importing it. The cleaning tools in v.in.ogr seemed to solve my problem…

the reason why this works is that these incorrect boundaries are not exported. When re-importing, you will get a clean vector but some of the original areas are gone. If you still want to find out what went wrong where, you would need to find out where these incorrect boundaries first appeared in the processing steps of your original vector.

Markus M

Very clumsy, but it worked.

Thank you!

Peter

On Fri, Apr 27, 2018 at 11:51 AM, Markus Metz <markus.metz.giswork@gmail.com> wrote:

[ please keep this on the GRASS mailing list ]

On Fri, Apr 27, 2018 at 6:43 PM, Peter Tittmann <ptittmann@gmail.com> wrote:

Hi Markus,

grass72 -v
GRASS GIS 7.2.2

This is already the latest 7.2 release. You might try GRASS 7.4.

i will try to figure out how to get the latest release up and running. If you have any suggestions for fixing the boundaries, that would be great.

If upgrading to the latest GRASS 7.4 release does not help, I would need the data for testing to find out why removing small areas fails. If the vector has been imported from an external datasource without modification of the geometries inside GRASS, this version would be preferable. Otherwise the history of plot_pa_with_lidar@project_area would be helpful (v.info -h).

Markus M

Peter

On Thu, Apr 26, 2018 at 11:19 PM, Markus Metz <markus.metz.giswork@gmail.com> wrote:

On Fri, Apr 27, 2018 at 1:37 AM, Peter Tittmann <ptittmann@gmail.com> wrote:

Hi,

I am attempting to use the rmarea tool in v.clean with a threshold of ~ 1000 sq meters.

[…]

I am getting a rather cryptic message ‘Failed to build area’.

v.clean -c --overwrite --verbose input=plot_pa_with_lidar@project_area output=plot_pa_rmarea tool=rmarea threshold=1017.2


Tool: Threshold
Remove small areas: 1017.2

WARNING: Vector map <plot_pa_rmarea> already exists and will be overwritten
Using native format
Copying features…
100%
Rebuilding parts of topology…
Building topology for vector map <plot_pa_rmarea@project_area>…
Registering primitives…
1720636 primitives registered
3439992 vertices registered
Building areas…
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
100%
499671 areas built
6004 isles built
Attaching islands…
100%
Attaching centroids…
100%
Topology was built
Number of nodes: 728615
Number of primitives: 1720636
Number of points: 0
Number of lines: 0
Number of boundaries: 1222309
Number of centroids: 498327
Number of areas: 499671
Number of isles: 6004
WARNING: Number of incorrect boundaries: 9
WARNING: Number of duplicate centroids: 14

Tool: Remove small areas
ERROR: Failed to build new area

I guess the problem are these 9 incorrect boundaries. Which GRASS version are you using? Can you try again with the latest release in case you are not using the latest release?

Markus M

My best guess is each line is creating a close polyline - which is why the islands do not have duplicate points.

We wrote a program to run though each line, identify the location each line begins to backtrack, then break and remove the remaining points. Unfortunately, some of the contours do not start and stop at the edge of the DEM, but rather have beginning nodes many points within the DEM. Anything on the “back side” of the node is dropped.

Heidi Ochis
Computer Terrain Mapping, Inc
420 21st Ave, Suite 114
Longmont, CO 80501
303-444-1670
hiho@ctmap.com

On May 2, 2018, at 12:32 AM, Markus Metz wrote:

Hi Peter,

On Tue, May 1, 2018 at 11:33 PM, Peter Tittmann <ptittmann@gmail.com> wrote:

Hi Markus,

I’m ashamed to admit that I hacked my way into fixing this problem by exporting the vector dataset using v.out.ogr to a geopackage then importing it. The cleaning tools in v.in.ogr seemed to solve my problem…

the reason why this works is that these incorrect boundaries are not exported. When re-importing, you will get a clean vector but some of the original areas are gone. If you still want to find out what went wrong where, you would need to find out where these incorrect boundaries first appeared in the processing steps of your original vector.

Markus M

Very clumsy, but it worked.

Thank you!

Peter

On Fri, Apr 27, 2018 at 11:51 AM, Markus Metz <markus.metz.giswork@gmail.com> wrote:

[ please keep this on the GRASS mailing list ]

On Fri, Apr 27, 2018 at 6:43 PM, Peter Tittmann <ptittmann@gmail.com> wrote:

Hi Markus,

grass72 -v
GRASS GIS 7.2.2

This is already the latest 7.2 release. You might try GRASS 7.4.

i will try to figure out how to get the latest release up and running. If you have any suggestions for fixing the boundaries, that would be great.

If upgrading to the latest GRASS 7.4 release does not help, I would need the data for testing to find out why removing small areas fails. If the vector has been imported from an external datasource without modification of the geometries inside GRASS, this version would be preferable. Otherwise the history of plot_pa_with_lidar@project_area would be helpful (v.info -h).

Markus M

Peter

On Thu, Apr 26, 2018 at 11:19 PM, Markus Metz <markus.metz.giswork@gmail.com> wrote:

On Fri, Apr 27, 2018 at 1:37 AM, Peter Tittmann <ptittmann@gmail.com> wrote:

Hi,

I am attempting to use the rmarea tool in v.clean with a threshold of ~ 1000 sq meters.

[…]

I am getting a rather cryptic message ‘Failed to build area’.

v.clean -c --overwrite --verbose input=plot_pa_with_lidar@project_area output=plot_pa_rmarea tool=rmarea threshold=1017.2


Tool: Threshold
Remove small areas: 1017.2

WARNING: Vector map <plot_pa_rmarea> already exists and will be overwritten
Using native format
Copying features…
100%
Rebuilding parts of topology…
Building topology for vector map <plot_pa_rmarea@project_area>…
Registering primitives…
1720636 primitives registered
3439992 vertices registered
Building areas…
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
WARNING: Area of size = 0.0 ignored
100%
499671 areas built
6004 isles built
Attaching islands…
100%
Attaching centroids…
100%
Topology was built
Number of nodes: 728615
Number of primitives: 1720636
Number of points: 0
Number of lines: 0
Number of boundaries: 1222309
Number of centroids: 498327
Number of areas: 499671
Number of isles: 6004
WARNING: Number of incorrect boundaries: 9
WARNING: Number of duplicate centroids: 14

Tool: Remove small areas
ERROR: Failed to build new area

I guess the problem are these 9 incorrect boundaries. Which GRASS version are you using? Can you try again with the latest release in case you are not using the latest release?

Markus M


grass-user mailing list
grass-user@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/grass-user