Re: [JPP-Devel] Combining polygons
Hi, I had a try with rev. 2785 and Combine two polygons attached to EZ Buttons so that the layer was editable at the time of shortcut creation. For me the EZ Button connected tool still combines selected polygons whether the layer is editable or not. I tried with a few different ways. - By toggling the Editable setting of a layer without closing the file in between. - Saving the editable layer on disk and opening it as non-editable - By creating new layers, adding a few polygons, making then non-editable and using the EZ Button connected combine tool. -Jukka Rahkonen- Michaël Michaud wrote: Hi Jukka, Larry - Combine two selected polygons tool is fast but it has a little bug. It allows to combine polygons even if the layer is non-editable. How do you do that ? Menu item is inactive (grayed) if layer is non editable. Good question indeed. It took awhile to repeat it. This is somehow related to EZ-Buttons shortcut. The shortcut seems to remember, not only the menu selection it is connected with, but also the state of OJ project when the shortcut was created. It can be created by opening some layer to OJ and making is editable so thet combine two polygons is working. Create the EZ-Button shortcut now and add a new layer. Now the EZ-Buttons shortcut combines polygons even the layer is not editable. So this is a feature in the EZ-Buttons. I tried to fixed this problem. Jukka, could you have a look to check it solves your problem (from svn 2781) Larry, could you double check the small change I did to the EasyPanel class http://jump-pilot.svn.sourceforge.net/viewvc/jump-pilot/core/t runk/src/org/openjump/core/ui/plugin/view/EasyPanel.java?r1=1873r2= 2781sortby=date Thanks, Michaël - Combine polygon with neighbouring polygon is very slow and can give an out-of-memory error. Is it perhaps walking through all the features when searching for the one to use for combining? I would guess that it should be much faster if it correctly selects just the few adjacent polygons for candidates first. I think the algo of this plugin is not so simple... I think Stefan know it better - Making union of selected features suits me well because I would like to combine about 10-20 polygons together. However, because it creates new layer each time there is some extra work with joining them together later. - Union selected in place (if result can be simple polygon) would be the ideal tool for just this case. Agree, this would be helpful. Not sure I would limit to simple polygons though. In my case I want that the new areas are also continuos. Sometimes multipolygons would be acceptable. Perhaps there could be a check box for cases when features selected for combining are all simple polygons Allow multipolygons as new features? . If selection already contains multipolygons then the result can naturally contain them too. I suppose you don't want to union all adjacent polygons, otherwise, the simplest is to union the whole layer, then to explode the multipolygon. Yes, this is the case. All the polygons in the layer are adjacent and all together would be a monster polygon with thousands of holes and hundreds of thousands of vertices. I am going to reduce the number of polygons into about 500 and I want all them to have some reasonable amount of vertices. Automatic system by using some grid layer as a helper layer for splitting data into rectangular pieces first to be unioned later tile by tile would not give directly a good result. Data is from archipelago and in some places there is just open sea and in other places masses of islands. I will get the job ready faster by doing the selections manually. Union selected in place tool would make it more convenient, though. Here is a workaround (didn't check it though) - create a second layer. - draw 1 linestring per group of building, intersecting all buildings you want to aggregate (and only those one) - create an auto-increment attribute on these linestring layer - do a spatial join to transfer linestring id to polygons - union polygons by attribute (you will get a multipolygon with all polygons not intersecting a linestring : explode it) Sounds doable, I will try it next week. -Jukka- Michaël -Jukka Rahkonen- -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.netmailto:Jump-pilot-devel @lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- This SF email is sponsosred by: Try Windows Azure free for 90 days
Re: [JPP-Devel] Combining polygons
Hi Michaël and Jukka, It looks to me like one of the many revisions to FeatureInstaller lost an important change to support EZ Buttons. The patch below restores it. The change to EasyPanel should not be necessary. Please excuse me if my superficial look at the code has missed an important detail. Larry Index: C:/eclipse3/workspace/OpenJumpSvn/src/com/vividsolutions/jump/workbench/ui/plugin/FeatureInstaller.java === --- C:/eclipse3/workspace/OpenJumpSvn/src/com/vividsolutions/jump/workbench/ui/plugin/FeatureInstaller.java (revision 2786) +++ C:/eclipse3/workspace/OpenJumpSvn/src/com/vividsolutions/jump/workbench/ui/plugin/FeatureInstaller.java (working copy) @@ -649,12 +649,12 @@ } public void addMenuItemShownListener(final JMenuItem menuItem, - final MenuItemShownListener menuItemShownListener) { -JMenu menu = (JMenu) ((JPopupMenu) menuItem.getParent()).getInvoker(); -menu.addMenuListener(new MenuItemShownMenuListener(menuItem, -menuItemShownListener)); + final MenuItemShownListener menuItemShownListener) { + JMenu menu = (JMenu) ((JPopupMenu) menuItem.getParent()).getInvoker(); + menu.addMenuListener(new JumpMenuListener( menuItemShownListener,menuItem)); } + /** * Convenience method for entries without menupath * On Mon, Apr 2, 2012 at 2:41 AM, Rahkonen Jukka jukka.rahko...@mmmtike.fiwrote: Hi, I had a try with rev. 2785 and Combine two polygons attached to EZ Buttons so that the layer was editable at the time of shortcut creation. For me the EZ Button connected tool still combines selected polygons whether the layer is editable or not. I tried with a few different ways. - By toggling the Editable setting of a layer without closing the file in between. - Saving the editable layer on disk and opening it as non-editable - By creating new layers, adding a few polygons, making then non-editable and using the EZ Button connected combine tool. -Jukka Rahkonen- Michaël Michaud wrote: Hi Jukka, Larry - Combine two selected polygons tool is fast but it has a little bug. It allows to combine polygons even if the layer is non-editable. How do you do that ? Menu item is inactive (grayed) if layer is non editable. Good question indeed. It took awhile to repeat it. This is somehow related to EZ-Buttons shortcut. The shortcut seems to remember, not only the menu selection it is connected with, but also the state of OJ project when the shortcut was created. It can be created by opening some layer to OJ and making is editable so thet combine two polygons is working. Create the EZ-Button shortcut now and add a new layer. Now the EZ-Buttons shortcut combines polygons even the layer is not editable. So this is a feature in the EZ-Buttons. I tried to fixed this problem. Jukka, could you have a look to check it solves your problem (from svn 2781) Larry, could you double check the small change I did to the EasyPanel class http://jump-pilot.svn.sourceforge.net/viewvc/jump-pilot/core/t runk/src/org/openjump/core/ui/plugin/view/EasyPanel.java?r1=1873r2= 2781sortby=date Thanks, Michaël - Combine polygon with neighbouring polygon is very slow and can give an out-of-memory error. Is it perhaps walking through all the features when searching for the one to use for combining? I would guess that it should be much faster if it correctly selects just the few adjacent polygons for candidates first. I think the algo of this plugin is not so simple... I think Stefan know it better - Making union of selected features suits me well because I would like to combine about 10-20 polygons together. However, because it creates new layer each time there is some extra work with joining them together later. - Union selected in place (if result can be simple polygon) would be the ideal tool for just this case. Agree, this would be helpful. Not sure I would limit to simple polygons though. In my case I want that the new areas are also continuos. Sometimes multipolygons would be acceptable. Perhaps there could be a check box for cases when features selected for combining are all simple polygons Allow multipolygons as new features? . If selection already contains multipolygons then the result can naturally contain them too. I suppose you don't want to union all adjacent polygons, otherwise, the simplest is to union the whole layer, then to explode the multipolygon. Yes, this is the case. All the polygons in the layer are adjacent and all together would be a monster polygon with thousands of holes and hundreds of thousands of vertices. I am going to reduce the number of polygons into about 500 and I want all them to have some reasonable amount of vertices. Automatic system by using some grid layer as a helper layer for splitting data into rectangular pieces first
Re: [JPP-Devel] Combining polygons
Larry, could you please elaborate in short what this change does on the code level? ..thanks ede On 02.04.2012 16:53, Larry Becker wrote: Hi Michaël and Jukka, It looks to me like one of the many revisions to FeatureInstaller lost an important change to support EZ Buttons. The patch below restores it. The change to EasyPanel should not be necessary. Please excuse me if my superficial look at the code has missed an important detail. Larry Index: C:/eclipse3/workspace/OpenJumpSvn/src/com/vividsolutions/jump/workbench/ui/plugin/FeatureInstaller.java === --- C:/eclipse3/workspace/OpenJumpSvn/src/com/vividsolutions/jump/workbench/ui/plugin/FeatureInstaller.java (revision 2786) +++ C:/eclipse3/workspace/OpenJumpSvn/src/com/vividsolutions/jump/workbench/ui/plugin/FeatureInstaller.java (working copy) @@ -649,12 +649,12 @@ } public void addMenuItemShownListener(final JMenuItem menuItem, - final MenuItemShownListener menuItemShownListener) { -JMenu menu = (JMenu) ((JPopupMenu) menuItem.getParent()).getInvoker(); -menu.addMenuListener(new MenuItemShownMenuListener(menuItem, -menuItemShownListener)); + final MenuItemShownListener menuItemShownListener) { + JMenu menu = (JMenu) ((JPopupMenu) menuItem.getParent()).getInvoker(); + menu.addMenuListener(new JumpMenuListener( menuItemShownListener,menuItem)); } + /** * Convenience method for entries without menupath * On Mon, Apr 2, 2012 at 2:41 AM, Rahkonen Jukka jukka.rahko...@mmmtike.fiwrote: Hi, I had a try with rev. 2785 and Combine two polygons attached to EZ Buttons so that the layer was editable at the time of shortcut creation. For me the EZ Button connected tool still combines selected polygons whether the layer is editable or not. I tried with a few different ways. - By toggling the Editable setting of a layer without closing the file in between. - Saving the editable layer on disk and opening it as non-editable - By creating new layers, adding a few polygons, making then non-editable and using the EZ Button connected combine tool. -Jukka Rahkonen- Michaël Michaud wrote: Hi Jukka, Larry - Combine two selected polygons tool is fast but it has a little bug. It allows to combine polygons even if the layer is non-editable. How do you do that ? Menu item is inactive (grayed) if layer is non editable. Good question indeed. It took awhile to repeat it. This is somehow related to EZ-Buttons shortcut. The shortcut seems to remember, not only the menu selection it is connected with, but also the state of OJ project when the shortcut was created. It can be created by opening some layer to OJ and making is editable so thet combine two polygons is working. Create the EZ-Button shortcut now and add a new layer. Now the EZ-Buttons shortcut combines polygons even the layer is not editable. So this is a feature in the EZ-Buttons. I tried to fixed this problem. Jukka, could you have a look to check it solves your problem (from svn 2781) Larry, could you double check the small change I did to the EasyPanel class http://jump-pilot.svn.sourceforge.net/viewvc/jump-pilot/core/t runk/src/org/openjump/core/ui/plugin/view/EasyPanel.java?r1=1873r2= 2781sortby=date Thanks, Michaël - Combine polygon with neighbouring polygon is very slow and can give an out-of-memory error. Is it perhaps walking through all the features when searching for the one to use for combining? I would guess that it should be much faster if it correctly selects just the few adjacent polygons for candidates first. I think the algo of this plugin is not so simple... I think Stefan know it better - Making union of selected features suits me well because I would like to combine about 10-20 polygons together. However, because it creates new layer each time there is some extra work with joining them together later. - Union selected in place (if result can be simple polygon) would be the ideal tool for just this case. Agree, this would be helpful. Not sure I would limit to simple polygons though. In my case I want that the new areas are also continuos. Sometimes multipolygons would be acceptable. Perhaps there could be a check box for cases when features selected for combining are all simple polygons Allow multipolygons as new features? . If selection already contains multipolygons then the result can naturally contain them too. I suppose you don't want to union all adjacent polygons, otherwise, the simplest is to union the whole layer, then to explode the multipolygon. Yes, this is the case. All the polygons in the layer are adjacent and all together would be a monster polygon with thousands of holes and hundreds of thousands of vertices. I am going to reduce the number of polygons into about 500 and I want all them to have some reasonable amount of vertices.
Re: [JPP-Devel] Combining polygons
Sure. It wraps MenuListener in the JumpMenuListener wrapper class so that EasyPanel can determine which menu items had EnableChecks. It has been a few years since I wrote this so I'm not sure of all the hows and whys that it was done this way. 8-) Larry On Mon, Apr 2, 2012 at 10:02 AM, edgar.sol...@web.de wrote: Larry, could you please elaborate in short what this change does on the code level? ..thanks ede On 02.04.2012 16:53, Larry Becker wrote: Hi Michaël and Jukka, It looks to me like one of the many revisions to FeatureInstaller lost an important change to support EZ Buttons. The patch below restores it. The change to EasyPanel should not be necessary. Please excuse me if my superficial look at the code has missed an important detail. Larry Index: C:/eclipse3/workspace/OpenJumpSvn/src/com/vividsolutions/jump/workbench/ui/plugin/FeatureInstaller.java === --- C:/eclipse3/workspace/OpenJumpSvn/src/com/vividsolutions/jump/workbench/ui/plugin/FeatureInstaller.java (revision 2786) +++ C:/eclipse3/workspace/OpenJumpSvn/src/com/vividsolutions/jump/workbench/ui/plugin/FeatureInstaller.java (working copy) @@ -649,12 +649,12 @@ } public void addMenuItemShownListener(final JMenuItem menuItem, - final MenuItemShownListener menuItemShownListener) { -JMenu menu = (JMenu) ((JPopupMenu) menuItem.getParent()).getInvoker(); -menu.addMenuListener(new MenuItemShownMenuListener(menuItem, -menuItemShownListener)); + final MenuItemShownListener menuItemShownListener) { + JMenu menu = (JMenu) ((JPopupMenu) menuItem.getParent()).getInvoker(); + menu.addMenuListener(new JumpMenuListener( menuItemShownListener,menuItem)); } + /** * Convenience method for entries without menupath * On Mon, Apr 2, 2012 at 2:41 AM, Rahkonen Jukka jukka.rahko...@mmmtike.fiwrote: Hi, I had a try with rev. 2785 and Combine two polygons attached to EZ Buttons so that the layer was editable at the time of shortcut creation. For me the EZ Button connected tool still combines selected polygons whether the layer is editable or not. I tried with a few different ways. - By toggling the Editable setting of a layer without closing the file in between. - Saving the editable layer on disk and opening it as non-editable - By creating new layers, adding a few polygons, making then non-editable and using the EZ Button connected combine tool. -Jukka Rahkonen- Michaël Michaud wrote: Hi Jukka, Larry - Combine two selected polygons tool is fast but it has a little bug. It allows to combine polygons even if the layer is non-editable. How do you do that ? Menu item is inactive (grayed) if layer is non editable. Good question indeed. It took awhile to repeat it. This is somehow related to EZ-Buttons shortcut. The shortcut seems to remember, not only the menu selection it is connected with, but also the state of OJ project when the shortcut was created. It can be created by opening some layer to OJ and making is editable so thet combine two polygons is working. Create the EZ-Button shortcut now and add a new layer. Now the EZ-Buttons shortcut combines polygons even the layer is not editable. So this is a feature in the EZ-Buttons. I tried to fixed this problem. Jukka, could you have a look to check it solves your problem (from svn 2781) Larry, could you double check the small change I did to the EasyPanel class http://jump-pilot.svn.sourceforge.net/viewvc/jump-pilot/core/t runk/src/org/openjump/core/ui/plugin/view/EasyPanel.java?r1=1873r2= 2781sortby=date Thanks, Michaël - Combine polygon with neighbouring polygon is very slow and can give an out-of-memory error. Is it perhaps walking through all the features when searching for the one to use for combining? I would guess that it should be much faster if it correctly selects just the few adjacent polygons for candidates first. I think the algo of this plugin is not so simple... I think Stefan know it better - Making union of selected features suits me well because I would like to combine about 10-20 polygons together. However, because it creates new layer each time there is some extra work with joining them together later. - Union selected in place (if result can be simple polygon) would be the ideal tool for just this case. Agree, this would be helpful. Not sure I would limit to simple polygons though. In my case I want that the new areas are also continuos. Sometimes multipolygons would be acceptable. Perhaps there could be a check box for cases when features selected for combining are all simple polygons Allow multipolygons as new features? . If selection already contains multipolygons then the result can naturally contain them too. I suppose
Re: [JPP-Devel] Combining polygons
Larry and all, please check snapshot revision 2787. ..ede Original Message Subject: [Jump-pilot-svn-notify] SF.net SVN: jump-pilot:[2787] core/trunk/src Date: Mon, 02 Apr 2012 17:01:43 + From: e...@users.sourceforge.net Reply-To: jump-pilot-svn-not...@lists.sourceforge.net To: jump-pilot-svn-not...@lists.sourceforge.net Revision: 2787 http://jump-pilot.svn.sourceforge.net/jump-pilot/?rev=2787view=rev Author: edso Date: 2012-04-02 17:01:43 + (Mon, 02 Apr 2012) Log Message: --- retry bugfix #3510778 EZ Button does not respect layer editability - revert commit 2781 - FeatureInstaller.java: wrap MenuListener in the JumpMenuListener wrapper so that EasyPanel can determine which menu items had EnableChecks [courtesy of Larry Becker] Modified Paths: -- core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/FeatureInstaller.java core/trunk/src/org/openjump/core/ui/plugin/view/EasyPanel.java Modified: core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/FeatureInstaller.java === --- core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/FeatureInstaller.java 2012-04-02 13:14:37 UTC (rev 2786) +++ core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/FeatureInstaller.java 2012-04-02 17:01:43 UTC (rev 2787) @@ -651,8 +651,9 @@ public void addMenuItemShownListener(final JMenuItem menuItem, final MenuItemShownListener menuItemShownListener) { JMenu menu = (JMenu) ((JPopupMenu) menuItem.getParent()).getInvoker(); -menu.addMenuListener(new MenuItemShownMenuListener(menuItem, -menuItemShownListener)); +// wraps MenuListener in the JumpMenuListener wrapper class so that +// EasyPanel can determine which menu items had EnableChecks [Larry Becker] +menu.addMenuListener(new JumpMenuListener(menuItemShownListener, menuItem)); } /** Modified: core/trunk/src/org/openjump/core/ui/plugin/view/EasyPanel.java === --- core/trunk/src/org/openjump/core/ui/plugin/view/EasyPanel.java 2012-04-02 13:14:37 UTC (rev 2786) +++ core/trunk/src/org/openjump/core/ui/plugin/view/EasyPanel.java 2012-04-02 17:01:43 UTC (rev 2787) @@ -320,7 +320,7 @@ ((FeatureInstaller.JumpMenuListener) menuListeners[i]).menuSelected(null); } } - } //else { + } else { JPopupMenu popupMenu = ((JPopupMenu) jMenuItem.getParent()); PopupMenuListener[] listeners = popupMenu.getListeners(PopupMenuListener.class); for (int i=0; ilisteners.length; i++) { @@ -329,7 +329,7 @@ .popupMenuWillBecomeVisible(new PopupMenuEvent(popupMenu)); } } - //} + } SwingUtilities.invokeLater(new Runnable() { public void run() { if (jMenuItem.isEnabled()) -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] Combining polygons
Thanks Larry and Ede, Seems that I missed the point. I'll have a check with the new code. Michaël Le 02/04/2012 19:03, edgar.sol...@web.de a écrit : Larry and all, please check snapshot revision 2787. ..ede Original Message Subject: [Jump-pilot-svn-notify] SF.net SVN: jump-pilot:[2787] core/trunk/src Date: Mon, 02 Apr 2012 17:01:43 + From: e...@users.sourceforge.net Reply-To: jump-pilot-svn-not...@lists.sourceforge.net To: jump-pilot-svn-not...@lists.sourceforge.net Revision: 2787 http://jump-pilot.svn.sourceforge.net/jump-pilot/?rev=2787view=rev Author: edso Date: 2012-04-02 17:01:43 + (Mon, 02 Apr 2012) Log Message: --- retry bugfix #3510778 EZ Button does not respect layer editability - revert commit 2781 - FeatureInstaller.java: wrap MenuListener in the JumpMenuListener wrapper so that EasyPanel can determine which menu items had EnableChecks [courtesy of Larry Becker] Modified Paths: -- core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/FeatureInstaller.java core/trunk/src/org/openjump/core/ui/plugin/view/EasyPanel.java Modified: core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/FeatureInstaller.java === --- core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/FeatureInstaller.java 2012-04-02 13:14:37 UTC (rev 2786) +++ core/trunk/src/com/vividsolutions/jump/workbench/ui/plugin/FeatureInstaller.java 2012-04-02 17:01:43 UTC (rev 2787) @@ -651,8 +651,9 @@ public void addMenuItemShownListener(final JMenuItem menuItem, final MenuItemShownListener menuItemShownListener) { JMenu menu = (JMenu) ((JPopupMenu) menuItem.getParent()).getInvoker(); -menu.addMenuListener(new MenuItemShownMenuListener(menuItem, -menuItemShownListener)); +// wraps MenuListener in the JumpMenuListener wrapper class so that +// EasyPanel can determine which menu items had EnableChecks [Larry Becker] +menu.addMenuListener(new JumpMenuListener(menuItemShownListener, menuItem)); } /** Modified: core/trunk/src/org/openjump/core/ui/plugin/view/EasyPanel.java === --- core/trunk/src/org/openjump/core/ui/plugin/view/EasyPanel.java 2012-04-02 13:14:37 UTC (rev 2786) +++ core/trunk/src/org/openjump/core/ui/plugin/view/EasyPanel.java 2012-04-02 17:01:43 UTC (rev 2787) @@ -320,7 +320,7 @@ ((FeatureInstaller.JumpMenuListener) menuListeners[i]).menuSelected(null); } } - } //else { + } else { JPopupMenu popupMenu = ((JPopupMenu) jMenuItem.getParent()); PopupMenuListener[] listeners = popupMenu.getListeners(PopupMenuListener.class); for (int i=0; ilisteners.length; i++) { @@ -329,7 +329,7 @@ .popupMenuWillBecomeVisible(new PopupMenuEvent(popupMenu)); } } - //} + } SwingUtilities.invokeLater(new Runnable() { public void run() { if (jMenuItem.isEnabled()) -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] Combining polygons
Hi Jukka, Larry - Combine two selected polygons tool is fast but it has a little bug. It allows to combine polygons even if the layer is non-editable. How do you do that ? Menu item is inactive (grayed) if layer is non editable. Good question indeed. It took awhile to repeat it. This is somehow related to EZ-Buttons shortcut. The shortcut seems to remember, not only the menu selection it is connected with, but also the state of OJ project when the shortcut was created. It can be created by opening some layer to OJ and making is editable so thet combine two polygons is working. Create the EZ-Button shortcut now and add a new layer. Now the EZ-Buttons shortcut combines polygons even the layer is not editable. So this is a feature in the EZ-Buttons. I tried to fixed this problem. Jukka, could you have a look to check it solves your problem (from svn 2781) Larry, could you double check the small change I did to the EasyPanel class http://jump-pilot.svn.sourceforge.net/viewvc/jump-pilot/core/trunk/src/org/openjump/core/ui/plugin/view/EasyPanel.java?r1=1873r2=2781sortby=date Thanks, Michaël - Combine polygon with neighbouring polygon is very slow and can give an out-of-memory error. Is it perhaps walking through all the features when searching for the one to use for combining? I would guess that it should be much faster if it correctly selects just the few adjacent polygons for candidates first. I think the algo of this plugin is not so simple... I think Stefan know it better - Making union of selected features suits me well because I would like to combine about 10-20 polygons together. However, because it creates new layer each time there is some extra work with joining them together later. - Union selected in place (if result can be simple polygon) would be the ideal tool for just this case. Agree, this would be helpful. Not sure I would limit to simple polygons though. In my case I want that the new areas are also continuos. Sometimes multipolygons would be acceptable. Perhaps there could be a check box for cases when features selected for combining are all simple polygons Allow multipolygons as new features? . If selection already contains multipolygons then the result can naturally contain them too. I suppose you don't want to union all adjacent polygons, otherwise, the simplest is to union the whole layer, then to explode the multipolygon. Yes, this is the case. All the polygons in the layer are adjacent and all together would be a monster polygon with thousands of holes and hundreds of thousands of vertices. I am going to reduce the number of polygons into about 500 and I want all them to have some reasonable amount of vertices. Automatic system by using some grid layer as a helper layer for splitting data into rectangular pieces first to be unioned later tile by tile would not give directly a good result. Data is from archipelago and in some places there is just open sea and in other places masses of islands. I will get the job ready faster by doing the selections manually. Union selected in place tool would make it more convenient, though. Here is a workaround (didn't check it though) - create a second layer. - draw 1 linestring per group of building, intersecting all buildings you want to aggregate (and only those one) - create an auto-increment attribute on these linestring layer - do a spatial join to transfer linestring id to polygons - union polygons by attribute (you will get a multipolygon with all polygons not intersecting a linestring : explode it) Sounds doable, I will try it next week. -Jukka- Michaël -Jukka Rahkonen- -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.netmailto:Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] Combining polygons
Lähettäjä: Michaël Michaud [michael.mich...@free.fr] Lähetetty: 16. maaliskuuta 2012 22:44 Vastaanottaja: jump-pilot-devel@lists.sourceforge.net Aihe: Re: [JPP-Devel] Combining polygons Hi, I started to reduse the number of polygons in one dataset which originally it contained more than 5000 rahter complicated polygons. Some experience: - Combine two selected polygons tool is fast but it has a little bug. It allows to combine polygons even if the layer is non-editable. How do you do that ? Menu item is inactive (grayed) if layer is non editable. Good question indeed. It took awhile to repeat it. This is somehow related to EZ-Buttons shortcut. The shortcut seems to remember, not only the menu selection it is connected with, but also the state of OJ project when the shortcut was created. It can be created by opening some layer to OJ and making is editable so thet combine two polygons is working. Create the EZ-Button shortcut now and add a new layer. Now the EZ-Buttons shortcut combines polygons even the layer is not editable. So this is a feature in the EZ-Buttons. - Combine polygon with neighbouring polygon is very slow and can give an out-of-memory error. Is it perhaps walking through all the features when searching for the one to use for combining? I would guess that it should be much faster if it correctly selects just the few adjacent polygons for candidates first. I think the algo of this plugin is not so simple... I think Stefan know it better - Making union of selected features suits me well because I would like to combine about 10-20 polygons together. However, because it creates new layer each time there is some extra work with joining them together later. - Union selected in place (if result can be simple polygon) would be the ideal tool for just this case. Agree, this would be helpful. Not sure I would limit to simple polygons though. In my case I want that the new areas are also continuos. Sometimes multipolygons would be acceptable. Perhaps there could be a check box for cases when features selected for combining are all simple polygons Allow multipolygons as new features? . If selection already contains multipolygons then the result can naturally contain them too. I suppose you don't want to union all adjacent polygons, otherwise, the simplest is to union the whole layer, then to explode the multipolygon. Yes, this is the case. All the polygons in the layer are adjacent and all together would be a monster polygon with thousands of holes and hundreds of thousands of vertices. I am going to reduce the number of polygons into about 500 and I want all them to have some reasonable amount of vertices. Automatic system by using some grid layer as a helper layer for splitting data into rectangular pieces first to be unioned later tile by tile would not give directly a good result. Data is from archipelago and in some places there is just open sea and in other places masses of islands. I will get the job ready faster by doing the selections manually. Union selected in place tool would make it more convenient, though. Here is a workaround (didn't check it though) - create a second layer. - draw 1 linestring per group of building, intersecting all buildings you want to aggregate (and only those one) - create an auto-increment attribute on these linestring layer - do a spatial join to transfer linestring id to polygons - union polygons by attribute (you will get a multipolygon with all polygons not intersecting a linestring : explode it) Sounds doable, I will try it next week. -Jukka- Michaël -Jukka Rahkonen- -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.netmailto:Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
[JPP-Devel] Combining polygons
Hi, I started to reduse the number of polygons in one dataset which originally it contained more than 5000 rahter complicated polygons. Some experience: - Combine two selected polygons tool is fast but it has a little bug. It allows to combine polygons even if the layer is non-editable. - Combine polygon with neighbouring polygon is very slow and can give an out-of-memory error. Is it perhaps walking through all the features when searching for the one to use for combining? I would guess that it should be much faster if it correctly selects just the few adjacent polygons for candidates first. - Making union of selected features suits me well because I would like to combine about 10-20 polygons together. However, because it creates new layer each time there is some extra work with joining them together later. - Union selected in place (if result can be simple polygon) would be the ideal tool for just this case. -Jukka Rahkonen- -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
Re: [JPP-Devel] Combining polygons
Hi, I started to reduse the number of polygons in one dataset which originally it contained more than 5000 rahter complicated polygons. Some experience: - Combine two selected polygons tool is fast but it has a little bug. It allows to combine polygons even if the layer is non-editable. How do you do that ? Menu item is inactive (grayed) if layer is non editable. - Combine polygon with neighbouring polygon is very slow and can give an out-of-memory error. Is it perhaps walking through all the features when searching for the one to use for combining? I would guess that it should be much faster if it correctly selects just the few adjacent polygons for candidates first. I think the algo of this plugin is not so simple... I think Stefan know it better - Making union of selected features suits me well because I would like to combine about 10-20 polygons together. However, because it creates new layer each time there is some extra work with joining them together later. - Union selected in place (if result can be simple polygon) would be the ideal tool for just this case. Agree, this would be helpful. Not sure I would limit to simple polygons though. I suppose you don't want to union all adjacent polygons, otherwise, the simplest is to union the whole layer, then to explode the multipolygon. Michaël Here is a workaround (didn't check it though) - create a second layer. - draw 1 linestring per group of building, intersecting all buildings you want to aggregate (and only those one) - create an auto-increment attribute on these linestring layer - do a spatial join to transfer linestring id to polygons - union polygons by attribute (you will get a multipolygon with all polygons not intersecting a linestring : explode it) -Jukka Rahkonen- -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure ___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel -- This SF email is sponsosred by: Try Windows Azure free for 90 days Click Here http://p.sf.net/sfu/sfd2d-msazure___ Jump-pilot-devel mailing list Jump-pilot-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel