Uploaded image for project: 'GeoServer'
  1. GEOS-8852

Inconsistent DefaultGeometry between FeatureType and Features for a given resource

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Medium
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 2.14-RC
    • Component/s: None
    • Labels:
      None

      Description

      If a data store has two or more geometry properties, and the marked default is different from the first geometry property, featureType.getFeatureType.getGeometryDescriptor() and featureType.getFeatureSource.getFeatures(Filter.INCLUDE).features().next().getDefaultGeometry() will give different results.

      This is because the FeatureType of the FeatureTypeInfo is built using DataUtilities.createType() via the underlying store implementation (calculated upon request) whereas the FeatureType of each feature is calculated using SimpleFeatureTypeBuilder.buildFeatureType() (ResourcePool line 960), then cached in the ResourcePool.

      This behaviour likely varies depending on the underlying Store implementation; I have only reproduced it with PropertyStore so far.

        Attachments

          Issue links

            Activity

              People

              • Assignee:
                Unassigned
                Reporter:
                tbarsballe Torben Barsballe
              • Votes:
                1 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: