Subscribe to this thread
Home - General / All posts - Join touching objects in same drawing
Rakau103 post(s)
#24-Jan-23 17:23

I am having a play with trying to do a plant count over a field. Using the TRACE in M9, I end up with a shape file as sample screen shot. There are approx 3 million records.

My mission is to join/merge ? all records that are touching each other into just one object.

I have circled a sample where there are 3 objects - these need to be merged into one object.

Any help much appreciated thanks


575 post(s)
#24-Jan-23 19:57

Transform pane, Merge|Into area (dissolve)

Rakau103 post(s)
#25-Jan-23 06:53


That seems to dissolve so as to create only one record. Is there a way to retain the position of each plant as a separate record, but dissolve the shape that is clustered together.

Each plant can be a different shape, hence the variation of the cluster size (See attachment)

Thanks in anticipation


575 post(s)
#25-Jan-23 07:17

Right, then dissolve followed by Split | Branches

If you need any attributes from the original, you must do a Join between dissolved(and split) areas and the originals.

You can also use a group by attribute when dissolving, but probably you do not want that, at least not only.

Rakau103 post(s)
#25-Jan-23 07:24

Thank you, will give that a try.

the dissolve took several hours to process, but will get back once it has run.

10,027 post(s)
#25-Jan-23 08:44

This is all using Manifold 8 terminology, which is hardwired in my brain and I'm not looking. Can translate if needed. (IMHO Manifold 9 terms are always more longwinded, but never more helpful than the terms used in 8.)

(1) If your individual areas have attributes (possibly shared by contiguous neighbours), first make points to record those attributes, using inner centroids.

(2) Union all areas (faster than dissolve).

(3) Decompose the combined areas (giving islands).

(4) Reapply attributes from the points in (1). You can make a helpful check for unexpected conflicts at this stage by counting distinct values.

If you want more detail, or more detailed steps, then post sample data, of course.

10,027 post(s)
#25-Jan-23 09:35

P.s. the ability to SPLIT BY Islands in Manifold 8 corresponds to the GeomToShapes function in 9.

In both systems, it is necessary to merge adjacent areas first, before subdividing into the resulting contiguous agglomerations (if any), that is, into islands/shapes.

This makes it necessary to keep careful track of attributes, where they matter: using them as a barrier to merger where they differ; and whether they do or do not, restoring their values to merged areas afterwards.


10,281 post(s)
#25-Jan-23 13:17

A slightly different approach than dissolving the geometry and splitting it into shapes / islands: change the trace parameters (increase Similarity) so that the data is not split into individual areas in the first place?

Rakau103 post(s)
#25-Jan-23 16:48

Thank you everyone.

I have the desired effect as suggested by RK, and a lot of learning from tjhb to experiment with.

Adam, the trace was set at 100 after a lot of experimenting. This was giving me 3 x colour values for stylingOne for the dirt, one for the plant, and one that was confused. it seems the shapes were based upon the shape of a plant where the leaves where going in several directions.

Again thank you everyone

Manifold User Community Use Agreement Copyright (C) 2007-2021 Manifold Software Limited. All rights reserved.