GeoTools
  1. GeoTools
  2. GEOT-899

Problem determing proper geometry type with ArcSDE 9.x

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 2.2-RC3
    • Fix Version/s: None
    • Component/s: arcsde plugin
    • Labels:
      None
    • Environment:
      ArcSDE 9.0 and 9.1

      Description

      In ArcSDE 9.x, the constants in "SeLayer" seem to have changed. This can cause ArcSDEAdapter.getGeometryType() to return an incorrect geometry.

      it seems that there are two ways to determine a layer's geometry type:

      1) Check its type against the TYPE_* constants, and
      2) If that fails, check the type against the various SE_*_TYPE_MASK constants

      The problem in this instance is that the SeLayer's geometry type is "2", which corresponds to both TYPE_LINE and SE_POINT_TYPE_MASK. The layer's true geometry is Point, but since it matches against TYPE_LINE in case 1, the wrong geometry type is returned.

      With my limited understanding of ArcSDE and the java API it uses, I propose a method to hopefully fix this:
      1) Check if the major version of the instance is 9 or higher. If it isn't, proceed exactly as before.
      2) If the major version is 9 or higher, do not perform case 1 above. (ie do not check the type value against the TYPE_* constants)

      Attached is a patch that makes these adjustments to ArcSDEAdapter on 2.2.x.

        Activity

        Hide
        Gabriel Roldan added a comment -
        applied to 2.2.x and 2.3.x, don't have a chance of testing it now, so I rely on Richard to try it out
        Show
        Gabriel Roldan added a comment - applied to 2.2.x and 2.3.x, don't have a chance of testing it now, so I rely on Richard to try it out
        Hide
        Gabriel Roldan added a comment -
        fixed on trunk, ArcSDEAdapter.getGeometryType was splitted in getGeometryTypeFromSeShape and getGeometryTypeFromLayerMask
        Show
        Gabriel Roldan added a comment - fixed on trunk, ArcSDEAdapter.getGeometryType was splitted in getGeometryTypeFromSeShape and getGeometryTypeFromLayerMask

          People

          • Assignee:
            Gabriel Roldan
            Reporter:
            Richard Gould
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: