Combine buildSelectList into buildPropertyName - #175
Conversation
e55fafe to
fc26169
Compare
fc26169 to
d74b22b
Compare
|
The default parameter Consequence: a bare |
|
Thank you for catching that regression! Addressed and tested in 25871c3 Additionally, when doing a GetFeatureById with empty |
25871c3 to
2b9817e
Compare
|
Have a look at |
65402f6 to
d39196c
Compare
Co-authored-by: Emmanuel S. <5435148+esgn@users.noreply.github.com>
a6773c0 to
9c906c7
Compare
…sInput Co-authored-by: Emmanuel S. <5435148+esgn@users.noreply.github.com>
…rty is part of the request Co-authored-by: Emmanuel S. <5435148+esgn@users.noreply.github.com>
Co-authored-by: Emmanuel S. <5435148+esgn@users.noreply.github.com>
3ee9384 to
438656e
Compare
… queries) Co-authored-by: Emmanuel S. <5435148+esgn@users.noreply.github.com>
68595e4 to
0c810c5
Compare
…re from GetFeature inputs Emmanuel S. <5435148+esgn@users.noreply.github.com>
…atial filter uses it. Co-authored-by: Emmanuel S. <5435148+esgn@users.noreply.github.com>
Co-authored-by: Emmanuel S. <5435148+esgn@users.noreply.github.com>
a4808e0 to
34ff907
Compare
This PR merges the two existing implementations of
select: one used to exist for the GpfGetFeatures codepath and another for GpfGetFeatureById. They are now grouped intobuildPropertyName, which returns apropertyNamewith the following convention:propertyNameis the empty string if and only if the caller isGpfCountFeatures.The geometry can be requested by two different causes:
GpfGetFeaturesLayerorGpfGetFeatureByIdLayer, in which case it is always requested.GpfGetFeaturesorGpfGetFeatureById, in which case it is requested if and only ifspatial_extrais not empty.Be it one case or the other, when the geometry is requested, its name is resolved and included in
propertyName. Otherwise,propertyNamedoes not include the name of the geometry.Apart from the geometry, the rest of
propertyNameare the list of theselected properties. Ifselectis undefined or empty, it is the list of all non-geometric properties of thetypenamein the catalog.When the name of the geometry is required, it is resolved by checking that there is a unique geometric property in the catalog. This name is required in two situations:
Layertool or a non-emptyspatial_extraspatial_filterin the query.When the geometry name has been resolved, it is stored in the
geometryPropertyfield of theCompiledQuery. It serves as a resolved cache, and also in the case where the catalog is desynced with the actual upstream WFS service: when this occurs and the required geometric property is absent from upstream, a dedicated error is thrown to identify this problem. ThegeometryPropertyfield of theCompiledQueryis used in this error, so this field needs to be populated whenever the geometry name is required, including when it is only used as part of a CQL filter (i.e. even if the geometry itself is not requested in the output).This PR also changes the behavior of requests on typenames that have either no or multiple geometries. Before, those used to throw an error on any request: now, they only throw an error if the geometry is required (
spatial_filter/Layertool /spatial_extra).Finally, rename
attachFeatureRefsintopostProcessFeatureCollectionto more accurately reflect that this function handles all the post-processing, and does not only attach feature refs anymore.