Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WFS] Add startIndex Support in URL generation and supportsStartIndex Method #44

Merged
merged 3 commits into from
May 14, 2024

Conversation

ronitjadhav
Copy link
Member

@ronitjadhav ronitjadhav commented May 9, 2024

This PR includes the following updates:

  • Introduces the support for startIndex in the getFeatureUrl and generateGetFeatureUrl functions
  • Adds a supportsStartIndex method in the WfsEndpoint class.

@ronitjadhav ronitjadhav changed the title [WFS] Added a method to check if the service supports startIndex [WFS] Add startIndex Support in URL generation and supportsStartIndex Method May 9, 2024
@ronitjadhav ronitjadhav requested a review from jahow May 10, 2024 07:31
Copy link
Member

@jahow jahow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!! see my comment about the version check in the URL generation; Also it'd be nice to have an added test in the url.spec.ts file to demonstrate this new param :)

src/wfs/url.ts Outdated
@@ -51,6 +53,15 @@ export function generateGetFeatureUrl(
const extentJoined = extent.join(',');
newParams.BBOX = extentCrs ? `${extentJoined},${extentCrs}` : extentJoined;
}
if (startIndex !== undefined) {
if (version >= '2.0.0') {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think you can remove this check altogether; many implementations (inc. GeoServer) will support startIndex even using lower versions of WFS, so adding it anyway cannot hurt. On the other side, since we now provide a supportsStartIndex method in the endpoint, it is up to the application code to handle the case where this might have no effect at all (e.g. disabling a field).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, sounds correct.
I have made the suggested updates

Copy link
Member

@jahow jahow left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect, thanks!!

@ronitjadhav ronitjadhav merged commit ddbb5b0 into main May 14, 2024
1 check passed
@ronitjadhav ronitjadhav deleted the wfs_check_startIndex branch May 14, 2024 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants