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

get WFS default pagesize from GetCapabilities request #90

Closed
smnorris opened this issue May 4, 2021 · 6 comments
Closed

get WFS default pagesize from GetCapabilities request #90

smnorris opened this issue May 4, 2021 · 6 comments

Comments

@smnorris
Copy link
Owner

smnorris commented May 4, 2021

Safer than setting it at 10k - as per bcgov/bcdata#256

@smnorris
Copy link
Owner Author

smnorris commented May 4, 2021

This is the xml in the GetCapabilities response. Not sure how to pull it out from owslib.wfs

<ows:Constraint name="CountDefault">
<ows:NoValues/>
<ows:DefaultValue>10000</ows:DefaultValue>
</ows:Constraint>

@smnorris smnorris added this to the 1.0 milestone Jul 18, 2022
@smnorris
Copy link
Owner Author

Really not interested in parsing the xml

@smnorris smnorris reopened this Sep 26, 2023
@smnorris
Copy link
Owner Author

Default page size has been reduced to only 500 records, this is now a critical issue.

@smnorris
Copy link
Owner Author

500 max features is really small!

To fix:

  • dropping the pagesize option from the various commands in the CLI seems reasonable, I never use that anyway and can't see wanting to reduce the size even if the 10k limit is restored
  • revert to caching the getcababilities xml, not the list of tables
  • parse xml to get the CountDefault

@smnorris
Copy link
Owner Author

smnorris commented Sep 27, 2023

Might be able to avoid the xml parsing?

owslib does note the constraints, but doesn't seem to hold the values?
https://github.com/geopython/OWSLib/blob/master/owslib/feature/wfs200.py#L171

>>> WFS.operations[2].constraints[1].name
'CountDefault'
>>> WFS.operations[2].constraints[1].values
[]

It does look for values, not sure why they aren't there:
https://github.com/geopython/OWSLib/blob/master/owslib/ows.py#L175

But referencing the constraints by their index in the lists seems like a bad idea.

@smnorris
Copy link
Owner Author

fixed with #145

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant