Ignore:
Timestamp:
2017-09-30T15:58:24+02:00 (7 years ago)
Author:
donvip
Message:

Edigeo: better name management

File:
1 edited

Legend:

Unmodified
Added
Removed
  • applications/editors/josm/plugins/cadastre-fr/src/org/openstreetmap/josm/plugins/fr/cadastre/edigeo/pci/EdigeoPciReader.java

    r33688 r33690  
    201201        if (input != null) {
    202202            String name = input.replaceAll("    ", " ").replaceAll("   ", " ").replaceAll("  ", " ");
    203             if (name.length() > 2 && StringUtils.isAllUpperCase(name)) {
     203            if (name.matches("([A-Za-z] )+[A-Za-z]")) {
     204                name = name.replaceAll(" ", "");
     205            }
     206            if (name.length() > 2 && StringUtils.isAllUpperCase(name.replaceAll(" ", "").replaceAll("'", "").replaceAll("-", ""))) {
    204207                name = WordUtils.capitalizeFully(name);
    205208            }
Note: See TracChangeset for help on using the changeset viewer.