Unary Union: loss of all other columns other than geometry

Hi,

maybe I don’t understand the node correctly?
When I use “Unary Union” the results looks fine, but I loose all of the other columns (other than geometry). Is that intended by design?

Second part of the question: the result is a multipart polygon. Is there an option to create one single polygon output?

Thanks and cheers

grafik
grafik

Hello @Awiener,

Thank you for contacting the KNIME Forum.
Do I understand correctly, that your goal is to retain (some) information from the columns that are not type of “geo” in the output of the <unary union>?

The unary union does unite all objects under one multipart object in its output. As there is no option to handle the grouping information for the remaining columns you might want to process the metadata with a <groupby> node and join that to your generalized multipart “geo” object.

To have a bit more control, of what geospatial data you want to generalize, you might want to use the <dissolve> node. In here, you can define which column your generalization bases on.
E.g. in your example it could be the LAND_... column (1, 2, 3, 5, …). In that case, you would get as many singlepart or multipart objects (depending on how many of those entities are present) depending on the number of unique values of that column.
If you dissolve on the COUNT... column, you will end up with one multipart object (as long as “Germany” is the only entry).
Please have a look at this example, as this might explain this to you a bit better:

I must admit, I did not understand your second question entirely, since this is heavily dependent on the information you want to generalize.
There is a <multipart-to-singlepart> node that allows you to split the multipart objects based on a categorical column. That might help in your case. You might want to check out this example workflow to get a better understanding about it:

Best regards

1 Like

Thank you, @kevin_sturm

I am trying to open your workflow, but it’s doing nothing after I load it:

image

When I click cancel, Knime crashes. Is there something I could do in order to work with your workflow?
I guess it has somehting to do with

image

However that is company regulation :wink:

Hi @Awiener,

It might be very likely that your company regulation (making your directory read-only) does affect your observed behavior.
May I ask how you have tried to open the workflow? Did you double-click on knwf file or did you import the workflow via the interface of the KNIME Analytics Platform?

Best regards
Kevin