I have some point which are on top of each other (duplicated). They have same name Dont ask why 🙂
When I label them with their name, I get 3-4 labels.
Is there a way to label only one of them, the other labels just make the map messy.
I did try with python, but I am not getting what expected.
Here is my code, I use in the label properties dialog:
def FindLabel ( [LocationID] ): ll=open(r'c:\Users\lefte-va\test1.txt').readlines() if [LocationID]+'\n' not in ll: with open(r'c:\Users\lefte-va\test1.txt','a') as myfile: myfile.write([LocationID]+'\n') return [LocationID]
This returns empty(no label values).
Try this first
Disperse Markers (Cartography)—ArcGIS Pro | Documentation
or if you want to
Find Identical (Data Management)—ArcGIS Pro | Documentation
and deal with them
However they need to remain duplicated.
This is inherited data, so I can not do much to improve it. Otherwise it must be one to many relationship and all rosy.
So the question still remains.
More over I am surprised my code doesn't work. Any idea why?
If you can use the Maplex labeling, the Remove Duplicate Labels (within a fixed distance) usually helps.
As far as I remember, maplex required separate license. Is that so?
Its not separate, but I believe you need to have an advanced or standard Desktop License
In ArcGIS Pro, Maplex is available at all license levels. As @carriemorrell suggested, the Maplex Remove duplicate labels setting will remove the redundant point labels in your situation.