Hi Michaël,

Michael Michaud wrote:

> Hi Jukka,

>>> I see. A solution would be to replace current options "Use an attribute", 
>>> "Attribute" by a list of actual attributes with a checkbox for each one.
>>> In this case, maybe we should split the tool again to have
>>> - union/merge (a selection or a layer), keeping only the merge option (+ 
>>> option to split non adjacent linestrings ?)
>>> - dissolve/merge (a layer) : same options + list of all attributes (with 
>>> checkboxes) + aggregate unused attributes 

>> How about having two options for the unused attibutes: Aggregate unused 
>> attributes/Discard unused attributes. The latter would remove the unused 
>> columns from the schema of the new union layer. What I have in my mind is to 
>> cut down file size by cutting down the number of features and by removing 
>> unnecessary attributes. Of course the latter is quite easy to do from "Edit 
>> Schema".

> Just committed a new "dissolve" plugin (coming just after union plugin) : 
> check r4050+
> Compared to union plugin :
> - it works only on a layer, not on a feature selection
> - it can use several attributes to dissolve, not just one
> - it can optionally explode multi-geometries at the end
> - it can optionally remove unused attributes from the schema
> - there is no option to ignore null attributes
> - there is no option to aggregate unused attribute

> Please, let me now if it fits your use case and/or if you see any improvements
> to make it more usable.

This is going to be a fine tool to have in the analysis toolbox. I made a test 
with road data which are natively dynamically segmented but split into physical 
segments for standard GIS programs. There are quite many attributes used for 
splitting which leads to very short segments. By taking the two attributes I 
really need I can reduce the number of linestrings very much, for example from 
911 to 31. However, using this fine dissolve tool reveals new oddities from the 
data which may lead to further questions and suggestions but I must play with 
the data a little bit more first.

I did find something that feels like a bug. When the Dissolve tool it is run 
for the first time it appears to memorize the attribute list and it can only be 
cleared by closing OpenJUMP. To reproduce dissolve one layer by attribute 
"speed". Next try to dissolve another layer which do not have "speed" as 
attribute. The boxes for selecting attributes show the right attributes but 
trying to run dissolve leads to an error:

java.lang.IllegalArgumentException: Unknown attribute name: speed
        at 
com.vividsolutions.jump.feature.FeatureSchema.getAttributeIndex(FeatureSchema.java:97)
        at 
com.vividsolutions.jump.feature.AbstractBasicFeature.getAttribute(AbstractBasicFeature.java:103)
        at 
org.openjump.core.ui.plugin.tools.DissolvePlugIn.computeKeyFromAttributes(DissolvePlugIn.java:245)
        at 
org.openjump.core.ui.plugin.tools.DissolvePlugIn.run(DissolvePlugIn.java:207)
        at 
com.vividsolutions.jump.workbench.ui.task.TaskMonitorManager$TaskWrapper.run(TaskMonitorManager.java:152)
        at java.lang.Thread.run(Unknown Source)

-Jukka-

> Michaël


Michaël


-Jukka-
________________________________________
Michael Michaud wrote:
Hi Jukka,

As you guessed, I generally solve this kind of problem with a calculated 
attribute.
There are a few things to know for that.
For numeric attributes, you can do as you suggested : 100*A + B
For string attributes, use + to concatenate attributes and don't omit to add a 
separator : A + ";" + B
If your expression starts with "", + will concatenate fields, even numerics : 
"" + 1 + 2 -> 12
So the following expression should work in almost all cases
"" + A + ";" + B 
(did not check for dates)

Accepting several attributes in the union/dissolve user interface would be 
nice, but
it needs some more work (especially if we want to be able to add/remove fields
from the dialog in order to manage any number of attributes).
Please, add a Feature Request for that.

Michaël
 

-Jukka-
________________________________________
Landon Blake wrote:
So it sounds like adjacency will be important too? In other words...we don't 
want to merge features that aren't adjacent or topologically connected? 

Landon

On Wed, Sep 10, 2014 at 1:43 PM, Landon Blake <sunburned.surve...@gmail.com> 
wrote:
Interesting use case Jukka. Let me think about how this might work as a 
plug-in. 

Landon

On Sun, Sep 7, 2014 at 1:47 PM, Rahkonen Jukka (Tike) 
<jukka.rahko...@mmmtike.fi> wrote:
Hi Landon,

My case last week was about parcel IDs and landuse codes and aim was to union 
areas so that polygons with same landuse and belonging to same owner would make 
one polygon.

For another use see attached images and source data in Jump JML format.  Data 
could present two highways with ref. IDs "100" and "200". Both highways have 
sections with speed limits "60" and "80". Aim is to merge segment of highway 
"100" with speed limit "80" together etc.

Image one: Original segmented data
Image two: Desired end result. Notice an extra: Highway "100" has speed limit 
"60" in two distinct places. I do not want them to be combined into 
multilinestring. OJ can handle this case with two subsequent operations: Merge 
selected features + Explode selected features.

-Jukka Rahkonen-





________________________________________
Lähettäjä: Landon Blake [sunburned.surve...@gmail.com]
Lähetetty: 7. syyskuuta 2014 22:10
Vastaanottaja: OpenJump develop and use
Aihe: Re: [JPP-Devel] Union/dissolve by several attributes
Jukka:
Can you give me some more details on the actual union you are trying to 
accomplish? What do you integer attributes represent?

Thanks.

Landon

On Wed, Sep 3, 2014 at 4:21 AM, Rahkonen Jukka (Tike) 
<jukka.rahko...@mmmtike.fi> wrote:
Hi,

I would like to union features by two or perhaps more attributes. I wonder if 
the current Union/Dissolve/Merge tool could be developed to support the use of 
combined classes. In my use case I have two integer attributes which define the 
classes and it is a bit tricky to calculate a new concatenated field from 
those. Perhaps it is possible to do with the Beanshell Attribute Calculator but 
it is not obvious for me how. An example: I have two integer attributes and I 
would like to concatenate their values to one field which I would like to use 
for merging later. If the attribute values are A=80 and B=20, how could I 
conbine them into "80-20" or something like that? Well, in this case I could do 
(100xA)+B=8020 but what to do if I had also strings to concatenate as A=80 and 
B=true? I can do the task fine with Spatialite but it would be a bit more 
fluent to do everything with OpenJUMP.

-Jukka Rahkonen-

------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


------------------------------------------------------------------------------
Slashdot TV.
Video for Nerds.  Stuff that matters.
http://tv.slashdot.org/
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel




------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk


_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel



------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk


_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel




------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk



_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel


------------------------------------------------------------------------------
Meet PCI DSS 3.0 Compliance Requirements with EventLog Analyzer
Achieve PCI DSS 3.0 Compliant Status with Out-of-the-box PCI DSS Reports
Are you Audit-Ready for PCI DSS 3.0 Compliance? Download White paper
Comply to PCI DSS 3.0 Requirement 10 and 11.5 with EventLog Analyzer
http://pubads.g.doubleclick.net/gampad/clk?id=154622311&iu=/4140/ostg.clktrk
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to