2

I am using ArcMap 10.8.2. I have two point layers from different sources which contain the educational facilities of Catalonia. Each layer may contain facilities that are not contained in the other layer. What I need to do is a single layer with all the information without duplicates.

First, I have run the 'Generate Near Table' using a Search Radius and limiting the number of near features reported for each input features to 3.

The output table featuring the field "Toponims" from one input layer, and the field "NOM" from the other input layer. These fields contain the names of the facilities. enter image description here

In order to find duplicates I have used the tool 'Make Query Table' using the following SQL expression:

lower(Toponim) LIKE CONCAT(CONCAT('%',SUBSTRING(lower("NOM"),1,CHAR_LENGTH("NOM"))),'%')

It is a case-insensitive expression in order to find a greater number of duplicates, as sometimes facilities are not named exactly the same in both layers. This expression finds all features in which field "NOM" is entirely contained in field "Toponim", but there are some cases in which there is more text in field "NOM" than in field "Toponim" (e.g. 'Institut Escola Sant Esteve' vs 'Escola Sant Esteve'). When this happens, the expression does not find a duplicate.

Is there a way using the previous SQL expression to identify also these cases where text in field "NOM" is not entirely contained in field "Toponim"?

1 Answer 1

1

If you are willing to try a very different approach to string matching, then you could use the fuzzywuzzy Python module, instructions are here.

There are several Q&As on this site that discuss it, you need only search for "fuzzywuzzy".

1
  • I have downloaded fuzzywuzzy in Excel and use it to compare strings between two fields. It is a great tool. However it is not easy to work with fuzzy logic, I mean, it gives you the coincidence in % between the values of different fields, but which is the threshold to choose to assume that two values are duplicates?
    – JoanB
    Commented Feb 20 at 12:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.