Global Mapper Pro

Finding - not Deleting - Duplicate Features

dcoggin
dcoggin Global Mapper UserTrusted User
edited February 2015 in Technical Support
Hello Support,

Is there a way to find duplicate features without deleting? What I have is two separate layers of point features from two sources with an attribute to note the source (SOURCE = A or SOURCE = B). I'd like to combine the layers deleting duplicates but noting the source as being from both layers if there were duplicates. I'd end up with a single layer that would have a SOURCE attribute with a value of A, B, or A&B. It looks to me the best way to do that would be to combine the layers and first find all duplicates and change their source to A&B. I would then DELETE_DUPLICATES ignoring attributes. I don't see a way to find the duplicates and then change an attribute.

Thanks for helping.

David

Comments

  • dcoggin
    dcoggin Global Mapper User Trusted User
    edited February 2015
    While it would be very nice to have a direct method (and there may be one that I'm not aware of), the following steps will get the job done:

    - Open two point files, one from source A and one from source B
    - Add a SOURCE attribute to both files – “A” to Layer 1 and “B” to Layer 2
    - COPY (Ctrl-C) all Layer 2 points to Layer 1
    - DELETE_DUPLICATES=YES IGNORE_ATTRS=YES on Layer 1 (“B” labeled points are now the B unique points)
    - Select all “A” source points on Layer 1 (these are the A source and common points) and COPY (Ctrl-C) to Layer 2
    - DELETE_DUPLICATES=YES IGNORE_ATTRS=YES on Layer 2 (“A” labeled points are now the A unique points)
    - Move “B” points from Layer 1 (B unique points) to a new Layer 3
    - Move “A” points from Layer 2 (A unique points) to the new Layer 3
    - Rename “A” source attribute points on Layer 1 to “Common”
    - Move Layer 1 “Common” points to Layer 3
    - DELETE_DUPLICATES=YES IGNORE_ATTRS=YES on Layer 3 (this deletes the A unique points from those labeled “Common”)
    - Points on Layer 3 are now correctly labeled as “A”, “B”, or “Common”

    This works because apparently GM always retains the first point in a layer and deletes duplicates with higher layer indices (ones that are copied in). A direct method would be much quicker.

    Thanks,
    David
Sign In or Register to comment.