Inconsistent DefaultGeometry between FeatureType and Features for a given resource

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.

Environment

None

Status

Assignee

Unassigned

Reporter

Torben Barsballe

Triage

None

Fix versions

Affects versions

None

Priority

Medium