Re: [GRASS-user] generalize polygons including holes
Hi Markus, v.generalize does not distinguish between outer and inner rings, it simply goes through all boundaries and generalizes each one. And this has always been the case or this is specific to GRASS7 ? This has always been the case. Then why doesn't there seem to be any generalization happening for the hole boundaries of the test dataset with grass64release ? With the test dataset you provided, GRASS 6.4 does generalize the hole boundaries. I do not have the problem vector of Robert, so I can not say if the hole boundaries in that vector are generalized or not. Please find attached a location with a test dataset (snipped of larger vector map) and two images from generalizations carried out in GRASS 6.4.4 (6.4.4-1~trusty5 from ppa:ubuntugis-unstable) and GRASS 7.0 (7.0.0+1svn64474~ubuntu14.04.1 from ppa:grass-devel). Blue layer is generalized and red one is the original both at 50% transparency. For me, the results from GRASS 7.0 look as expected (inner rings generalized) but v.generalize in GRASS 6.4 seems not to treat inner rings. Thanks for the test location, I could reproduce it, fixed in relbr64 r64478. Thanks for fixing it! cheers, robert ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] generalize polygons including holes
On Fri, Feb 6, 2015 at 11:08 AM, Robert Nuske rnu...@gwdg.de wrote: Hi Markus v.generalize does not distinguish between outer and inner rings, it simply goes through all boundaries and generalizes each one. And this has always been the case or this is specific to GRASS7 ? This has always been the case. Then why doesn't there seem to be any generalization happening for the hole boundaries of the test dataset with grass64release ? With the test dataset you provided, GRASS 6.4 does generalize the hole boundaries. I do not have the problem vector of Robert, so I can not say if the hole boundaries in that vector are generalized or not. Please find attached a location with a test dataset (snipped of larger vector map) and two images from generalizations carried out in GRASS 6.4.4 (6.4.4-1~trusty5 from ppa:ubuntugis-unstable) and GRASS 7.0 (7.0.0+1svn64474~ubuntu14.04.1 from ppa:grass-devel). Blue layer is generalized and red one is the original both at 50% transparency. For me, the results from GRASS 7.0 look as expected (inner rings generalized) but v.generalize in GRASS 6.4 seems not to treat inner rings. Thanks for the test location, I could reproduce it, fixed in relbr64 r64478. Markus M GRASS 6.4.4 --- v.generalize in=test_data out=test_gen method=douglas thresh=5000 Number of vertices for selected lines reduced from 907 to 82 (9%). v.generalize complete. GRASS 7.0 --- v.build map=test_data v.generalize in=test_data out=test_gen method=douglas thresh=5000 v.generalize complete. Number of vertices for selected features reduced from 4605 to 451 (9%). cheers, robert ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] generalize polygons including holes
Hi Moritz GRASS-List is there a way to generalize polygons including their holes? I am not too worried about topology, there are only polygons of one class in the dataset. I tried the following v.generalize in=m3 out=m5 type=area method=douglas threshold=5000 which simplified the outer boundaries okay but did not touch the inner boundaries/ holes of the polygon. Outer boundaries are on the left side in the picture and holes on the right http://i.imgur.com/hHKr15m.png It looks like the red boundaries are the generalized version of the original blue ones. Is that correct ? Are you sure that the original boundaries of the holes are identical to the new ones ? Could you display the result with polygon fill color set to transparent ? That's right. Original vector map is blue and simplified vector is red. Both layers are 50% opaque in the following image http://i.imgur.com/Rsx7Kh1.png This is GRASS 6.4.4 on ubuntu 14.04. thanks for reading robert ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] generalize polygons including holes
On Thu, Feb 5, 2015 at 11:50 AM, Moritz Lennert mlenn...@club.worldonline.be wrote: On 05/02/15 10:06, Markus Metz wrote: On Thu, Feb 5, 2015 at 9:36 AM, Moritz Lennert mlenn...@club.worldonline.be wrote: [Please keep conversations on the list] On 04/02/15 16:12, Robert Nuske wrote: Hi Moritz is there a way to generalize polygons including their holes? I am not too worried about topology, there are only polygons of one class in the dataset. I tried the following v.generalize in=m3 out=m5 type=area method=douglas threshold=5000 which simplified the outer boundaries okay but did not touch the inner boundaries/ holes of the polygon. Outer boundaries are on the left side in the picture and holes on the right http://i.imgur.com/hHKr15m.png It looks like the red boundaries are the generalized version of the original blue ones. Is that correct ? Are you sure that the original boundaries of the holes are identical to the new ones ? Could you display the result with polygon fill color set to transparent ? That's right. Original vector map is blue and simplified vector is red. Both layers are 50% opaque in the following image http://i.imgur.com/Rsx7Kh1.png I imagine you are using GRASS 6 ? I can confirm the issue there with GRASS 6.4.4, but it has been solved in GRASS 7. See the attached image where you have two holes: both have been generalized with method=douglas (black = original, red=lower threshold, blue=higher threshold). You can clearly see that generalization is also happening for the hole boundaries. The right hole has not been generalized properly, the resultant boundary intersects with itself. This has been fixed in GRASS 7 recently. Do you get the same result with recent GRASS 7.1? No. The example was with GRASS 7.0 from a week or two ago. OK, the test was missing in 7.0, I have now backported it to 7.0 in r64471 In GRASS 7.1 no more intersection, but actually for that hole the generalization is less with a higher threshold (see attached image). That hole is actually not generalized at all with thresh=500 because it would damage topology. I've attached the vector file I used as a GRASS 7 vector pack for the NC location. The settings I used were: v.generalize test method=douglas thresh=100 out=test_gen_100 v.generalize test method=douglas thresh=500 out=test_gen_500 v.generalize does not distinguish between outer and inner rings, it simply goes through all boundaries and generalizes each one. And this has always been the case or this is specific to GRASS7 ? This has always been the case. Markus M ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] generalize polygons including holes
On 05/02/15 14:49, Markus Metz wrote: On Thu, Feb 5, 2015 at 11:50 AM, Moritz Lennert mlenn...@club.worldonline.be wrote: On 05/02/15 10:06, Markus Metz wrote: On Thu, Feb 5, 2015 at 9:36 AM, Moritz Lennert mlenn...@club.worldonline.be wrote: [Please keep conversations on the list] On 04/02/15 16:12, Robert Nuske wrote: Hi Moritz is there a way to generalize polygons including their holes? I am not too worried about topology, there are only polygons of one class in the dataset. I tried the following v.generalize in=m3 out=m5 type=area method=douglas threshold=5000 which simplified the outer boundaries okay but did not touch the inner boundaries/ holes of the polygon. Outer boundaries are on the left side in the picture and holes on the right http://i.imgur.com/hHKr15m.png It looks like the red boundaries are the generalized version of the original blue ones. Is that correct ? Are you sure that the original boundaries of the holes are identical to the new ones ? Could you display the result with polygon fill color set to transparent ? That's right. Original vector map is blue and simplified vector is red. Both layers are 50% opaque in the following image http://i.imgur.com/Rsx7Kh1.png I imagine you are using GRASS 6 ? I can confirm the issue there with GRASS 6.4.4, but it has been solved in GRASS 7. See the attached image where you have two holes: both have been generalized with method=douglas (black = original, red=lower threshold, blue=higher threshold). You can clearly see that generalization is also happening for the hole boundaries. The right hole has not been generalized properly, the resultant boundary intersects with itself. This has been fixed in GRASS 7 recently. Do you get the same result with recent GRASS 7.1? No. The example was with GRASS 7.0 from a week or two ago. OK, the test was missing in 7.0, I have now backported it to 7.0 in r64471 In GRASS 7.1 no more intersection, but actually for that hole the generalization is less with a higher threshold (see attached image). That hole is actually not generalized at all with thresh=500 because it would damage topology. Maybe a little message would be helpful here to inform the user about this ? I've attached the vector file I used as a GRASS 7 vector pack for the NC location. The settings I used were: v.generalize test method=douglas thresh=100 out=test_gen_100 v.generalize test method=douglas thresh=500 out=test_gen_500 v.generalize does not distinguish between outer and inner rings, it simply goes through all boundaries and generalizes each one. And this has always been the case or this is specific to GRASS7 ? This has always been the case. Then why doesn't there seem to be any generalization happening for the hole boundaries of the test dataset with grass64release ? Moritz ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] generalize polygons including holes
[Please keep conversations on the list] On 04/02/15 16:12, Robert Nuske wrote: Hi Moritz is there a way to generalize polygons including their holes? I am not too worried about topology, there are only polygons of one class in the dataset. I tried the following v.generalize in=m3 out=m5 type=area method=douglas threshold=5000 which simplified the outer boundaries okay but did not touch the inner boundaries/ holes of the polygon. Outer boundaries are on the left side in the picture and holes on the right http://i.imgur.com/hHKr15m.png It looks like the red boundaries are the generalized version of the original blue ones. Is that correct ? Are you sure that the original boundaries of the holes are identical to the new ones ? Could you display the result with polygon fill color set to transparent ? That's right. Original vector map is blue and simplified vector is red. Both layers are 50% opaque in the following image http://i.imgur.com/Rsx7Kh1.png I imagine you are using GRASS 6 ? I can confirm the issue there with GRASS 6.4.4, but it has been solved in GRASS 7. See the attached image where you have two holes: both have been generalized with method=douglas (black = original, red=lower threshold, blue=higher threshold). You can clearly see that generalization is also happening for the hole boundaries. As GRASS 7 will come out really soon, and the current release candidates are quite stable, I recommend you switch to GRASS 7. Moritz ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] generalize polygons including holes
is there a way to generalize polygons including their holes? I am not too worried about topology, there are only polygons of one class in the dataset. I tried the following v.generalize in=m3 out=m5 type=area method=douglas threshold=5000 which simplified the outer boundaries okay but did not touch the inner boundaries/ holes of the polygon. Outer boundaries are on the left side in the picture and holes on the right http://i.imgur.com/hHKr15m.png It looks like the red boundaries are the generalized version of the original blue ones. Is that correct ? Are you sure that the original boundaries of the holes are identical to the new ones ? Could you display the result with polygon fill color set to transparent ? That's right. Original vector map is blue and simplified vector is red. Both layers are 50% opaque in the following image http://i.imgur.com/Rsx7Kh1.png I imagine you are using GRASS 6 ? I can confirm the issue there with GRASS 6.4.4, but it has been solved in GRASS 7. See the attached image where you have two holes: both have been generalized with method=douglas (black = original, red=lower threshold, blue=higher threshold). You can clearly see that generalization is also happening for the hole boundaries. As GRASS 7 will come out really soon, and the current release candidates are quite stable, I recommend you switch to GRASS 7. Thanks a lot for testing on current and future GRASS Versions. Will use this as reason to finally try GRASS 7 ;-) I actually couldn't believe that it is not a user error. Seemed a very common requirement to treat outer and inner boundaries alike while simplifying. cheers robert ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] generalize polygons including holes
On Thu, Feb 5, 2015 at 9:36 AM, Moritz Lennert mlenn...@club.worldonline.be wrote: [Please keep conversations on the list] On 04/02/15 16:12, Robert Nuske wrote: Hi Moritz is there a way to generalize polygons including their holes? I am not too worried about topology, there are only polygons of one class in the dataset. I tried the following v.generalize in=m3 out=m5 type=area method=douglas threshold=5000 which simplified the outer boundaries okay but did not touch the inner boundaries/ holes of the polygon. Outer boundaries are on the left side in the picture and holes on the right http://i.imgur.com/hHKr15m.png It looks like the red boundaries are the generalized version of the original blue ones. Is that correct ? Are you sure that the original boundaries of the holes are identical to the new ones ? Could you display the result with polygon fill color set to transparent ? That's right. Original vector map is blue and simplified vector is red. Both layers are 50% opaque in the following image http://i.imgur.com/Rsx7Kh1.png I imagine you are using GRASS 6 ? I can confirm the issue there with GRASS 6.4.4, but it has been solved in GRASS 7. See the attached image where you have two holes: both have been generalized with method=douglas (black = original, red=lower threshold, blue=higher threshold). You can clearly see that generalization is also happening for the hole boundaries. The right hole has not been generalized properly, the resultant boundary intersects with itself. This has been fixed in GRASS 7 recently. Do you get the same result with recent GRASS 7.1? v.generalize does not distinguish between outer and inner rings, it simply goes through all boundaries and generalizes each one. Markus M As GRASS 7 will come out really soon, and the current release candidates are quite stable, I recommend you switch to GRASS 7. Moritz ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] generalize polygons including holes
On Thu, Feb 5, 2015 at 4:56 PM, Moritz Lennert mlenn...@club.worldonline.be wrote: On 05/02/15 14:49, Markus Metz wrote: On Thu, Feb 5, 2015 at 11:50 AM, Moritz Lennert mlenn...@club.worldonline.be wrote: On 05/02/15 10:06, Markus Metz wrote: On Thu, Feb 5, 2015 at 9:36 AM, Moritz Lennert mlenn...@club.worldonline.be wrote: [Please keep conversations on the list] On 04/02/15 16:12, Robert Nuske wrote: Hi Moritz is there a way to generalize polygons including their holes? I am not too worried about topology, there are only polygons of one class in the dataset. I tried the following v.generalize in=m3 out=m5 type=area method=douglas threshold=5000 which simplified the outer boundaries okay but did not touch the inner boundaries/ holes of the polygon. Outer boundaries are on the left side in the picture and holes on the right http://i.imgur.com/hHKr15m.png It looks like the red boundaries are the generalized version of the original blue ones. Is that correct ? Are you sure that the original boundaries of the holes are identical to the new ones ? Could you display the result with polygon fill color set to transparent ? That's right. Original vector map is blue and simplified vector is red. Both layers are 50% opaque in the following image http://i.imgur.com/Rsx7Kh1.png I imagine you are using GRASS 6 ? I can confirm the issue there with GRASS 6.4.4, but it has been solved in GRASS 7. See the attached image where you have two holes: both have been generalized with method=douglas (black = original, red=lower threshold, blue=higher threshold). You can clearly see that generalization is also happening for the hole boundaries. The right hole has not been generalized properly, the resultant boundary intersects with itself. This has been fixed in GRASS 7 recently. Do you get the same result with recent GRASS 7.1? No. The example was with GRASS 7.0 from a week or two ago. OK, the test was missing in 7.0, I have now backported it to 7.0 in r64471 In GRASS 7.1 no more intersection, but actually for that hole the generalization is less with a higher threshold (see attached image). That hole is actually not generalized at all with thresh=500 because it would damage topology. Maybe a little message would be helpful here to inform the user about this ? This message exists already: v.generalize test method=douglas thresh=500 out=test_gen_500 ... Generalization (douglas)... 100% WARNING: 1 boundaries were not modified because modification would damage topology ... I've attached the vector file I used as a GRASS 7 vector pack for the NC location. The settings I used were: v.generalize test method=douglas thresh=100 out=test_gen_100 v.generalize test method=douglas thresh=500 out=test_gen_500 v.generalize does not distinguish between outer and inner rings, it simply goes through all boundaries and generalizes each one. And this has always been the case or this is specific to GRASS7 ? This has always been the case. Then why doesn't there seem to be any generalization happening for the hole boundaries of the test dataset with grass64release ? With the test dataset you provided, GRASS 6.4 does generalize the hole boundaries. I do not have the problem vector of Robert, so I can not say if the hole boundaries in that vector are generalized or not. Markus M ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user
Re: [GRASS-user] generalize polygons including holes
On 04/02/15 11:36, Robert Nuske wrote: Hi GRASS-Users is there a way to generalize polygons including their holes? I am not too worried about topology, there are only polygons of one class in the dataset. I tried the following v.generalize in=m3 out=m5 type=area method=douglas threshold=5000 which simplified the outer boundaries okay but did not touch the inner boundaries/ holes of the polygon. Outer boundaries are on the left side in the picture and holes on the right http://i.imgur.com/hHKr15m.png It looks like the red boundaries are the generalized version of the original blue ones. Is that correct ? Are you sure that the original boundaries of the holes are identical to the new ones ? Could you display the result with polygon fill color set to transparent ? Moritz ___ grass-user mailing list grass-user@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/grass-user