GeoTools
  1. GeoTools
  2. GEOT-3554

Improper handling of duplicate columns in the ESRI shapefile reader

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.7.0
    • Fix Version/s: 2.7.2
    • Component/s: shapefile plugin
    • Labels:
      None

      Description

      The ShapefileAttributeReader does not properly resolve field names to their indices for duplicate fields. Duplicate fields get the value of geometry due to the fall-through case in the ShapefileAttributeReader.

      The ShapefileDataStore does assigns the duplicate field a new name, but knowledge of the original field name or the duplicate instance number are not preserved. As a result when the ShapefileAttributeReader tries to resolve field names to their indices, it cannot find the field.

      The included patch is against branches/2.7.x.

        Activity

        Hide
        S Anwar added a comment -
        Updated patch file against geotools/tags/2.7.1 and a sample data file with duplicate column "TestColumn".
        Show
        S Anwar added a comment - Updated patch file against geotools/tags/2.7.1 and a sample data file with duplicate column "TestColumn".
        Hide
        Andrea Aime added a comment -
        Ah ha, this looks better. I'll try to apply it during the weekend.
        Show
        Andrea Aime added a comment - Ah ha, this looks better. I'll try to apply it during the weekend.
        Hide
        Andrea Aime added a comment -
        Patch applied on 2.7.x and trunk. Thanks again for the contribution!
        Show
        Andrea Aime added a comment - Patch applied on 2.7.x and trunk. Thanks again for the contribution!
        Hide
        Jody Garnett added a comment -
        Resolved issues being marked closed in conjunction with the release of GeoTools 2.7.2.
        Show
        Jody Garnett added a comment - Resolved issues being marked closed in conjunction with the release of GeoTools 2.7.2.

          People

          • Assignee:
            Andrea Aime
            Reporter:
            S Anwar
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: