Merging shapes within a feature

11-25-2016 04:26 AM
Occasional Contributor III

Hi all,

I have a polygon shapefile with 1800 records. I want to slim this down by merging together records with either:

a) duplicate/matching area sizes in the Area field


b) matching first 6 letters of a reference ID field.

So below, the 4 'Armes Court' shapes would combine into one and same with the 'Avon Court' shapes etc etc...

There are too many records to go manually merging them togther.


also, why can't i publish this question in a general 'GIS' location? When I click browse places, all the cateogories are really specific. I've had to choose python as perhaps the solution to my question is python...? who knows...

Tags (2)
0 Kudos
6 Replies
MVP Frequent Contributor

Isn't dissolve what you want to do?

You may have to create a new dissolve item in your attribute table first, then copy over those first 6 characters across.


Occasional Contributor III

I've made a new text field to copy across the first 6 characters into, do you know what vb/python code I should use in field calculator to only take the FIRST 6 characters over? or copy it all then DELETE the last 4 numbers from the right?

0 Kudos
Occasional Contributor III

Dissolve wont work as standard on the 2 fields as you require, however do you really need to merge where the areas are the same also, is the first 6 characters of the uniqueID not enough?

(Your rows for "Armes court" will not dissolve into 1 feature as they have different areas)

Anyways, if just the uniqueIDs is just enough, the workflow is:

1)  Calculate field using expression:

left( [QL_PROPID], 6)

2) Dissolve using this new field as the dissolve field.

MVP Frequent Contributor

Or if you wanted the python version. Check the python parser radio button first.

Occasional Contributor III

Thanks LukeW

Yes I didn't realise there were two different areas for armes court. I guess what I only want, is to dissolve based on the Unique ID field.

I'll create a new text field to transfer the first 6 characters over. Then I'll dissolve.

I always get confused with the 'left' and 'right' in vb scripts. And whether it deletes or keeps the specified characters.


0 Kudos
MVP Legendary Contributor


Moved to Managing Data‌ data because..

  • it isn't GIS specific
  • the question is about data formatting and structuring
  • the solution is language agnostic or could be solved using one or more languages

The GeoNet Community Structure may help to provide a more categorized perspective.